Skip to content

MCP server

The MCP server lets AI assistants such as Claude Code read and change data in Sancho. An assistant calls the server’s tools the way a program calls API methods, and gets the same responses: products, stock levels, documents, invoices and the other data from the ERP systems connected to your account.

The tools write the way the API’s write methods do, but only with a key you grant a write scope. A key writes as the person who created it. The server asks for no confirmation before a write; whether the assistant asks you before it calls a tool depends on the MCP client. Grant writes only to the keys that need them.

The server’s address is https://api.sancho-wms.pl/v1/mcp. On a self-hosted server it is https://<your-host>/v1/mcp, where the host is the value of DEPLOY_HOSTNAME.

The server uses the Streamable HTTP transport. Every call is a POST to this address. The server keeps no session, so every request is independent. It supports MCP protocol version 2026-07-28 and the earlier 2025 versions, so it works with older and newer clients.

The server accepts the same keys as the API, in the Authorization: Bearer sk_live_... header. You create a key under Account > API keys, as described in the API guide.

This is how you connect Sancho to Claude Code:

Terminal window
claude mcp add --transport http sancho https://api.sancho-wms.pl/v1/mcp --header "Authorization: Bearer sk_live_..."

Other MCP clients usually take a JSON configuration. Field names can differ, so check them in your client’s documentation.

{
"mcpServers": {
"sancho": {
"type": "http",
"url": "https://api.sancho-wms.pl/v1/mcp",
"headers": { "Authorization": "Bearer sk_live_..." }
}
}
}

The MCP server is a paid add-on. It costs PLN 200 net per month for the whole organization, regardless of the number of keys. Without the add-on, every request to /v1/mcp gets a 402 response. The exception is a self-hosted server, where the add-on is not needed.

The MCP add-on is independent of the API add-on. The API add-on does not open the MCP server, and the MCP add-on does not open the /v1 methods. If you need both, enable both.

You enable it on the Account > Billing page, below the payment method, with the Enable MCP button. You disable it in the same place, with the Disable MCP button and a confirmation. The keys stay saved, and the API keeps working if its own add-on is enabled. The other rules are the same as for the API add-on:

  • enabling requires a payment card saved under Payment method on the same page;
  • adding a card ends the trial period and starts the paid Sancho subscription;
  • if the payment for the add-on does not go through right away, the MCP server starts working once it is confirmed;
  • enabling and disabling the add-on takes effect with a delay of up to a minute;
  • a person with permission to change the account’s administration settings can enable and disable the add-on.

Every API method, read or write, has one tool. The tool’s name is the method’s name with the dot replaced by an underscore: the products.list method has the products_list tool.

A write tool is marked in MCP as not read-only, so an MCP client can ask for your consent before calling it.

A tool takes the same parameters as its method and returns the same response, as JSON text. The parameters and responses are described in the reference.

Every tool also takes a format parameter: json (the default) or toon. TOON carries the same data as JSON in fewer tokens: a list of objects with the same fields becomes one header and a row per item. An assistant can ask for toon when it reads long lists.

Data Read Write
Integrations integrations_list
Warehouses warehouses_list, warehouses_get warehouses_create, warehouses_update, warehouses_delete, warehouses_makeVirtual, warehouses_makeReal
Products products_list, products_get, products_listPlacements products_create, products_update, products_assignPlacements, products_pickPlacements
Storage locations storageLocations_list, storageLocations_get
Counterparties counterParties_list, counterParties_get counterParties_create, counterParties_update, counterParties_delete
Employees employees_list
Goods received notes (PZ, PW) goodsReceivedNotes_list, goodsReceivedNotes_get goodsReceivedNotes_create, goodsReceivedNotes_update, goodsReceivedNotes_cancel, goodsReceivedNotes_delete
Goods issued notes (WZ, RW) goodsIssuedNotes_list, goodsIssuedNotes_get goodsIssuedNotes_create, goodsIssuedNotes_update, goodsIssuedNotes_cancel, goodsIssuedNotes_delete
Transfers (MM) goodsTransferNotes_list, goodsTransferNotes_get goodsTransferNotes_create, goodsTransferNotes_update, goodsTransferNotes_cancel, goodsTransferNotes_delete
Invoices invoices_list, invoices_get
Purchase orders purchaseOrders_list, purchaseOrders_get
Projects projects_list, projects_get
Recipes recipes_list, recipes_get
Fixed assets assets_list, assets_get assets_create, assets_update, assets_dispose, assets_delete
Quality controls qualityControls_list, qualityControls_get
Tags tags_list, tags_get tags_update, tags_delete
Accounting accounting_profile, fiscalYears_list, ledgerAccounts_list, ledgerAccounts_get, journals_list, vatRegisters_list, cashAccounts_list, paymentMethods_list, accountingCategories_list, accountingDocuments_list, accountingDocuments_get, accountingDocuments_changes, ledgerSettlementItems_list ledgerAccounts_create, ledgerAccounts_ensureSubledgerAccount, accountingDocuments_create, accountingDocuments_update, accountingDocuments_post, accountingDocuments_delete
Cash and bank cashFlowItems_list, cashFlowItems_changes, cashStatements_list, cashTransactions_list, cashTransactions_get, cashTransactions_changes, settlements_list cashTransactions_create, cashTransactions_delete, settlements_create, settlements_delete

A key sees only the tools it can call:

  • A tool requires the same scope as its method in the API guide. A key you grant a write also receives the read of the same area; a write scope on its own does not grant reading.
  • At least one of the key’s integrations must support the operation. A key whose integrations keep no accounting sees no accounting tools, and a key whose integration cannot create warehouses does not see warehouses_create.
  • integrations_list, tags and quality controls do not depend on integrations. integrations_list also needs no scope.

A key reads and writes only the data of its own integrations, the same as over /v1.

The earlier list_products tool no longer exists. Use products_list instead.

A failed tool call returns a result marked as an error. Its text has the form <CODE>: <message>, for example NOT_FOUND: Integration not found. The codes and messages are the same as in /v1 and are described on the Errors and limits page.

The server rejects some requests before it calls a tool. It then responds with an HTTP status:

Status Reason
401 No key in the Authorization header, or the key is unknown, deleted or expired.
402 The account does not have the MCP add-on enabled.
413 The request body is larger than 64 KiB.
429 The account’s request limit was exceeded. The response has a Retry-After header.

The MCP server and the API share one limit: 100 requests per second per account, counted together for /v1 and /v1/mcp. An assistant that reads a lot of data therefore uses the same limit as your programs that use the API.