# MCP server and tools

> The bridge as an MCP server for your tools, and tenant MCP servers as tools for Dot.

URL: https://chatwork.io/en/docs/mcp
Section: Platform

## The bridge as an MCP server

Discovery is public: `GET https://chatwork.io/mcp` or `/.well-known/mcp.json` returns the server info and the tool manifest. Calls (`POST /mcp`, streamable HTTP, JSON-RPC 2.0) need a bearer key.

| Tool | Tenant key | Admin key |
|---|---|---|
| `list_chatwoot_conversations` | own inbox | any tenant (`slug` required) |
| `get_conversation_messages` | own inbox | any tenant (`slug` required) |
| `list_saas_tenants` | own tenant | all |
| `send_reply_to_conversation` | — | yes (sends to the customer on X conversations) |
| `toggle_conversation_status` | — | yes |
| `ask_dot_wdeftksa` | — | yes |

Tool-level denial is JSON-RPC error `-32001 "unauthorized"`; bad arguments are `-32602`. Tool names are a public contract; renaming one breaks MCP clients.

## Tenant MCP servers as tools for Dot

A tenant may configure `mcp_url` (https, public address, SSRF-guarded) and an auth header. The bridge runs `initialize → tools/list`, caches the tools for five minutes and passes them to the model as functions; each `tools/call` runs on the tenant's own server, isolated per tenant. `enabled_tools` narrows the list.

Built-in tools are added per tenant state: `lookup_order` appears only when a Salla or Zid store is linked and active, and answers only for the verified contact. Agent definitions list the built-in tools they rely on; tenant MCP tools remain available to every agent.
