Skip to content
KomashiKomashi

MCP integration

Komashi’s Model Context Protocol (MCP) server lets a compatible AI assistant discover tools and work with your connected businesses. It supports catalog discovery, provider and service setup workflows, customer and contact management, subscriptions, invoices and usage.

Use the general Komashi MCP endpoint:

https://mcp.komashi.com/

This guide uses that root endpoint throughout. For a private or local deployment, use its configured MCP host with the same root path. Do not derive the MCP URL from the REST API endpoint or add a versioned REST path.

MCP authenticates your user account through OAuth 2.1, with the mcp:use scope. A provider REST API key from Integration → API is a different credential and is not the authentication method for this MCP connection.

  1. Add a remote MCP server in a client that supports HTTP transport and OAuth.
  2. Enter https://mcp.komashi.com/ as its URL.
  3. Start the client’s connection or authorization flow.
  4. Sign in to Komashi using the account whose providers you want to access.
  5. Review the authorization request and approve the connection if the application is the one you intended to connect.
  6. Return to the client and allow it to discover the available tools.

The authorization uses PKCE with the S256 method; a client that sends no code challenge, or uses the plain method, is rejected with 400 invalid_request. The client manages the OAuth access and refresh tokens. Do not paste a provider API key into a configuration that expects OAuth authorization.

Some clients express a remote server configuration like this:

{
"mcpServers": {
"komashi": {
"type": "http",
"url": "https://mcp.komashi.com/"
}
}
}

The configuration shape varies by client. This example supplies the endpoint; authorization still takes place through the client’s OAuth flow. A client that only accepts a static Bearer key is not sufficient for this setup.

The connection can access providers linked to the signed-in account. If you have more than one provider:

  1. Ask the assistant to list your accessible Komashi providers.
  2. Choose the business you want to work with.
  3. Have the assistant select that provider before performing provider-specific operations.

The server can return PROVIDER_SELECTION_REQUIRED with provider choices. This is a normal request to choose context, not a broken connection. Selecting a provider never grants access to a business outside your account’s active memberships. A single accessible provider can be selected automatically by the server.

For custom client implementations, the selected provider can also be supplied through X-Komashi-Provider. Use a provider ID returned for the authorized account, not a display name or subdomain.

AreaTypical operations
Provider and service setupPrepare setup drafts and open continuation links for browser review.
CatalogRead services, plans, billing periods, add-ons, options and discounts. Change plans, periods and add-ons in two steps: a preview returns the diff and a change token valid for 30 minutes, and the change is applied only after you approve the preview.
CustomersList, create, read, update and delete customers and contacts (deleting a customer archives it); generate supported customer access links.
SubscriptionsRead and create subscriptions, obtain available checkout/payment links, request plan changes, update supported dates and status, cancel subscriptions or pending changes, and delete unpaid draft subscriptions.
UsageCheck subscription or group usage, set absolute consumption totals, or increase/decrease usage.
InvoicesList and read invoice records.
Legal draftsPrepare the supported draft documents for review.
DocumentationSearch the Komashi help pages, REST API and MCP documentation (search_komashi_documentation). Read-only.

Available operations remain subject to your provider access, role, the tool’s validation and the business state. Inspect the server’s discovered tool schemas for required fields; do not assume every operation is read-only.

Setup tools can prepare a draft and return a continuation link. Open the returned Komashi link to review and finish the setup; a generated draft or link does not by itself mean the final provider or service has been created.

  • “List my Komashi businesses and let me choose one.”
  • “Show the selected business’s services, plans and billing periods.”
  • “Find this customer’s subscriptions and explain their current status.”
  • “Check the remaining usage for this subscription.”
  • “Prepare a new service draft and show me the summary before continuing.”

For usage synchronization, supply an absolute total. Use the adjustment tool when the intent is to add or subtract consumption. Check the current state before repeating an action whose previous result is uncertain.

The general endpoint exposes these MCP resources:

URIContent
komashi://resources/openapi-docsThe available OpenAPI document.
komashi://resources/integration-guideThe integration workflow guide.

It also exposes the guide-app-integration-prompt workflow prompt. Resource and prompt support depends on your client; tool discovery is the starting point for clients that only surface tools.

In Komashi, open your account Settings → MCP. Besides Connect ChatGPT and Connect Claude, this section shows the Komashi MCP endpoint with Copy endpoint, a Copy setup prompt button and a Setup guide link. The setup prompt asks your assistant to connect Komashi, list your businesses and confirm the connection; during setup it only reads data.

Active MCP connections lists the connected application, client name, connection date, expiry where applicable, and destination hosts.

Use Disconnect on the intended connection and confirm it. This revokes its access and refresh tokens. To reconnect, complete OAuth authorization again. Deleting a provider REST API key does not disconnect an account-level OAuth MCP connection.

SymptomWhat to do
401 or repeated sign-inReconnect through the client’s OAuth flow. Check that the URL is https://mcp.komashi.com/.
Missing mcp:use scope / 403Reauthorize the client with MCP access and verify your provider membership and role.
PROVIDER_SELECTION_REQUIREDChoose one of the returned providers and retry the original task.
Record not found / 404Check the selected provider and use an identifier returned from that provider.
409 or 422Inspect the tool’s error and correct the conflicting state or fields.
Connection succeeds but tools do not loadVerify HTTP remote MCP and OAuth support in the client. Do not configure the server as a local stdio command.

Related: Developer overview, REST API integration, API keys.