Add tools from MCP servers
An MCP server is the quickest way to give agents a tool of your own, such as looking up a customer in your CRM, without writing an extension. The mcp package runs the server, or reaches it over HTTP, and turns each tool you list into a toolbelt operation such as mcp.crm.lookup_customer. Every executor that reaches the toolbelt gets it: Claude Code, Codex, the Chat Completions executor and shell scripts. Grants, gates and run history apply as they do to any other operation, and the server’s secrets reach the server, never the model.
The MCP bridge is the design record.
What you need
Section titled “What you need”- The package. Homebrew, the release archives and the install script bundle it in
extensions/mcp/. Check it’s there withopen-conduit extension list. A source build brings no packages: runmake packagesand thenopen-conduit extension install dist/packages/mcp(install). - For a local server, a sandbox. A server you run as a command runs in a process sandbox. Set up
srtas Sandbox your agents describes;open-conduit doctorsays whether it can isolate here. - The server’s tool list. You list each tool you take, with its description and input schema exactly as the server gives them. The MCP Inspector (
npx @modelcontextprotocol/inspector) shows them: connect it to the server, choose List Tools, and copy each tool’sdescriptionandinputSchema.
A local server
Section titled “A local server”Store the server’s credentials as a secret:
open-conduit secret set crm_tokenName the secret in the scope’s secret_refs, with the reference secret set printed, and add an entry to the scope’s extensions:
{ "name": "crm", "type": "mcp-stdio", "secret_names": ["crm_token"], "config": { "command": ["npx", "-y", "@acme/crm-mcp"], "secret_env": { "CRM_TOKEN": "crm_token" }, "tools": [ { "name": "lookup_customer", "description": "Look up a customer by ID. Returns their name, plan and account owner.", "input_schema": { "type": "object", "properties": { "id": { "type": "string" } }, "required": ["id"] }, "retry_safe": true } ] }, "sandbox": { "provider": "srt", "config": { "write": ["~/.npm"], "network": { "allow": ["registry.npmjs.org", "api.acme-crm.com"] } } }}commandis the server’s argv. It runs in a fresh directory of its own, which the policy’s{workspace}and{run}both name and which is always writable.secret_envsets a variable from a secret the entry selects.envsets plain ones. The server also seesPATH,HOME,LANGandLC_ALL, and nothing else of the daemon’s environment.sandboxis the policy, as a binding’s is (the policy). Allow only the hosts the server needs: here npm, to fetch the package, and the CRM’s API. A server that tries to reach anything else is refused by srt’s proxy.
The server starts on the first call and is kept running for later ones. It is restarted when you change its entry and stopped when you remove it.
A remote server
Section titled “A remote server”A server you reach over HTTP needs no sandbox, since nothing runs on your machine:
{ "name": "crm", "type": "mcp-http", "secret_names": ["crm_token"], "config": { "url": "https://mcp.acme-crm.com/mcp", "bearer_secret": "crm_token", "tools": [ … ] }}bearer_secret sends a secret as Authorization: Bearer …. A server that wants another header takes secret_headers, a map from header name to secret name, and plain ones take headers. The URL must be https.
Which MCP revision
Section titled “Which MCP revision”You don’t choose one. The bridge asks each server, local or remote, which revisions it speaks, and uses MCP 2026-07-28 when the server offers it and 2025-06-18 or the server’s own older revision when it doesn’t. Servers on either work the same way: pinning, retries, secrets and the sandbox don’t change. Revisions has the detail.
Grant the tools
Section titled “Grant the tools”Each tool is the operation mcp.<entry>.<operation>: here mcp.crm.lookup_customer. Grant it by name, or grant every tool of the entry with the toolset @mcp.crm.tools, in the scope’s authorization.operations and the binding’s operations:
"operations": ["read_context", "wait", "declare_outcome", "@mcp.crm.tools"]open-conduit config check resolves the grant from the entry’s tool list without starting the server.
A tool whose server name isn’t a valid operation name, such as lookupCustomer, takes "operation": "lookup_customer". A tool can join a toolset of its own with "toolset": "read", granted as @mcp.crm.read, instead of tools.
Wait on a server’s events
Section titled “Wait on a server’s events”A server on MCP 2026-07-28 that offers the events extension can tell an agent when something happens: an email arriving, an incident opening. List each event type you take in the entry’s events, with its description and schemas exactly as the server’s events/list gives them:
"events": [ { "name": "email.received", "description": "Fires when a new email arrives in the inbox", "input_schema": { "type": "object", "properties": { "from": { "type": "string" } } }, "payload_schema": { "type": "object", "properties": { "subject": { "type": "string" }, "from": { "type": "string" } } } }]Each becomes a wait, mcp.<entry>.<operation>_wait: here mcp.mail.email_received_wait. Grant them all with @mcp.mail.events. An agent calls it with a reason, the event’s arguments and optionally until, ends its turn, and is resumed with the event when it comes. It never handles a subscription, a cursor or a secret. An entry can list events without any tools.
How the events arrive is the bridge’s choice:
- Webhook, for an
mcp-httpentry when the server offers it and Open Conduit has anhttpspublic URL (settings.webhooks.public_url, or a tunnel’s). The bridge makes a signing secret, gives the server a callback beneath/mcp/events/, and checks every delivery’s signature and time before accepting it. - Poll otherwise, as for every
mcp-stdioserver, at the interval the server asks for.
Limit an event to one with "delivery": ["poll"] or ["webhook"]. The subscription is refreshed only while an agent waits on it, or a standing subscription holds it, and let go once neither does.
The agent is also resumed, rather than left waiting, when the server says it may have skipped events (it is told to check with the server’s tools), and when the subscription ends: the server ended it, or changed or dropped the event. An event the server changes is refused as drifted, as a tool is, until you re-apply its description and schemas.
Start Work from a server’s events
Section titled “Start Work from a server’s events”A wait is for an agent already working. To have each occurrence start Work, as a webhook does, subscribe on a standing basis in the entry’s subscriptions, and add an mcp-event route:
"subscriptions": [ { "event": "email.received", "arguments": { "from": "ops@example.com" }, "correlation_key": "/thread_id" }]{ "name": "ops-mail", "handler": "mcp-event", "binding": "triage", "config": { "entries": ["mail"] } }event names one of the entry’s events, and its arguments are checked against the event’s input schema when you check the config. The subscription opens when you apply the config, is kept open for as long as it stays there, and is let go when you remove it. Without correlation_key, each occurrence is Work of its own. With it, a JSON pointer into the occurrence’s data, occurrences with the same value (the same email thread here) reach the same Work, and once that Work has finished the next one starts a successor. The route’s entries and events limit what it takes; leave them out to take every standing subscription in the scope.
If the server ends the subscription, or changes or drops the event, it stays ended rather than being retried. open-conduit doctor reports it with the reason (the mcp-subscriptions check), and doctor --check-secrets also asks the server whether each event still matches what you pinned (mcp-subscriptions-drift). Review the change, update the event’s description and schemas, and apply the config to open it again. A subscription on an inherited entry is opened in each scope that inherits it.
Long-running tools
Section titled “Long-running tools”A tool that takes minutes, such as a deploy or a build, would otherwise hold the agent’s call for up to timeout_seconds or fail. If the server is on MCP 2026-07-28 and offers the tasks extension, mark the tool "task": true:
{ "name": "deploy", "description": "Deploy a commit to production.", "input_schema": { "type": "object", "properties": { "sha": { "type": "string" } } }, "task": true}The server can then run a call as a task. When it does, the call returns at once, saying the tool is running. The tool also gains a wait, mcp.<entry>.<operation>_wait (here mcp.ci.deploy_wait), in the same toolset, so @mcp.ci.tools grants both. When the agent needs the result, it calls the wait with a reason, the task the call answered with (which can be left out when only one is running), and optionally until, and ends its turn. The bridge checks the task at the interval the server suggests and resumes the agent with the tool’s result once the task ends. If the task fails, the agent gets the server’s error instead.
- A server that answers the call straight away, or doesn’t offer tasks, answers it as any other call is answered.
- If the agent’s Work ends first, for example because it is cancelled or times out, the bridge asks the server to cancel the task.
- The bridge can’t answer a task that asks for input. It cancels that task and tells the agent why.
- A retry follows the same rules as any other call: a task tool that isn’t
retry_safenever starts a second task for the same request.
When the server changes a tool
Section titled “When the server changes a tool”The tool’s description and schema in your config are what you approved. Before every call, the bridge checks that the server still offers the tool with exactly that description and schema. If the server has rewritten the description, changed the schema or dropped the tool, the call is refused as drifted and the server isn’t called. That matters because a description is text the agent reads as instructions.
To accept the change, look at the new description and schema in the Inspector, copy them into the entry, and apply the config. A tool the server adds is never offered until you list it.
Retries
Section titled “Retries”A call can be cut off after the server got it and before its answer was recorded. By default the bridge never sends such a call again: a retry with the same request is refused as unknown_outcome, and the agent is told to check before asking again. A retry that comes after the answer was recorded gets the same answer without reaching the server. Mark a tool "retry_safe": true when sending it twice does no harm, such as a lookup or a search, and it is sent every time. A call that became a task answers a retry that it is running, without starting a second task.
If you load MCP servers into Claude Code
Section titled “If you load MCP servers into Claude Code”Unless a binding sets strict_mcp, Claude Code also loads the MCP servers in your own Claude settings. Those calls don’t go through the toolbelt: Open Conduit doesn’t see them, check them or record them, and the server’s credentials sit in the agent’s config. Move the server to an mcp-stdio or mcp-http entry instead, and set "strict_mcp": true on the binding so it loads only the toolbelt.
When a call fails
Section titled “When a call fails”| Error | What to do |
|---|---|
drifted |
Review the server’s change and re-apply it (above). |
sandbox_refused |
The policy refused the launch: the message names what. Check open-conduit doctor and the policy. |
server_unavailable |
The server didn’t start or answer. Run its command, or reach its URL, by hand to see why. A secret it needs may have no value in the scope. |
tool_error, tool_failed |
The tool or the server refused the call, or the server asked for input the bridge can’t give. The message says which. |
invalid_tool |
The server’s schema for the tool marks an argument as an HTTP header in a way MCP 2026-07-28 doesn’t allow. The server has to fix its schema; until it does the tool can’t be called over HTTP. |
unsupported |
A wait on a server that doesn’t offer events, or on an event that can’t be delivered here: one the server offers only by webhook, from a stdio entry or without an https public URL. |
invalid_arguments |
The wait’s arguments don’t match the event’s input schema, or the server refused them. |
no_task |
A tool’s wait was called with no task to wait on: the Work hasn’t called the tool, the server answered at once with the result, or task names a task none of its calls started. |
ambiguous_task |
The Work has several of the tool’s tasks running, so the wait has to name one with task. |