@@ -159,7 +159,7 @@ update = AgentMessageChunk(
159159
160160## Session notices (unstable)
161161
162- The v1 bindings use ` schema-v1.23.0 ` . Clients that can display live advisory
162+ The v1 bindings use ` schema-v1.24.1 ` . Clients that can display live advisory
163163notices advertise ` ClientCapabilities(session=ClientSessionCapabilities(notices=NoticeCapabilities())) `
164164in ` initialize ` ; these models are available from ` acp.schema ` .
165165
@@ -189,7 +189,7 @@ nested objects are not valid form values.
189189
190190## Additional v1 protocol methods
191191
192- The SDK exposes all agent and client methods in the bundled ` schema-v1.23.0 `
192+ The SDK exposes all agent and client methods in the bundled ` schema-v1.24.1 `
193193method tables. ` session/delete ` and ` logout ` are stable and do not require
194194` use_unstable_protocol=True ` . The other methods in the table below are unstable;
195195enable that flag on the receiving connection (or ` run_agent ` ) to route them.
@@ -200,9 +200,8 @@ Check the peer's advertised capabilities before calling these methods.
200200| ` session/delete ` | ` delete_session(session_id=...) ` | Agent |
201201| ` providers/list ` , ` providers/set ` , ` providers/disable ` | ` list_providers ` , ` set_provider ` , ` disable_provider ` | Agent |
202202| ` logout ` | ` logout() ` | Agent |
203- | ` mcp/connect ` , ` mcp/disconnect ` | ` connect_mcp ` , ` disconnect_mcp ` | Client |
204- | ` mcp/message ` (request) | ` mcp_message ` | Either peer |
205- | ` mcp/message ` (notification) | ` notify_mcp ` | Either peer |
203+ | ` mcp/message ` (request) | ` mcp_message ` | Client/provider |
204+ | ` mcp/message ` (notification) | ` notify_mcp ` | Agent |
206205| ` nes/start ` , ` nes/suggest ` , ` nes/close ` | ` start_nes ` , ` suggest_nes ` , ` close_nes ` | Agent |
207206| ` nes/accept ` , ` nes/reject ` | ` accept_nes ` , ` reject_nes ` | Agent |
208207| ` document/didOpen ` , ` document/didChange ` , ` document/didClose ` , ` document/didSave ` , ` document/didFocus ` | ` did_open ` , ` did_change ` , ` did_close ` , ` did_save ` , ` did_focus ` | Agent |
@@ -223,10 +222,70 @@ session. The SDK dispatches these calls to your implementation; it does not
223222provide session storage or provider management itself. Missing request handlers
224223return the JSON-RPC method-not-found error.
225224
226- MCP requests return the inner JSON result unchanged, including ` null ` . Use
227- ` notify_mcp ` for one-way MCP messages. Both APIs accept ` connection_id ` , ` method ` ,
228- and optional ` params ` . These methods share the same connections and routers
229- across stdio, HTTP, and WebSocket transports.
225+ ## Stateless MCP-over-ACP
226+
227+ The unstable native binding targets ** MCP 2026-07-28** . A provider advertises an
228+ ` AcpMcpServer(name=..., server_id=...) ` in session setup after checking the
229+ agent's ` mcpCapabilities.acp ` capability. Register the provider's handler before
230+ publishing the declaration: the agent may call it before session setup returns.
231+ There is no MCP initialization or connect/disconnect exchange.
232+
233+ An agent calls its connection's ` mcp_message ` ; the client/provider implements
234+ that handler. Supply a fresh string ` request_id ` for every operation, including
235+ an interactive-tool retry. This logical MCP ID is separate from the outer ACP
236+ JSON-RPC request ID. Include the required MCP metadata in the inner parameters:
237+
238+ ``` python
239+ from uuid import uuid4
240+ from acp import McpErrorResponse
241+
242+ response = await connection.mcp_message(
243+ server_id = " project-tools" ,
244+ request_id = uuid4().hex,
245+ method = " tools/list" ,
246+ params = {
247+ " _meta" : {
248+ " io.modelcontextprotocol/protocolVersion" : " 2026-07-28" ,
249+ " io.modelcontextprotocol/clientCapabilities" : {},
250+ },
251+ },
252+ trace = " outer ACP metadata" ,
253+ )
254+ if isinstance (response, McpErrorResponse):
255+ handle_mcp_error(response.error)
256+ else :
257+ use_mcp_result(response.result)
258+ ```
259+
260+ Providers return ` McpResultResponse(result=...) ` or
261+ ` McpErrorResponse(error=McpError(code=..., message=...)) ` . Results are opaque JSON,
262+ including explicit ` null ` , tool errors with ` isError ` , and interactive
263+ ` input_required ` results. Error data preserves omission versus explicit null,
264+ and unknown inner error fields survive. Outer ACP failures raise ` RequestError ` ;
265+ an inner MCP error, even code ` -32000 ` , remains inside the response carrier.
266+ Send exactly one outcome; receivers prefer ` result ` if both keys are received.
267+
268+ The provider sends ` notify_mcp(server_id=..., request_id=..., method=..., params=...) `
269+ for an active request; the agent implements ` notify_mcp ` to receive it. Keep the
270+ same server and logical request IDs and stop notifications before sending the
271+ final outcome. Consumers must correlate notifications with active operations
272+ and ignore unknown or completed ones. There are no provider-originated MCP requests.
273+
274+ The SDK provides typed envelopes and routing. Applications own server registrations,
275+ MCP metadata/version validation, duplicate-active-ID rejection, operation admission,
276+ and notification lifetimes. They also decide how to handle interactive input;
277+ retry with fresh IDs and preserve opaque request state. Cancelling the task awaiting
278+ ` mcp_message ` uses the existing ACP cancellation mechanism described below.
279+ These methods work over stdio, HTTP, and WebSocket ACP connections.
280+
281+ ** Migration:** ` connect_mcp ` , ` disconnect_mcp ` , and ` connection_id ` are removed.
282+ Replace them with server-addressed requests carrying ` server_id ` and ` request_id ` ,
283+ add per-request MCP metadata, and wrap handler outcomes in the typed carrier.
284+ Older MCP revisions and the connection-oriented prototype are not supported.
285+
286+ Run ` uv run python examples/mcp_over_acp.py ` for a local request/progress example.
287+ See the [ upstream binding specification] ( https://agentclientprotocol.com/rfds/mcp-over-acp )
288+ for registration, subscription, and error-code requirements.
230289
231290## Request cancellation
232291
0 commit comments