Skip to content

refactor(acp)!: adopt schema-native MCP-over-ACP#281

Merged
benbrandt merged 1 commit into
mainfrom
refactor-native-mcp-over-acp
Jul 22, 2026
Merged

refactor(acp)!: adopt schema-native MCP-over-ACP#281
benbrandt merged 1 commit into
mainfrom
refactor-native-mcp-over-acp

Conversation

@benbrandt

Copy link
Copy Markdown
Member

Replace the SDK-local _mcp wire extension and acp: HTTP placeholders with the feature-gated schema transport. Keep standalone MCP independent, adapt native declarations to HTTP only at the explicit polyfill boundary, and remove the obsolete stdio bridge mode.

Replace the SDK-local _mcp wire extension and acp: HTTP placeholders with the feature-gated schema transport. Keep standalone MCP independent, adapt native declarations to HTTP only at the explicit polyfill boundary, and remove the obsolete stdio bridge mode.
Copilot AI review requested due to automatic review settings July 22, 2026 12:57
@benbrandt
benbrandt merged commit 67b703a into main Jul 22, 2026
15 checks passed
@benbrandt
benbrandt deleted the refactor-native-mcp-over-acp branch July 22, 2026 13:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is a breaking refactor of the Rust ACP SDK’s MCP-over-ACP story: it removes the SDK-local underscore-prefixed wire extension (_mcp/* + acp: placeholder declarations) and adopts the schema-native, feature-gated MCP-over-ACP transport (McpServer::Acp + mcp/connect|message|disconnect). It keeps standalone MCP serving available without the ACP transport feature, and moves HTTP adaptation to an explicit polyfill boundary.

Changes:

  • Replace legacy SDK-local MCP-over-ACP wire types/methods with schema-native mcp/* requests/notifications and McpServer::Acp declarations gated behind unstable_mcp_over_acp.
  • Rework mcp_server to be runtime-agnostic for standalone serving by default, adding typed connection context for ACP-attached sessions when enabled.
  • Rewrite the polyfill to adapt native McpServer::Acp declarations to loopback HTTP only when the downstream agent supports HTTP MCP (and remove stdio bridge mode).

Reviewed changes

Copilot reviewed 53 out of 54 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/agent-client-protocol/tests/meta_propagation.rs Updates meta propagation test to schema-native mcp/message request shape under unstable_mcp_over_acp.
src/agent-client-protocol/src/session.rs Feature-gates per-session MCP server attachment and updates attachment semantics.
src/agent-client-protocol/src/schema/proxy_protocol.rs Removes legacy SDK-local MCP-over-ACP protocol types/constants from proxy schema module.
src/agent-client-protocol/src/schema/mod.rs Adds feature-gated schema::mcp module and adjusts re-export wording.
src/agent-client-protocol/src/schema/mcp.rs Adds JSON-RPC trait impls for schema-native MCP-over-ACP message types/methods.
src/agent-client-protocol/src/mcp_server/server.rs Refactors McpServer to be runtime-agnostic, generate McpServerAcpId only when attaching, and advertise McpServer::Acp.
src/agent-client-protocol/src/mcp_server/mod.rs Updates module docs, gates ACP attachment internals, and re-exports new connection context types.
src/agent-client-protocol/src/mcp_server/context.rs Introduces McpConnectionContext and replaces acp_id access with typed optional server_id / connection_id.
src/agent-client-protocol/src/mcp_server/connect.rs Updates connection trait docs to match new McpConnectionTo semantics.
src/agent-client-protocol/src/mcp_server/active_session.rs Implements native MCP-over-ACP routing (`mcp/connect
src/agent-client-protocol/src/lib.rs Updates crate-level docs for MCP server module scope and optional ACP attachment.
src/agent-client-protocol/src/jsonrpc.rs Feature-gates global MCP attachment on proxy connections and documents supported setup requests.
src/agent-client-protocol/src/concepts/sessions.rs Documents that ACP attachment requires unstable_mcp_over_acp while standalone MCP remains stable.
src/agent-client-protocol/src/concepts/proxies.rs Documents feature requirement for ACP attachment APIs.
src/agent-client-protocol/README.md Adds “MCP Server Attachment” section describing native transport and the polyfill boundary.
src/agent-client-protocol/CHANGELOG.md Records the breaking transport switch and the McpConnectionTo API changes.
src/agent-client-protocol-rmcp/src/lib.rs Documents feature split (standalone vs attachment) and adds a non-feature-gated standalone build test.
src/agent-client-protocol-rmcp/src/builder.rs Updates docs/terminology for standalone serving vs feature-gated ACP attachment.
src/agent-client-protocol-rmcp/README.md Updates crate docs to describe native MCP-over-ACP + HTTP adaptation boundary.
src/agent-client-protocol-rmcp/examples/with_mcp_server.rs Updates example run instructions to require --features unstable_mcp_over_acp.
src/agent-client-protocol-rmcp/CHANGELOG.md Documents feature split and new typed context accessors.
src/agent-client-protocol-rmcp/Cargo.toml Adds unstable_mcp_over_acp passthrough feature and gates the example on it.
src/agent-client-protocol-polyfill/src/mcp_over_acp/stdio.rs Removes obsolete stdio bridge transport implementation.
src/agent-client-protocol-polyfill/src/mcp_over_acp/mod.rs Rewrites polyfill to adapt McpServer::Acp to HTTP only when downstream supports HTTP MCP; routes mcp/* and adds tests.
src/agent-client-protocol-polyfill/src/mcp_over_acp/http.rs Adjusts HTTP bridge entrypoint to use server IDs (native) instead of legacy acp_id.
src/agent-client-protocol-polyfill/src/mcp_over_acp/actor.rs Updates bridge actor lifecycle to emit disconnect as request/response flow via runner.
src/agent-client-protocol-polyfill/src/lib.rs Updates crate docs to describe native MCP-over-ACP HTTP adaptation.
src/agent-client-protocol-polyfill/CHANGELOG.md Records breaking changes: consume native declarations, remove stdio mode, switch to mcp/disconnect request.
src/agent-client-protocol-polyfill/Cargo.toml Removes obsolete deps and adds unstable_session_fork passthrough feature.
src/agent-client-protocol-cookbook/src/lib.rs Updates cookbook docs to reflect feature-gated ACP attachment for MCP servers.
src/agent-client-protocol-cookbook/Cargo.toml Enables unstable_mcp_over_acp for cookbook dev-deps to match documented usage.
src/agent-client-protocol-conductor/tests/trace_mcp_tool_call.rs Updates trace normalization and expectations for native MCP server IDs and mcp/* methods.
src/agent-client-protocol-conductor/tests/trace_client_mcp_server.rs Same as above for client MCP server trace test.
src/agent-client-protocol-conductor/tests/test_mcp_connection_context.rs Updates integration test to assert typed server/connection IDs are delivered to tools.
src/agent-client-protocol-conductor/tests/standalone_mcp_server.rs Extends standalone MCP server test to assert explicit standalone connection context.
src/agent-client-protocol-conductor/tests/request_cancellation.rs Updates cancellation test to schema-native ConnectMcpRequest and typed McpServerAcpId.
src/agent-client-protocol-conductor/tests/mcp-integration.rs Removes legacy mode tests and updates remaining assertions/comments for new transport.
src/agent-client-protocol-conductor/tests/mcp_server_handler_chain.rs Ensures global MCP servers are injected into new/load/resume (and asserts stable server IDs).
src/agent-client-protocol-conductor/tests/mcp_over_acp_polyfill.rs Adds integration tests for the new MCP-over-ACP compatibility proxy behavior.
src/agent-client-protocol-conductor/src/trace.rs Updates trace unwrapping to recognize schema-native mcp/message request/notification wrappers.
src/agent-client-protocol-conductor/src/lib.rs Updates docs to describe polyfill as native MCP-over-ACP to HTTP adapter.
src/agent-client-protocol-conductor/README.md Same doc update for conductor crate.
src/agent-client-protocol-conductor/CHANGELOG.md Notes enabling native MCP schema for tracing and keeping HTTP adaptation explicit.
src/agent-client-protocol-conductor/Cargo.toml Enables unstable_mcp_over_acp on the main dependency so tracing recognizes mcp/message.
README.md Top-level docs updated to describe opt-in native MCP-over-ACP and HTTP adaptation boundary.
md/trace-viewer.md Updates protocol marker docs from _mcp/message to mcp/message.
md/proxying-acp.md Adds warning about historical _mcp/* and acp: URL examples being retired.
md/protocol.md Rewrites protocol reference to document native MCP-over-ACP and removes legacy _mcp/* section.
md/migration_v2.0.md Adds migration guidance for native MCP-over-ACP and new typed connection context accessors.
md/mcp-bridge.md Updates bridge documentation to native transport + explicit HTTP adaptation only at boundary.
md/introduction.md Updates crate map/TOC links and clarifies polyfill as MCP transport compatibility component.
md/design.md Updates design overview to describe opt-in transport and explicit polyfill boundary.
md/conductor.md Updates conductor docs to remove stdio bridging and describe explicit HTTP adaptation proxy usage.
Cargo.lock Removes anyhow/tokio-util from polyfill dependency graph after stdio removal and refactor.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +495 to +498
});
if let Err(error) = scheduled {
warn!(?error, "could not schedule mcp/connect response handling");
}
@acp-release-bot acp-release-bot Bot mentioned this pull request Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants