agent-client-protocol-rmcp
rmcp integration for Agent Client Protocol MCP servers.
Overview
This crate bridges rmcp-based MCP server implementations with the
runtime-agnostic MCP server framework from agent-client-protocol. It lets you define MCP tools in
Rust, serve them directly, or attach them to an ACP proxy.
Attached servers are advertised with the opt-in native MCP-over-ACP transport:
McpServer::Acp plus request-scoped mcp/message for MCP 2026-07-28, without
an initialization prerequisite or connect/disconnect exchange. This
crate does not enable the core SDK's unstable_mcp_over_acp feature merely to
build or directly serve a server. Enable this crate's matching
unstable_mcp_over_acp feature when using with_mcp_server. Use
agent-client-protocol-polyfill when the final agent accepts HTTP but not
ACP-transport MCP servers.
unstable_protocol_v2 and unstable_mcp_over_acp are independent passthrough
features. Enable both when attaching a native MCP server to draft ACP v2.
Native attachments lazily initialize one shared rmcp application service. Standalone connections still invoke the factory separately. Each native request owns its metadata, notifications, cancellation, and supervised cleanup. Run the direct ACP example with:
Usage
Use the McpServerExt trait to build an MCP server with tools:
use ;
use McpServerExt;
async
Choosing mcp::Client as the counterpart makes this a standalone MCP server
that implements ConnectTo<mcp::Client>.
Or create an MCP server from an rmcp service:
use McpServer;
use McpServerExt;
let server = from_rmcp;
// Use as a handler in a proxy
Proxy.builder
.with_mcp_server
.connect_to
.await?;
Why a Separate Crate?
This crate is separate from agent-client-protocol to avoid coupling the core protocol crate to the rmcp dependency. This allows:
agent-client-protocolto remain focused on the ACP protocolagent-client-protocol-rmcpto trackrmcpupdates independently- Integrations to choose compatible
agent-client-protocolandrmcpmajor versions explicitly
Versioning
Both agent-client-protocol and rmcp are public dependencies of this crate:
their types and traits appear in its public API. A source-incompatible major
release of either dependency therefore requires a major release of this crate.
| agent-client-protocol-rmcp | agent-client-protocol | rmcp |
|---|---|---|
| 4.x (unreleased) | 3.x | 3.x |
| 3.x | 2.x | 2.x |
| 2.x | 1.x | 2.x |
| 1.x | 1.x | 1.x |
See the rmcp 4.x integration migration guide for migrating both public dependencies in the combined core 3.x / integration 4.x / rmcp 3.x release. The minimum supported Rust version remains 1.88. Native attachments also move to the request-scoped MCP binding for MCP 2026-07-28 only; the old connect/disconnect binding is removed. Standalone rmcp serving retains protocol negotiation. Custom transports and low-level callers should follow the connection-driver migration, and raw response adapters should follow the core 3.x migration guide.
Related Crates
- agent-client-protocol — Core ACP protocol types and traits
- agent-client-protocol-conductor — Proxy-chain orchestration
License
Apache-2.0