APIMCP ServerWebhooksEvent TrackerCustom Integration

MCP Server

Connect Claude Code and other MCP clients to your BusinessChat business, so an AI agent can read and update your data through the Public API with your API key.

Overview#

BusinessChat runs a remote MCP server (Model Context Protocol) at:

https://api.businesschat.io/mcp

An MCP client, such as Claude Code, connects to it and gets a set of tools. Each tool is one operation of the Public API: listContacts is GET /v1/contacts, createTopic is POST /v1/topics, and so on. When the agent calls a tool, BusinessChat makes that API request with your key, so the agent gets the same data, the same scopes and the same rate limit as any other integration using that key.

Transport
Streamable HTTP. Every message is a POST to /mcp answered with JSON.
Auth
Your Public API key, sent as Authorization: Bearer … on every request. There is no OAuth sign-in, so the client has to let you set that header.
Tenancy
The key decides the business. An agent can only see and change that business's data.
Tools
Generated from the Public API, one per operation, organised into groups you can pick from.

Quick start#

You need a Public API key. Create one in the BusinessChat dashboard under Settings → Developer settings → API keys, and give it only the scopes the agent needs. The full key is shown once, at creation.

Claude Code#

Add the server from your terminal, with your key in place of bc_live_<id>_<secret>:

claude mcp add --transport http businesschat https://api.businesschat.io/mcp \
  --header "Authorization: Bearer bc_live_<id>_<secret>"

By default this is saved for you only, in the current project. Add --scope user to use it in all your projects. Don't use --scope project with the key written into the command: project scope is stored in a file meant to be shared with your repository.

This connects with the default tool groups. To choose groups, add ?groups= to the URL, for example https://api.businesschat.io/mcp?groups=contacts,sessions.

Checking the connection#

Start claude and run /mcp. businesschat should be listed as connected, with its tools. Claude Code names them mcp__businesschat__<tool>, for example mcp__businesschat__listContacts, and those are the names to use in its permission settings.

Then try a first prompt:

Using the businesschat tools, show me which scopes my API key has, then list my 5 most recent open sessions.

The first part calls getCapabilities, which every key can call. It's the quickest way to confirm the key works and to see what it can reach.

Other clients#

Any MCP client that supports remote servers over Streamable HTTP and lets you set a request header can connect. Most take a JSON configuration shaped like this one:

{
  "mcpServers": {
    "businesschat": {
      "type": "http",
      "url": "https://api.businesschat.io/mcp",
      "headers": {
        "Authorization": "Bearer bc_live_<id>_<secret>"
      }
    }
  }
}

Field names vary between clients. Check yours for where the URL, the transport (HTTP or Streamable HTTP) and custom headers go. A client that can only connect with OAuth sign-in can't use this server.

Authentication#

The MCP server uses the same API keys as the Public API, sent the same way:

Authorization: Bearer bc_live_<id>_<secret>

Every request to /mcp is authenticated on its own. A missing or invalid key gets 401 before any MCP handling (see HTTP errors).

A key belongs to one business and always acts as that business. Tools have no business argument: an agent can't pass one, and a tool call that tries is rejected as an unknown argument. Any resource constraints set on the key, such as a limit to certain teams, apply to tool calls exactly as they do to direct API calls.

Scopes#

The key's scopes decide which tools the agent gets:

Grant the narrowest set that does the job. For an agent that should only look things up, grant :read scopes only: no write tools will appear at all.

ScopeUnlocks tools in
nonegetCapabilities, available to every key
contacts:read, contacts:writecontacts and contact-attributes
products:readproducts
sessions:read, sessions:writesessions
teams:read, teams:writeteams (listTeamMembers also needs users:read)
templates:readtemplates
topics:read, topics:writetopics
users:read, users:writeusers
work-items:read, work-items:writework-items and work-items-setup

Scopes can't be changed after a key is created. To change what an agent can do, create a new key and update the client's configuration.

Keeping the key safe#

🔑

Your key grants access to your business's data. Treat it like a password.

Tool groups#

The client loads every tool's name, description and input schema into the AI model's context. The full catalogue is large, and a long tool list takes up context and makes the right tool harder for the model to pick. Tool groups let you load only the part you need.

Choose groups with the groups query parameter on the server URL, as a comma-separated list:

https://api.businesschat.io/mcp                                 default groups
https://api.businesschat.io/mcp?groups=contacts,sessions        just these two
https://api.businesschat.io/mcp?groups=all                      every group
⚠

Groups are not access control. Anyone with the key can connect with ?groups=all. What a key can do is decided only by its scopes. Groups only control how many tools are loaded into the model's context.

Available groups#

Counts are for a key with every scope. Your key sees only the tools its scopes allow. Groups follow the sections of the API reference, and new API operations appear as tools in their group automatically.

GroupToolsCovers
capabilities default1getCapabilities: the scopes, limits and constraints of your key
contacts default28Contacts: list, search, get, create, update, batch upsert, block, opt in and out, their sessions, attribute values, tags and tag groups, and imports
sessions default5List and search sessions, get a session, assign it, close it
templates default1List approved WhatsApp message templates
work-items default17Work items themselves: list, get, create, update, assign, transition, promote, reopen, and their tags
work-items-setup46Work item configuration: calendars, fields, statuses, tag groups and types
contact-attributes10The contact attribute catalogue: define, rename, archive and restore attributes, and manage their options
products2List products, get a product from your synced catalogue
teams4List teams, get a team, list and add team members
topics10List, get, create, update, archive and restore topics; add a topic to a contact or session; list and remove a session's topics
users3List users, get a user, update a user's roles

The default groups hold 52 tools and all holds 127. There is no messages group: see Not available.

Choosing groups#

The groups are part of the server URL, so changing them means changing the URL in your client and reconnecting. In Claude Code, run claude mcp remove businesschat and add it again with the new URL.

How tools work#

Each tool maps one-to-one to a Public API operation and is named after its operation id: listContacts, getSession, transitionWorkItem. The tool's description is the operation's description from the API reference. Parameters, fields and error codes are documented there, under the API tab.

Arguments#

The agent fills in tool arguments from each tool's input schema. They map onto the API request like this:

ArgumentBecomes
Path and query parametersThe same parameter, under its API name, for example id, limit, cursor. Values must be a string, number or boolean.
bodyThe JSON request body, for operations that take one.
idempotency_keyThe Idempotency-Key header, for write operations that accept one. The same key with the same body replays the original result instead of repeating the write, for 24 hours.

For example, a call to createTopic looks like this:

{
  "idempotency_key": "create-topic-vip-2026-09-14",
  "body": { "name": "VIP", "color": "#1d4ed8" }
}

An argument the tool doesn't define is rejected, not ignored. The error lists the arguments the tool accepts, so the agent can correct the call. A missing required argument is rejected the same way.

Read-only and destructive tools#

Every tool carries hints that clients can use to decide when to ask you before running it:

Every other tool changes data. How hints are used depends on the client; Claude Code asks for permission before it runs a tool, unless you've allowed it.

Results#

A successful call returns the API response body as JSON text, exactly as the API would return it. Lists use the API's usual envelope, so the agent pages by passing next_cursor back as the cursor argument.

A failed call returns a tool result marked as an error (isError: true) containing HTTP <status> and the API's error body, so the agent can read the error code and react. See Tool errors.

Not available#

Sending WhatsApp messages is not available, over MCP or through the Public API.

The server offers tools only. It has no MCP resources or prompts.

Limits & behaviour#

Rate limits#

Two limits apply, both per minute:

LimitCountsSize
API limitEvery tool call, as one API request. It is the same per-business limit your other integrations use, so they share it.Your business's API limit (getCapabilities reports it)
MCP message limitEvery request to /mcp: connecting, listing tools and calling tools. Counted per key.Twice your business's API limit

The MCP message limit is set higher so that connecting and listing tools never run out before tool calls do. In practice the API limit is the one you'll hit.

Timeouts & response size#

Filters and a smaller limit fix both. List operations clamp limit to their maximum rather than rejecting it.

No sessions#

The server is stateless. Each message is a single POST /mcp answered with one JSON response. There is no session id, no event stream (GET /mcp returns 405) and no notifications from the server, so reconnecting loses nothing. Batched JSON-RPC requests aren't supported: send one message per request.

An Idempotency-Key header on the /mcp request itself is ignored. To make a write safe to retry, use the tool's idempotency_key argument.

Browser clients#

Requests that carry a browser Origin header are refused with 403 Forbidden: Origin not allowed. This protects your key against malicious web pages. Connect from a command-line, desktop or server-side client, which don't send Origin. Your key shouldn't be in a browser anyway.

Errors#

A problem shows up in one of three places, depending on how far the request got.

HTTP errors#

The request was refused before MCP handling. Clients usually report these as a failed connection.

StatusBodyMeaning
401authentication_requiredNo Authorization header, or it isn't Bearer <key>.
401invalid_api_keyThe key is unknown, malformed, revoked or expired.
429rate_limit_exceededOver the MCP message limit. Wait for Retry-After.
403JSON-RPC -32600 Forbidden: Origin not allowedA browser Origin was sent. See Browser clients.
400JSON-RPC -32700 Parse error or -32600 Invalid RequestThe body isn't a single JSON-RPC message (including batches).
415JSON-RPC -32600The body isn't UTF-8 JSON.
405—Not a POST, for example a GET from a client expecting an event stream.

JSON-RPC errors#

The request reached the server, but it refused the tool list or the tool call itself, so no API request was made. These come back with HTTP 200 and a JSON-RPC error:

CodeMessageWhat to do
-32602Unknown tool: <name>No such tool. Check the name against the tool list.
-32602Tool '<name>' is in the '<group>' tool group, which this connection did not select…Add that group to ?groups= and reconnect.
-32602Unknown tool group(s): … Known groups: …Fix the groups value in the URL.
-32602Invalid params: tools/call requires a non-blank string 'name'…A malformed call from the client.
-32003insufficient_scope: tool '<name>' requires scope(s) '…'The key lacks a scope. The error data's required_scopes lists what's needed. Create a key that has it.
-32601Method not found: <method>The client used an MCP method this server doesn't offer.
-32603Tool catalog temporarily unavailable. Retry shortly.A temporary problem on our side. Retry.
-32603Internal errorSomething went wrong on our side. Retry, and report it if it persists.

Tool errors#

The tool ran but didn't succeed. The result is a normal tool result with isError: true, and the agent sees the text and can usually correct itself.

TextMeaning
HTTP <status> followed by the API's error body, for example HTTP 404 with the code not_found and the message Contact not foundThe API request was made and returned an error. The code is documented in the API reference.
HTTP 429: rate limit exceeded. Retry after N seconds…Over the API limit. Wait and retry.
Unknown argument(s): … This tool accepts: …
Missing required argument(s): …
Argument '…' must be …
The arguments didn't fit the tool. No API request was made.
The BusinessChat API did not answer in time…
…response is too large to return…
See Timeouts & response size.
The BusinessChat API call failed. Retry shortly.
The BusinessChat MCP server is still starting. Retry shortly.
Temporary. Retry.

Reporting a problem#

Every /mcp response carries an X-Request-Id header. Quote it to BusinessChat support, and we can find that request and the API request its tool call made. If your client doesn't show response headers, send the time (with time zone), the tool name and the name of the key you used instead. Never send the key itself.

Troubleshooting#

SymptomWhere to look
The server shows as failed, or the client asks you to sign inThe key isn't reaching the server. Check the header is exactly Authorization: Bearer <key>, with the Bearer prefix and no quotes or spaces inside the key, and that the key hasn't been revoked. The server has no OAuth sign-in, so a client that only offers sign-in can't connect.
A tool you expect isn't listedEither its group isn't selected or your key lacks its scope. Ask the agent to call getCapabilities to see the key's scopes, and check the group table.
Almost no tools are listedThe key's scopes don't match the default groups. For example, a key with only products:read sees just getCapabilities until you add ?groups=products.
Changed ?groups= but the tool list didn't changeThe client is still using the old URL. Update it and reconnect: in Claude Code, remove the server and add it again.
The agent is slow to choose tools, or picks the wrong oneToo many tools are loaded. Narrow the groups to the task.
There's no tool to send a messageIntentional. See Not available.
403 Origin not allowedA browser-based client. Use a command-line, desktop or server-side client. See Browser clients.
Tool calls return HTTP 429Your business's API limit is shared with every integration using its keys. Wait for the stated time, and reduce parallel calls. getCapabilities shows the limit.
Tool calls time out or are too largeAsk for less: use filters and a smaller limit, and page with cursor.

To test the key and URL outside your client, list the tools with curl:

curl -X POST 'https://api.businesschat.io/mcp' \
  -H 'Authorization: Bearer bc_live_<id>_<secret>' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

A 200 with a tools array means the key and URL work, and the problem is in the client's configuration.