The MCP bridge
The MCP bridge lets an operator give agents their own tools without writing an extension. An entry names an MCP server, either a command or a remote URL, and lists the tools to take from it. Each tool becomes a toolbelt operation such as mcp.crm.lookup_customer, with the input schema the server gives it. Every executor that reaches the toolbelt gets these tools, whether it is Claude Code, Codex, the Chat Completions executor or a shell script. Authority, secrets, gates and the trail stay at the host.
The alternative, an operator’s MCP servers loaded straight into Claude Code (as a binding without strict_mcp does), bypasses all of that. Those calls are invisible to Open Conduit and unchecked by it, the server’s secrets sit in the agent’s config, and other executors don’t get the tools.
The bridge is the bundled package extensions/mcp, served as open-conduit extension-run mcp. It is built on public contracts any installed package can use: entry operations, calls and waits, and entry sandboxes, and for events and tasks translated waits with a dependency, ingress sources and families, a webhook path, a planned task and its KV. Nothing in the core knows about MCP.
Entry types
Section titled “Entry types”| Type | Server | Sandbox |
|---|---|---|
mcp-stdio |
command, run as a local process speaking MCP over stdin and stdout |
required |
mcp-http |
url, a remote server speaking MCP’s streamable HTTP transport |
not allowed: nothing runs locally |
The type declares its sandbox mode in the manifest (extensions[].sandbox), so config check refuses an mcp-stdio entry without a sandbox (sandbox_required) and an mcp-http entry with one (unsupported_sandbox).
Both take tools, the list of tools taken from the server, events, the list of event types taken from it (an entry lists tools, events or both), and timeout_seconds (default 60), which bounds a call and the server’s start. mcp-stdio takes env and secret_env, a map from variable to secret name. mcp-http takes headers, secret_headers (header to secret name) and bearer_secret, a secret sent as the bearer token. Every secret named must be one the entry selects in secret_names. url must be https, or http to a loopback address, since the server may be sent the entry’s secrets.
Tools become operations
Section titled “Tools become operations”Each tool in tools is:
| Field | Meaning |
|---|---|
name |
The server’s name for the tool. |
operation |
The operation’s name within the entry, default name. Needed when the server’s name isn’t a name segment (a lower-case letter, then letters, digits, - or _), such as lookupCustomer. |
description |
The tool’s description, exactly as the server lists it. |
input_schema |
The tool’s inputSchema, exactly as the server lists it. |
summary |
The operation’s one-line summary. Default: the description’s first line, cut to 200 bytes. |
toolset |
The toolset within the entry the operation joins, default tools. |
retry_safe |
Whether a call may be sent again when its outcome wasn’t recorded. Default false. |
task |
Whether a server that offers MCP Tasks may run a call as a task. It also gives the tool the wait operation <operation>_wait, in the same toolset. Default false. |
The package answers validate with one entry operation per tool, read from the config alone, so config check resolves grants without starting a server. The operation is mcp.<entry>.<operation>, with the description as its guidance and the pinned schema as its input. @mcp.<entry>.tools grants every tool of an entry that keeps the default toolset.
The operator lists the tools. A tool the server offers but the entry doesn’t list is never an operation, so a server that adds a tool grants nothing.
Pin what was approved
Section titled “Pin what was approved”The entry’s config is the record of what the operator approved: each tool’s description and input schema. A description is prompt text the agent reads as guidance, so a server that rewrites it quietly could steer the agent. The bridge therefore lists the server’s tools before every call and compares the tool with the pinned one. The description must be identical, and the schema must be the same JSON (key order aside). A tool whose description or schema has changed, or that the server no longer offers, is refused as drifted without being called. The refusal lasts until the operator reviews the change and re-applies the entry’s config with the new description or schema.
The bridge lists before each call rather than caching the list, so a change is caught on the next call whether or not the server sends notifications/tools/list_changed. The cost is one extra round trip per call.
Retries
Section titled “Retries”The toolbelt replays a committed result for a retried request_id within an execution, but it can’t make the downstream server idempotent. A call cut off after it reached the server and before its result was recorded would be sent again. So every tool declares whether that is safe, and by default it isn’t.
For a tool without retry_safe, the bridge marks the request in its KV (mcp.calls, keyed by scope, entry, operation and request ID) before sending it, and records the outcome once it has one:
- The same request again, once its outcome is recorded, gets the same answer without reaching the server. A result larger than 256 KiB isn’t kept, so its repeat is refused as
already_done. - The same request again while the mark has no outcome, because the call went out and nothing came back, is refused as
unknown_outcome. The agent is told to check the system the tool acts on before asking again with a new request. - A call with no request ID isn’t marked.
- A call that became a task records the task’s ID with its mark, and its outcome is the answer that the call is running. The same request again gets that answer, so it never starts a second task. A call cut off before the server’s answer came back is
unknown_outcome, as any other is, so it isn’t sent again either, even if the server started a task for it.
A tool marked retry_safe is sent every time. A task, mcp-sweep-calls, deletes marks older than seven days every hour.
Revisions
Section titled “Revisions”The bridge speaks MCP 2026-07-28 to a server that offers it, and 2025-06-18 (or an older revision the server answers with) to one that doesn’t. It finds out when it starts a session, on whichever transport:
- It sends
server/discover. A result whosesupportedVersionslists2026-07-28makes the session a 2026-07-28 one, and the server’s extensions are read from itscapabilities.extensionsand kept with the session. An event wait needs the server to offer Events (io.modelcontextprotocol/events), and a task needs it to offer Tasks (io.modelcontextprotocol/tasks). - Anything else means the server speaks an older revision, and the bridge initializes it:
initializeasking for 2025-06-18, thennotifications/initialized. That covers a JSON-RPC error of any code, an HTTP error status without one, a result that doesn’t list 2026-07-28, and no answer within five seconds, since a server of an older revision may ignore a request it doesn’t know beforeinitialize. - The one exception is an unsupported-version error (
-32022) whosesupportednames only later revisions. Initializing such a server can’t work, so the call fails asserver_unavailableand the message names its revisions.
A 2026-07-28 session is stateless. Every request names the revision, the client and its capabilities in params._meta (io.modelcontextprotocol/protocolVersion, …/clientInfo and …/clientCapabilities). The bridge declares no capabilities except two extensions: Events, on its own events/* requests, and Tasks, on tasks/* requests and on a tools/call that may become a task. There is no initialize, no session ID and no notification but notifications/cancelled, which only stdio carries.
Everything above is the same in both: the bridge still lists before each call, pins, guards retries and refuses redirects. A session is kept per entry, as before; for a 2026-07-28 server it holds only the revision and the extensions.
A 2026-07-28 server may answer a call with resultType: "input_required", asking the client for input before it completes. The bridge declares no capabilities, so it has none to give, and the call fails as tool_failed.
The stdio server and its sandbox
Section titled “The stdio server and its sandbox”An mcp-stdio server is user-supplied code running on the operator’s machine, so it runs in the sandbox its entry names, through the host. The bridge asks for the launch with sandbox.entry_plan, giving the entry’s scope and name, the command and the environment. The host plans it with the provider and policy from the entry’s own sandbox (an srt policy, say), never one the package chooses, with its protected set denied. It makes a fresh directory for the process beneath <state>/entries/mcp/runs/, which is both the process’s working directory and its run directory (entry processes). The bridge runs exactly the plan’s argv and environment there.
The server’s environment is PATH, HOME, LANG and LC_ALL from the daemon, the entry’s env and its secret_env resolved from the scope’s secrets, and nothing else of the daemon’s. Secrets reach the server, never the model or the agent’s process. They are resolved on every call, and a server started with other values than the scope now holds is started again, so a rotated secret is used from the next call and a revoked one stops the calls. Network access is whatever the sandbox policy allows: srt denies every host its network.allow doesn’t name.
The bridge keeps one server per entry in each scope. It starts the server on the first call and keeps it for later ones. A server whose entry’s config has changed is stopped and started again on the next call, and a server whose entry is gone is stopped when the package is configured. Stopping closes the server’s stdin and kills it if it hasn’t exited within two seconds. A server stays in the package’s process group, so the host’s kill of an unresponsive package’s group takes its servers with it. On Linux each is also started with a parent-death signal, from a thread kept for the process’s life, so it dies with the package however the package dies. The server’s directory is removed when it exits. The server’s stderr isn’t kept, since it may print what the server was given. A restarted daemon clears <state>/entries, and the bridge starts servers afresh.
The bridge answers requests the server sends it on stdout, as a server of an older revision may: ping, and a method-not-found error for anything else (sampling, elicitation, roots), since it offers the server no client capabilities. A 2026-07-28 server sends none.
Remote servers
Section titled “Remote servers”An mcp-http entry’s server is reached over MCP’s streamable HTTP transport. Each message is a POST with Accept: application/json, text/event-stream. A response may be JSON or an event stream, and the bridge reads the stream until the response it is waiting for arrives. A 4xx whose body is a JSON-RPC error is read as that error, as a 2026-07-28 server answers a request it refuses before acting on it. A 5xx is server_unavailable whatever its body, since the server may have failed partway through a call, so a call that isn’t safe to retry keeps its outcome unknown.
- On 2026-07-28 every request carries
MCP-Protocol-Version,Mcp-Method(the request’s method) and, ontools/calland theevents/*requests that name an event,Mcp-Name(the tool’s or event’s name), matching the body, as the revision requires. An argument the tool’s input schema marks withx-mcp-headeris sent as anMcp-Param-<name>header too: a string as it is, an integer in decimal, a boolean astrueorfalse, and a string that isn’t plain printable ASCII, or has leading or trailing whitespace, as=?base64?…?=. An argument the call leaves out, or gives as null, sends no header. A schema whose marks break the revision’s rules (a name that isn’t an HTTP token or appears twice regardless of case, a mark on a value that isn’t a string, integer or boolean, or one reached through anything butproperties) is a tool the revision says a client must not call, so the call is refused asinvalid_tooland never sent. The bridge reads the marks from the pinned schema, which is the one the server listed, or the call isdrifted. An event’s subscription arguments are sent the same way, from its pinned input schema. - On an older revision the session ID the server assigns at
initialize(Mcp-Session-Id) and the negotiatedMCP-Protocol-Versiongo with every later request, and the session is ended with a DELETE when the bridge stops using it.x-mcp-headermarks are ignored.
The bridge opens no GET stream on an older revision, and no subscriptions/listen on 2026-07-28, because it needs no server notifications: it lists tools before each call. The bridge never follows a redirect, whatever client it is given: a redirect would send the entry’s secrets on, perhaps to another host or over plain http. A 3xx fails the call as server_unavailable. An error never includes the URL or the headers.
Events
Section titled “Events”An agent can ask for an outcome, wake me when this happens on that server, and never see a cursor, a webhook or a secret. The bridge holds the subscription. It speaks MCP’s events extension (io.modelcontextprotocol/events, SEP-3415) to a 2026-07-28 server that offers it.
Pin approved event types
Section titled “Pin approved event types”Each event type in events is:
| Field | Meaning |
|---|---|
name |
The server’s name for the event type, such as email.received. |
operation |
The name its wait is named for, default name with each dot an underscore (email_received). |
description |
The event’s description, exactly as events/list gives it. |
input_schema |
Its inputSchema: the subscription arguments. |
payload_schema |
Its payloadSchema: the data each occurrence carries. |
summary |
The wait’s one-line summary. Default: the description’s first line. |
toolset |
The toolset within the entry the wait joins, default events. |
delivery |
The modes the entry allows, webhook, poll or both (the default). |
Each becomes an entry operation of kind wait, mcp.<entry>.<operation>_wait, in @mcp.<entry>.events. An entry operation’s name can’t hold a dot, so the wait is <operation>_wait rather than <operation>.wait. An event type the entry doesn’t list has no operation, so it is never subscribed to. As with tools, the bridge reads events/list before it subscribes and refuses a wait as drifted when the server has changed the event’s description or either schema, or no longer offers it. It reads it again before each refresh, and ends the subscription when the event has drifted since.
The wait
Section titled “The wait”mcp.<entry>.<operation>_wait takes reason, one line on what the agent is waiting for, arguments, checked against the pinned input schema before anything is sent, and until, the latest to wait. The bridge checks the arguments against a subset of JSON Schema (type, enum, const, properties, required, additionalProperties, items, the length, size and pattern bounds, allOf, anyOf, oneOf and not), and the server checks them in full, refusing what it can’t take as invalid_arguments.
The wait joins the subscription for its scope, entry, event and canonical arguments, opening it if no wait holds one, and gets a correlation key of its own, a holder, on the entry’s ingress source. Its plan waits for mcp.event.woke, with one dependency on the holder’s key for mcp.event.occurred, mcp.event.skipped and mcp.event.ended, so the Work wakes with whichever comes first as its trigger. A fresh key per wait means a wait is never woken by an occurrence delivered before it waited, without the race a dependency’s from_now would have against a delivery that lands while the wait is being declared, and waits on the same event and arguments share one subscription without sharing a key. A wait that joins a poll subscription already open is marked as joined until the next poll: that poll starts from the cursor the subscription had before the wait, so it gives the joined wait only the occurrences whose timestamp is no more than five seconds before the wait (one whose time can’t be read is given to it), and every later poll gives it everything. A wait that joins while a poll runs is given what that poll brought on the same terms. The Wait’s description is the event in the server’s words: email.received on mail: Fires when a new email arrives in the inbox.
Delivery
Section titled “Delivery”The bridge picks the mode; the agent never chooses. Push (events/stream) isn’t used.
- Webhook is the first choice, for an
mcp-httpentry when the server and the entry allow it and Open Conduit has anhttpspublic URL (settings.webhooks.public_url, or a tunnel’s). The bridge mints a Standard Webhooks secret (whsec_and 32 random bytes), keeps it in its KV with the subscription, and callsevents/subscribewith the callback<public URL>/mcp/events/<subscription>, asking for an hour. The package serves that path, which its configure registers (lifecycle). A delivery is verified before anything is accepted:webhook-id,webhook-timestampandwebhook-signaturemust be present, one of the signature’sv1,values must be the HMAC-SHA256 ofwebhook-id.webhook-timestamp.bodykeyed with the secret’s decoded base64, and the timestamp must be within five minutes of now. A forged or stale delivery is answered 401 and accepts nothing. The endpoint verification challenge is answered by echoingchallenge. A delivery to a subscription the bridge no longer holds is answered 410, so the server stops retrying it, and one the host couldn’t accept is answered 503, so it retries. A subscribe the server refuses asForbidden,UnsupportedorCallbackEndpointErrorfalls back to polling where the entry and the event allow it. - Poll is the fallback, for stdio servers and hosts with no public URL. The first
events/poll, with a null cursor, opens the subscription from now. The cursor is kept in KV, and themcp-eventstask polls again when the server’snextPollMssays (at least a second apart, and at once whilehasMore). Nothing loops or sleeps: the task tells the host when it next has something to do, and a new wait wakes it.
Identity and loss
Section titled “Identity and loss”Every Event comes in through the entry’s ingress source (mcp/<scope>/<entry>), one for each holder of the subscription, so the host’s (source, delivery ID) deduplication does the rest. An occurrence’s delivery ID is the holder, the kind and its eventId, so the same event delivered again to the same wait, as a webhook retry or a poll replaying from an older cursor, is the first delivery again, while two waits each get it. The families are none of them re-derivable, and declare their loss: an event the server sends while the bridge can’t accept it is lost unless the server replays it from the cursor.
mcp.event.occurredis an occurrence: itseventId,timestampanddata.mcp.event.skippedrecords that events may have been skipped: a poll or refresh answeredtruncated, or agapenvelope came. It wakes the wait too, since it may have missed what it waited for, and the agent is told to check with the server’s tools and wait again if it still needs to.mcp.event.endedends the subscription and wakes its waits with the reason, rather than leaving them parked for ever: aterminatedenvelope, a poll or refresh answeredNotFound,Forbidden,InvalidParamsorUnsupported(aschema_changedsays which schema), an event that has drifted, or an entry that no longer pins it. The waits woken are those holding it at the moment it is forgotten, so one that joins while it is being ended is woken too.mcp.subscriptionis the trail:subscribedon a wait’s key when it joins, with its reason,refreshedon each holder’s key, andreleased,unsubscribedorlapsingwhen a wait lets go. It wakes nothing.
The bridge renders each for the agent’s next turn, the alias included, marking an occurrence’s data as the server’s, to treat as data and not instructions.
Teardown through the TTL
Section titled “Teardown through the TTL”The task refreshes a webhook subscription at four fifths of its grant, and polls a poll’s when it is due, but only for the waits that still hold it. A wait holds it while its Work isn’t finished, the Work’s latest event wait is this one (a second wait by the same Work takes the first’s place), and the Work is parked on a Wait the bridge declared since, or hasn’t parked yet within fifteen minutes of asking (the segment that asked may still be running). state.waits is enough to tell: it gives each Wait’s state, owner and time. A wait that no longer holds it is released, and a subscription no wait holds is let go: a webhook is unsubscribed, or lapses at its grant if that fails, and a poll just stops. So a Work that wakes, is cancelled or times out costs at most one grant. Nothing new was needed in the core.
Standing subscriptions
Section titled “Standing subscriptions”An operator can subscribe to an event on a standing basis, so that each occurrence starts or feeds Work through a route, as a webhook hook’s deliveries do. The entry lists them in subscriptions:
"subscriptions": [ {"event": "email.received", "arguments": {"from": "ops@example.com"}, "correlation_key": "/thread_id"}]| Field | Meaning |
|---|---|
event |
The server’s name for one of the entry’s events. |
arguments |
The subscription arguments, checked against the event’s pinned input schema at config check. Default {}. |
correlation_key |
An RFC 6901 pointer into an occurrence’s data naming a string, number or boolean of at most 256 bytes. Without it, each occurrence is Work of its own. |
Two subscriptions on the same event and arguments are refused. The route is {"handler": "mcp-event", "config": {"entries": ["mail"], "events": ["email.received"]}}; either list limits the route, and empty takes every standing subscription of the scope’s entries. It creates Work of kind mcp.event.
A standing subscription is one more holder of the same subscription a wait would join, so it shares the pinning, delivery choice, identity, loss handling and refresh above. Its holder is standing/<subscription>, held for as long as the config lists it rather than while a Work waits:
- Opened on apply. Configure records the generation’s subscriptions and wakes the
mcp-eventstask, whose next pass adds the holder and opens the subscription, picking the mode fromevents/listas a wait does. A server it can’t reach is tried again, backing off, rather than ended. A wait that joins before then picks the mode itself. - Refreshed while configured. A webhook is refreshed at four fifths of each grant and a poll is polled when due, with or without a Work waiting.
- Let go when dropped. A config that no longer lists it makes the subscription due at once, so the next pass releases the holder and, if no wait holds it either, unsubscribes the webhook or stops polling.
Each occurrence is an mcp.event.occurred Event on a key of its own beneath the holder, standing/<subscription>/e/<digest of eventId>, or with a correlation key standing/<subscription>/c/<digest of the value>, carrying the value as correlation and the event’s pinned description. An occurrence whose data lacks the value is Work of its own. The route makes an occurrence on a key no Work owns into new Work, makes a later one on the same key that Work’s input, and once that Work has finished opens a successor (<Work>/g2, then /g3), so the key’s later occurrences reach it. It skips a wait’s occurrences, whose keys don’t begin standing/, every other family, and a key owned by another kind of Work.
A subscription the server ends (a terminated envelope, or a poll or refresh answered NotFound, Forbidden, InvalidParams or Unsupported) or that has drifted at a refresh or at opening is not silently retried. mcp.event.ended is recorded on the holder’s key, the trail, and the bridge keeps it in mcp.standing with the reason and a digest of the pinned event and subscription. It isn’t opened again until that digest changes: the operator re-pins the event or changes the subscription. Removing it from the config and adding it back also clears it. mcp.subscription steps (refreshed, released, unsubscribed) are on the same key.
Doctor’s mcp-subscriptions check lists each standing subscription with its state: open by poll or open by webhook, refreshed before <time>, opening (with the failures so far when the server can’t be reached), or ended at <time>: <reason>, and fails when one has ended. The deep mcp-subscriptions-drift check, which doctor --check-secrets runs, lists each entry’s events and fails on a subscription whose event has drifted from what the entry pins, or whose server can’t be asked. This catches drift a poll alone wouldn’t, since a poll doesn’t read events/list.
The task reconciles the standing subscriptions once for each generation configure gives, not on every pass. A wait that joins a standing subscription the task hasn’t opened yet, and fails to open it, takes only its own holder off: where the server couldn’t be reached the subscription is left to the task’s retries with its failures kept, and where the server refused it is ended and recorded as the task would end it.
The entry’s ingress source is its own in each scope the entry is in effect in, so an inherited entry’s standing subscriptions are opened in each scope that inherits it. Entries in a disabled scope aren’t configured, so their subscriptions are let go and opened again, from now, when the scope is enabled.
A tool can take longer than a call should block for: a deploy, a build, a report. MCP’s tasks extension (io.modelcontextprotocol/tasks, SEP-2663) lets a 2026-07-28 server answer such a call with a task, which the client follows with tasks/get. The bridge follows it, so the agent asks for the outcome: it copies the task value its call answered with into the wait, and can leave it out when only one task is running.
The call
Section titled “The call”A tool the entry marks task: true declares Tasks on its tools/call when four things hold: the call comes from a Work, the server offers Tasks, the host can accept Events for it, and the session is 2026-07-28. The server decides. It may answer at once with the result, as any call is answered, or with resultType: "task" and the task’s ID, status, ttlMs and pollIntervalMs. A task answer doesn’t block the call. The bridge records the task in its KV (mcp.tasks), keyed by scope, entry and the server’s task ID, with the Work that called it. It accepts a started Event on the task’s own key, wakes the mcp-events task, and answers the call with schema mcp.task.v1: the tool, its wait, the task’s status, and next, which tells the agent the call is running and to call mcp.<entry>.<operation>_wait when it needs the result. If the bridge can’t record the task, nothing would follow it, so it cancels the task and refuses the call as server_unavailable. A tool without task, a server without Tasks, or a call outside a Work, is answered synchronously as before.
An entry operation’s name can’t hold a dot, so the wait is <operation>_wait, as an event’s is. It must not collide with another of the entry’s operations, and config check refuses one that does.
The wait
Section titled “The wait”mcp.<entry>.<operation>_wait takes reason and until, as an event wait does, and task, the task the call answered with. Each call’s next names that task. The wait is for that call’s own task, so a Work that calls the tool twice waits for each result separately and neither is lost. task may be left out when the Work’s calls of the tool have started only one task. A wait that leaves it out when there are several is refused as ambiguous_task, with the tasks listed. A wait whose task none of the Work’s calls started, or a wait from a Work with no task, is refused as no_task. Its plan waits for mcp.task.woke, with one dependency on the task’s key for mcp.task.ended. The dependency isn’t from_now, so a task that ended before the agent waited wakes the wait at once with its outcome, and waiting again after waking does the same.
Polling
Section titled “Polling”The mcp-events task polls each task with tasks/get when it is due. It tells the host when it next has something to do, and never polls in a loop. A task is due at the server’s pollIntervalMs (at least a second apart, 30 seconds when the server names none). Each change of status, status message or lastUpdatedAt is accepted as a mcp.task.status Event on the task’s key. Once the task ends, its outcome is accepted as mcp.task.ended:
completedcarries the tool’s result underresult, shaped asmcp.result.v1(contentandstructured_content). A result whose tool reportedisErroris reported asfailed, with the tool’s result and its text as the reason. A result over 256 KiB isn’t carried, and is reported asfailed, saying so.failedcarries the server’s JSON-RPC error.cancelledsays the server cancelled it.- Given up on: reported as
failedwith the reason. This covers a task the server no longer knows (-32602, as for one that expired), any other error the server answerstasks/getwith, and a task still running after itsttlMshas run out, which the bridge cancels first. It cancels the task the same way, as it does one that asks for input, when the entry’s config no longer marks the tooltask, sofailedalways means the task isn’t running. The one exception is an entry that is no longer configured at all: the server can’t be reached to cancel the task, and the reason says so.
An outcome the host doesn’t accept is polled for again, with the backoff the bridge uses for a server it can’t reach (a minute, doubling to half an hour). The task is kept, done, until its Work ends, and is then forgotten.
A task whose status is input_required is asking the client to answer its inputRequests (an elicitation, say) with tasks/update. The bridge declares no capability to answer such requests, so nothing could answer them, and the task would wait for ever. Instead the bridge cancels the task and ends the wait as failed, saying the server asked for input it can’t give.
Cancellation
Section titled “Cancellation”A Work that ends while its task runs, because it was cancelled, timed out or finished, has the task cancelled on the next poll with tasks/cancel. The cancellation is recorded as a mcp.task.status Event (cancelled, or abandoned if the server couldn’t be reached), and the bridge stops polling. Cancellation is cooperative: the server may finish the task anyway, and nothing more is asked of it. A wait’s until passing doesn’t cancel the task, because the Work is still running and may wait again.
The bridge doesn’t use notifications/tasks. Those need a held subscriptions/listen stream, and polling covers everything the bridge needs.
What a call returns
Section titled “What a call returns”A successful call’s output has schema mcp.result.v1: content, the tool’s content blocks as the server returned them, and structured_content when it gave any. Refusals are operation errors with these codes:
| Code | Meaning |
|---|---|
undeclared |
The entry’s config doesn’t declare the operation. |
drifted |
The server no longer offers the tool as pinned. |
tool_error |
The tool reported an error (isError); the message is its text. |
tool_failed |
The server refused the call with a JSON-RPC error, or asked for input the bridge can’t give. |
invalid_tool |
The tool’s input schema marks an argument as a header in a way MCP 2026-07-28 doesn’t allow, so it isn’t called over HTTP. |
server_unavailable |
The server didn’t start, list its tools or answer. A call it didn’t answer may or may not have run. |
sandbox_refused |
The sandbox refused the launch (sandbox_denied or sandbox_unavailable), and nothing ran. |
unknown_outcome, already_done |
A repeat of a call that isn’t safe to retry (retries). |
A call that became a task returns at once with schema mcp.task.v1, saying it is running and naming its wait. A task wait’s plan output has the same schema; it is refused with undeclared, invalid_input, no_task and ambiguous_task.
An event wait’s plan output, also mcp.result.v1, says what it waits for and how it is delivered. A wait is refused with undeclared or drifted as a call is, and with invalid_input (its reason or until), invalid_arguments (arguments the pinned schema or the server refuses), unsupported (a server that doesn’t offer events, or an event neither mode can deliver here), forbidden and subscribe_refused (the server wouldn’t subscribe), invalid_event (its schema’s x-mcp-header marks) and server_unavailable.
Calls are ordinary toolbelt operations, so each appears in run history as a toolbelt.* record linked to its Work and Execution, with its grant check, any gate’s decision and its outcome, refusals included. The host logs each sandboxed launch with the entry, provider, plan digest and summary. An event wait is a Wait in run history, with the event in its description; each delivery is an Event on the wait’s key, linked by causation to the alias that woke the Work; and the subscription’s steps are mcp.subscription Events on the same key. A task’s trail is on its own key, beginning with the call that started it: mcp.task.status for the start, each status change and a cancellation, and mcp.task.ended for the outcome, which the alias that woke the Work names as its causation.
Limitations
Section titled “Limitations”- Only process sandboxes. An
mcp-stdioserver runs in a process sandbox provider such assrt. Entry processes can’t yet run in a container provider such as Docker. - Pinning is by hand. The operator copies each tool’s description and input schema from the server into the config, for example from the MCP Inspector, and copies them again to approve a change. There is no command that fetches and pins them yet.
- Tools and events only. MCP resources and prompts aren’t bridged, and a server’s requests to the client (sampling, elicitation, roots) are refused. On 2026-07-28 a server’s request for input before it completes a call fails the call.
- Push isn’t used. Push delivery (
events/stream) isn’t used. - A task can’t be given input. A task that asks for input is cancelled. Its completion is polled for, not pushed (
notifications/tasksisn’t used). - An ended standing subscription waits for the config. It opens again only once what it pins or its arguments change, or it is removed and added back.
- Webhooks need a public https URL. Without one, or for a stdio server, events are polled.
- The webhook secret is in the bridge’s KV. The host has no store an extension writes secrets to, so the secret the bridge mints is kept with its subscription. It never appears in an Event, a plan or a log.
- Arguments are checked against a subset of JSON Schema. The server checks them in full.
- A description is guidance. An operation’s guidance is at most 4096 bytes, so a tool whose description is longer is refused at config check.
Evidence
Section titled “Evidence”extensions/mcptests run a fake MCP server, the test binary itself, over stdio and anhttptestserver over streamable HTTP, each speaking either 2026-07-28 or only 2025-06-18. A call through the sandbox over stdio and a call over HTTP run against both: the session is in the server’s revision, a 2026-07-28 server’sio.modelcontextprotocol/eventsis recorded as offered, a 2026-07-28 request over HTTP carries the revision, method and tool name as headers and no session, and a 2025-06-18 server is initialized and its session kept. The fake 2026-07-28 server refuses a request without its_metaor with headers that don’t match the body, so the bridge can’t pass by speaking the old revision. They also coverserver/discover’s answers (a listed revision, one that isn’t listed, a method-not-found or other error, an HTTP error, only later revisions),x-mcp-header(values sent plain and in base64, none for a missing argument, the rules that refuse a tool, and no headers to an older server), a call that asks for input, and listing across pages, a call with content and structured content, a tool the server offers but the entry doesn’t list (undeclared, never sent), a rewritten description, a changed schema and a withdrawn tool (drifted, never sent, then accepted once re-applied), a reordered schema (no change), the sandboxed launch (the host is asked for the entry’s own launch, the server runs in the directory it made, inside its wrapper, with the entry’s secret and none of the daemon’s other variables), a refused sandbox (nothing runs), retries (a repeat answered from the mark, an unknown outcome refused, a retry-safe tool sent again, marks swept), the bearer token and session on HTTP, configure stopping a dropped entry’s server and removing its directory, a redirect whose target never sees the secret headers, a rotated secret relaunching the server with the new value and a revoked one stopping calls, and a package killed by its process group taking a server that ignores its closed stdin with it.extensions/mcpevent tests run the same fakes with events: a wait woken by a poll and one by a webhook delivery (an occurrence from before the wait doesn’t wake it), a forged signature and a stale timestamp refused with no Event, a redelivery deduplicated, a changed or dropped event refused asdriftedwith nothing subscribed, an event the entry doesn’t list never subscribed to, arguments the pinned schema refuses, a gap and a truncated poll recorded, aterminatedenvelope and a poll answeredNotFoundorschema_changedwaking the wait with the reason, a refresh while a wait holds it and an unsubscribe once its Work has woken and waits on something else, or been cancelled, two waits sharing a subscription on keys of their own, a wait that joins an open poll not woken by what came before it, a wait that joined while the subscription was being ended woken with it, and a webhook the server won’t verify falling back to polling.extensions/mcptask tests run the fake 2026-07-28 server with Tasks. They cover: a long call that returns at once and parks the Work on its wait, which is polled no sooner than the server suggests and woken with the tool’s result; a failed task, a tool error, a task asking for input (cancelled) and one the server no longer knows, each waking the wait with the reason; a cancelled Work cancelling the task on the server and stopping the polling; two tasks from one Work, each waited for by its owntask(and a wait that doesn’t say which refused as ambiguous); an entry that stops marking the tooltaskcancelling it before reporting it failed, and one that is gone reporting it couldn’t; a repeated non-retry-safe request answered with the first task, and one cut off after the server started a task, which isn’t sent again; and a task tool answered synchronously by a server without Tasks, outside a Work, or on a host that can’t follow it.extensions/mcpstanding subscription tests cover a subscription opened on apply with no Work waiting, each occurrence its own Work, two occurrences with the same correlation value reaching the same Work and a later one opening a successor, a webhook refreshed while configured and unsubscribed once dropped, a subscription shared with a wait, an ended one reported by doctor, not reopened by the same config and reopened once re-pinned, drift reported by doctor’s deep check (declared deep, so--check-secretsruns it), an unreachable server retried, a wait that fails to open an unopened standing subscription leaving it to the task or ending it with a record, reconciling once per generation, and the config’s checks. The package’s certification fixture has the route’s cases, whichmake certifyruns.internal/bootstraptests the host’s side of the launch: the entry’s own provider and policy, a fresh directory beneath the package’s runs, the state directory denied, and refusal for an entry without a sandbox, an entry of another package’s type, or another scope.TestMCPBridgeThroughTheDaemonruns the bundled package in the real daemon with a test sandbox provider, once with servers on 2026-07-28 and once with servers on 2025-06-18 only. An agent’s call reaches the server inside the sandbox, with the operator’s policy, in the host’s directory and with the entry’s secret. A tool the entry doesn’t list isn’t callable, and a remote tool whose description has changed is refused as drifted.TestMCPEventWaitThroughTheDaemonparks a Work on a stdio server’s event and wakes it with the occurrence the task’s next poll brings.TestMCPStandingSubscriptionThroughTheDaemonopens a standing subscription on apply and runs the occurrence the next poll brings through the generatedmcp-eventroute to an execution of Work of its own.
History
Section titled “History”- #660 asked for a Chat Completions executor that runs toolbelt-only Work, with user-supplied tools. Its design made every tool a toolbelt operation and proposed the MCP bridge on a new contract for operations that config declares.
- #663 added that contract, entry operations.
- #664 added the bridge and entry sandboxes, so its stdio servers run in the sandbox their entry names.
- #926 taught the bridge MCP 2026-07-28, which the Events and Tasks extensions require, falling back to 2025-06-18 for older servers, and recorded the extensions a server offers. It is part 1 of the plan in #922.
- #927, part 2, let agents wait on a server’s events: entry operations of kind
wait, subscriptions held by webhook or poll through each entry’s ingress source, and teardown through the grant. It addedingress_scope: in_effect, so an ingress type’s entries need not name the scope they ingest into, and openedoperation.waitto any package whose types declare entry operations. - #928, part 3, added standing subscriptions: an entry’s
subscriptionshold the same subscription a wait would, for as long as the config lists them, and themcp-eventroute turns their occurrences into Work, correlated as a webhook hook’s are. Ended ones are recorded for doctor’smcp-subscriptionscheck. Nothing new was needed in the core. - #929, part 4, let a tool’s call run as an MCP task. It reuses #927’s translated wait on a key of the bridge’s own, its ingress source and the
mcp-eventstask, which now polls tasks as well as subscriptions.