Developers

Integrations

Advanced technical setup

Model Context Protocol (MCP)

The SensIn MCP server lets your AI agent create invoices, draft quotations, and retrieve PDFs — directly inside Claude, Cursor, Cline, or any MCP-compatible client.

New to AI setup? Start with the beginner guide at /integrations. Already have your token? Continue with client configuration below or open Settings - Integrations.

Need the manual invoice generator instead? Open the Invoice Generator.

How it works

SensIn uses the HTTP Streamable transport for MCP — the same standard used by most hosted MCP servers. Your client connects to the /api/mcp endpoint using your integration Bearer Token. No local binary or npm package is needed.

1

Generate token

Create an integration token from Settings → Integrations.

2

Add to your client

Paste the MCP URL and token into your agent client config.

3

Ask your agent

Say "Create a quotation for…" and the agent handles the rest.

Client configuration

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows) and add:

claude_desktop_config.json

{
  "mcpServers": {
    "sensin": {
      "type": "http",
      "url": "https://sensin.sensiantechnology.com/api/mcp",
      "headers": {
        "Authorization": "Bearer sint_your_token_here"
      }
    }
  }
}

Restart Claude Desktop after saving. The SensIn tools will appear in the tool list.

Cursor & Cline (VS Code)

In Cursor go to Settings → Features → MCP Servers and add a new server, or paste into .cursor/mcp.json in your project root:

.cursor/mcp.json

{
  "mcpServers": {
    "sensin": {
      "type": "http",
      "url": "https://sensin.sensiantechnology.com/api/mcp",
      "headers": {
        "Authorization": "Bearer sint_your_token_here"
      }
    }
  }
}

For Cline, open the MCP Servers panel in the sidebar and click Add Server → select HTTP → enter the URL and Authorization header.

Antigravity

Edit your mcp_config.json file and make sure to use serverUrl instead of url:

mcp_config.json

{
  "mcpServers": {
    "sensin": {
      "type": "http",
      "serverUrl": "https://sensin.sensiantechnology.com/api/mcp",
      "headers": {
        "Authorization": "Bearer sint_your_token_here"
      }
    }
  }
}

Custom MCP client (SDK)

Any client that supports the MCP HTTP Streamable transport can connect directly:

TypeScript (MCP SDK)

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const transport = new StreamableHTTPClientTransport(
  new URL("https://sensin.sensiantechnology.com/api/mcp"),
  {
    requestInit: {
      headers: { Authorization: "Bearer sint_your_token_here" },
    },
  }
);

const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(transport);

// List available tools
const { tools } = await client.listTools();
console.log(tools.map((t) => t.name));

REST endpoint map (advanced)

Use these routes when you need direct HTTP orchestration instead of MCP tool calls. Auth, scope requirements, and error categories stay aligned with the same integration-token model.

MethodPathPurpose
GET/api/agent/contextRead workspace context
GET/api/customersList workspace customers
PUT/api/customersCreate or update customer
GET/api/customers/[id]Read customer by ID
POST/api/quotationsCreate quotation draft
GET/api/quotations/[id]Read quotation + conversion metadata
POST/api/quotations/[id]Update quotation status
POST/api/quotations/[id]/convertConvert accepted quotation
GET/api/quotations/[id]/pdfRetrieve quotation PDF
POST/api/invoicesCreate invoice draft
GET/api/invoices/[id]Read invoice
GET/api/invoices/[id]/pdfRetrieve invoice PDF

Available Tools

All tools require a valid integration token. Inputs align with the same payload model as the REST endpoint map. If you need setup basics first, use the beginner guide at /integrations.

get_workspace_context

Returns the active workspace including company profile, app settings (default currency, tax rate, payment terms), customer summary with IDs, and billing entitlement. Always call this first — company.id and customer.id from the response are required by the create tools.

Returns

Workspace metadata, companyProfile, customerSummary, billingEntitlementSummary.

get_customers

List all customers in the workspace with optional limit and offset pagination. Use this to find existing customers to bill.

Parameters

limitnumberoptionalNumber of customers to return. Default is 20.
offsetnumberoptionalNumber of customers to skip. Default is 0.

Returns

Array of customer objects with their IDs, names, contact details, and timestamps.

create_customer

Create or update a customer profile in the workspace. Returns the complete customer object including the newly generated server-side ID.

Parameters

namestringrequiredCustomer or contact person name.
companyNamestringoptionalCustomer's company name.
emailstringrequiredCustomer email.
phonestringoptionalCustomer phone number.
addressstringoptionalStreet address.
citystringoptionalCity.
statestringoptionalState or province.
postalCodestringoptionalPostal or zip code.
countrystringoptionalCountry code.
taxNumberstringoptionalTax identification number.
notesstringoptionalInternal notes about this customer.

Returns

The newly created customer object with id, createdAt, and updatedAt.

get_customer

Read a specific customer profile by ID.

Parameters

idstring (UUID)requiredCustomer ID.

Returns

The full customer object.

create_quotation_draft

Creates a new quotation draft. The server auto-assigns the quotation number (e.g. QUO-0001) and computes subtotal, tax, discount, and grand total. Only status: 'draft' is accepted on creation.

Parameters

companyobjectrequiredYour company profile. Get from get_workspace_context.
customerobjectrequiredBill-to customer. Get ID from get_workspace_context.
itemsarrayrequiredLine items. Each item needs id (UUID), description, quantity, unitPrice, total.
currencystringrequiredMYR · USD · EUR · GBP · SGD · AUD · JPY · CAD · CNY · IDR
taxEnabledbooleanrequiredSet true to apply taxRate.
taxRatenumberrequiredPercentage e.g. 6 for 6%.
quotationDatestringrequiredISO date, e.g. 2026-04-28.
validUntilstringrequiredISO date the quotation expires.
discountEnabledbooleanrequiredSet true to apply discount.
discountTypestringrequired'percentage' or 'fixed'.
discountValuenumberrequiredAmount or percentage to discount.
shippingEnabledbooleanrequiredSet true to add shipping.
shippingAmountnumberrequiredShipping cost in selected currency.
notesstringoptionalOptional notes visible on the quotation PDF.

Returns

Quotation id, number (e.g. QUO-0001), status, and full quotation object.

get_quotation

Reads a quotation by ID and returns the full quotation data plus conversion metadata — whether it has been converted to an invoice, and whether it is currently eligible for conversion (only accepted quotations can convert).

Parameters

idstring (UUID)requiredQuotation ID returned by create_quotation_draft.

Returns

Full quotation object plus conversion state: { isConverted, convertedInvoiceId, eligibility }.

convert_quotation_to_invoice

Converts an accepted quotation into an invoice draft. All line items, tax, and totals are preserved. The resulting invoice is linked back to the originating quotation for audit traceability. The quotation becomes read-only after conversion.

Parameters

idstring (UUID)requiredID of an accepted quotation to convert.

Returns

New invoice id, number, status, and sourceQuotationId.

get_quotation_pdf

Retrieves the PDF for a quotation as binary bytes. The MCP client receives the PDF as a base64-encoded resource or a direct binary blob depending on transport capabilities. Save or forward this to the end user for download.

Parameters

idstring (UUID)requiredQuotation ID.

Returns

PDF binary content (base64 encoded in MCP resource format). Filename: quotation-QUO-xxxx.pdf.

create_invoice_draft

Creates a new invoice draft directly (without going through a quotation). Requires invoiceDate, dueDate, and paymentTerms in addition to company, customer, and items. The server auto-allocates the invoice number. Optionally link to a source quotation via sourceQuotationId.

Parameters

companyobjectrequiredYour company profile. Get from get_workspace_context.
customerobjectrequiredBill-to customer.
itemsarrayrequiredLine items with id, description, quantity, unitPrice, total.
invoiceDatestringrequiredISO date e.g. 2026-04-28.
dueDatestringrequiredISO date payment is due.
paymentTermsstringrequireddue-on-receipt · net-15 · net-30 · net-60 · custom.
currencystringrequiredMYR · USD · EUR · GBP · SGD · AUD · JPY · CAD · CNY · IDR.
taxEnabledbooleanrequiredSet true to apply taxRate.
taxRatenumberrequiredPercentage e.g. 6 for 6%.
discountEnabledbooleanrequiredSet true to apply discount.
discountTypestringrequired'percentage' or 'fixed'.
discountValuenumberrequiredAmount or percentage.
shippingEnabledbooleanrequiredSet true to add shipping.
shippingAmountnumberrequiredShipping cost.
sourceQuotationIdstring (UUID)optionalLink to an existing quotation for traceability.
notesstringoptionalOptional notes on the invoice PDF.

Returns

Invoice id, number (e.g. INV-0001), status, sourceQuotationId, and full invoice object.

get_invoice

Reads an invoice by ID and returns the full invoice data including line items, totals, payment terms, and source quotation traceability if the invoice was converted from a quotation.

Parameters

idstring (UUID)requiredInvoice ID returned by create_invoice_draft or convert_quotation_to_invoice.

Returns

Full invoice object with sourceQuotationId traceability.

get_invoice_pdf

Retrieves the PDF for an invoice as binary bytes. Useful for forwarding to the user or attaching to an email. The PDF filename format is invoice-INV-xxxx.pdf.

Parameters

idstring (UUID)requiredInvoice ID.

Returns

PDF binary content (base64 encoded in MCP resource format). Filename: invoice-INV-xxxx.pdf.

Recommended agent workflow

For best results, instruct your agent to follow this pattern:

  1. Call get_workspace_context first to confirm the active workspace and retrieve company.id and customer.id.
  2. Create a draft with create_quotation_draft for human review before committing to an invoice.
  3. Once the user confirms, call convert_quotation_to_invoice to convert. The quotation must be in accepted status first.
  4. Offer the PDF via get_invoice_pdf for the user to download or forward.

Pro tip: Include a system prompt like “Always call get_workspace_context before creating any document.” to ensure the agent never hard-codes company or customer data.

Troubleshooting

Tools not appearing in Claude Desktop

Restart Claude Desktop after editing the config. Check that the JSON is valid and the url field uses "type": "http".

401 Unauthorized

Verify the token starts with sint_ and hasn't been revoked. Regenerate from Settings → Integrations.

Validation errors on create

Ensure company.id and customer.id come from get_workspace_context. Both company and customer require createdAt/updatedAt timestamps. Status must be "draft".

403 plan_limit

API access requires a Pro or Max plan. Upgrade from Settings → Billing.

Quotation cannot be converted

The quotation status must be "accepted" before converting. Update the status in the SensIn app or via the API.