mcp_server tool connects an agent to a remote Model Context Protocol server. Each server tool you allow becomes one function the agent can call. The same egress rules apply as for HTTP tools.
Create a server tool
POST /v1/tools
To check a server before saving it, call
POST /v1/tools/mcp/probe.
Sign in with OAuth
If the server needs sign-in, connect it from the agent’s Tools step. Kallabot follows the MCP authorization spec:- It finds the authorization server from the server’s protected resource metadata (RFC 9728).
- It uses OAuth 2.1 with PKCE (
S256). A server that doesn’t supportS256is refused. - It identifies itself with a client ID metadata document, a pre-registered client, or dynamic client registration (RFC 7591), in that order.
- It sends the
resourceparameter (RFC 8707) and checks theissin the response (RFC 9207).
mcp_oauth credential and refreshed automatically. If the refresh is refused, the server shows Needs sign-in and its tools are left out of calls until someone reconnects.
Choose the tools
There are two lists. A tool must be on both to reach the agent.- The server tool’s
allowed_tools: the ceiling for the workspace. - Each agent’s
tools[].allowed_tools: what that agent may use.
destructiveHint is off unless you name it. An agent gets at most 24 MCP functions in total.
Review and re-approval
Kallabot fingerprints the server’s tool list: each tool’s name, description, input schema and annotations. When you first connect, that list is approved. If the server later changes its list (a new tool, a changed description or schema), the fingerprint no longer matches and the server needs review. Until someone approves it, its tools are left out of every call. This stops a server from quietly changing what your agent is told to do.POST /v1/tools/{id}/discoverreads the server’s current tools.- Check the list.
POST /v1/tools/{id}/approve-toolswith{"hash": "…"}approves exactly that list. If the server changed again since you looked, the API answers409withdiscovery_changedand thecurrent_hash.
Annotations and side effects
Kallabot reads each server tool’s annotations:readOnlyHint, destructiveHint, idempotentHint and openWorldHint.
A server tool is treated as a side effect when it is not marked readOnlyHint and either it is marked destructiveHint or the server tool has side_effect set. Side-effect tools follow the idempotency rules.
Retries
Kallabot never retries a server tool blindly.- A read-only tool (
readOnlyHint: true) may be retried once. - Any tool may be retried once if the request was never written (no session yet, or the stream was already closed).
- A tool that is not read-only is never retried after the request was written. If the connection closes or times out with no answer, it returns
indeterminate. The agent tells the person it will confirm instead of trying again.
Errors
See MCP tools on the errors page. Error text from the server reaches the model asdetail, up to 500 characters.