Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
members = [
"src/agent-client-protocol",
"src/agent-client-protocol-derive",
# Keep polyfill before conductor: release-plz currently ignores versioned
# Keep polyfill and rmcp before conductor: release-plz currently ignores versioned
# dev-dependency edges, but cargo publish still validates them.
"src/agent-client-protocol-polyfill",
"src/agent-client-protocol-conductor",
"src/agent-client-protocol-rmcp",
"src/agent-client-protocol-conductor",
"src/agent-client-protocol-test",
"src/agent-client-protocol-trace-viewer",
"src/yopo",
Expand Down
5 changes: 3 additions & 2 deletions md/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The core SDK. Provides:
- **Connection builders** (`builder()`, `connect_to()`, `connect_with()`)
- **Message handling** (`on_receive_request`, `on_receive_notification`, `on_receive_dispatch`)
- **Protocol types** (`agent_client_protocol::schema::*`) - all ACP message types
- **MCP server builder** - for adding tools to proxies
- **MCP server attachment** - runtime-agnostic interfaces for wiring MCP servers into ACP sessions

### agent-client-protocol-tokio

Expand All @@ -27,6 +27,7 @@ Tokio-specific utilities:

Integration with the [rmcp](https://docs.rs/rmcp) crate:

- **`McpServer::builder()`** - define MCP tools in Rust code
- **`McpServer::from_rmcp()`** - wrap an rmcp server as an ACP MCP server

## Role System
Expand Down Expand Up @@ -156,7 +157,7 @@ stateDiagram-v2
| `src/agent-client-protocol/src/component.rs` | ConnectTo and Builder traits |
| `src/agent-client-protocol/src/handler.rs` | Connection builder implementation |
| `src/agent-client-protocol/src/typed.rs` | Dispatch type and handler matching |
| `src/agent-client-protocol/src/mcp_server/` | MCP server builder |
| `src/agent-client-protocol/src/mcp_server/` | Runtime-agnostic MCP server attachment |
| `src/agent-client-protocol/src/concepts/` | Rustdoc concept explanations |

## Design Decisions
Expand Down
1 change: 1 addition & 0 deletions src/agent-client-protocol-conductor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ uuid.workspace = true

[dev-dependencies]
agent-client-protocol = { workspace = true, features = ["unstable_mcp_over_acp"] }
agent-client-protocol-rmcp.workspace = true
agent-client-protocol-test.workspace = true
yopo.workspace = true
expect-test.workspace = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use agent_client_protocol::mcp_server::McpServer;
use agent_client_protocol::{Conductor, ConnectTo, Proxy};
use agent_client_protocol_rmcp::McpServerExt as _;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use agent_client_protocol::schema::{
};
use agent_client_protocol::{Agent, Client, Conductor, ConnectTo, DynConnectTo, Proxy};
use agent_client_protocol_conductor::{ConductorImpl, ProxiesAndAgent};
use agent_client_protocol_rmcp::McpServerExt as _;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use agent_client_protocol::mcp_server::McpServer;
use agent_client_protocol::{Agent, Conductor, ConnectTo, Proxy, Role, RunWithConnectionTo};
use agent_client_protocol_conductor::{ConductorImpl, ProxiesAndAgent};
use agent_client_protocol_polyfill::mcp_over_acp::McpOverAcpPolyfill;
use agent_client_protocol_rmcp::McpServerExt as _;
use agent_client_protocol_test::testy::{Testy, TestyCommand};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use agent_client_protocol::{
ByteStreams, ConnectTo, RunWithConnectionTo, mcp_server::McpServer, role::mcp, util::run_until,
};
use agent_client_protocol_rmcp::McpServerExt as _;
use rmcp::{ClientHandler, ServiceExt, model::ClientInfo};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use agent_client_protocol::mcp_server::McpServer;
use agent_client_protocol::{Conductor, ConnectTo, DynConnectTo, Proxy, RunWithConnectionTo};
use agent_client_protocol_conductor::{ConductorImpl, ProxiesAndAgent};
use agent_client_protocol_polyfill::mcp_over_acp::McpOverAcpPolyfill;
use agent_client_protocol_rmcp::McpServerExt as _;
use agent_client_protocol_test::testy::{Testy, TestyCommand};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use agent_client_protocol::mcp_server::McpServer;
use agent_client_protocol::{Conductor, ConnectTo, DynConnectTo, Proxy};
use agent_client_protocol_conductor::{ConductorImpl, ProxiesAndAgent};
use agent_client_protocol_polyfill::mcp_over_acp::McpOverAcpPolyfill;
use agent_client_protocol_rmcp::McpServerExt as _;
use agent_client_protocol_test::testy::{Testy, TestyCommand};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use agent_client_protocol::mcp_server::McpServer;
use agent_client_protocol::{Conductor, ConnectTo, DynConnectTo, Proxy, RunWithConnectionTo};
use agent_client_protocol_conductor::{ConductorImpl, ProxiesAndAgent};
use agent_client_protocol_polyfill::mcp_over_acp::McpOverAcpPolyfill;
use agent_client_protocol_rmcp::McpServerExt as _;
use agent_client_protocol_test::testy::{Testy, TestyCommand};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
Expand Down
1 change: 1 addition & 0 deletions src/agent-client-protocol-conductor/tests/test_tool_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use agent_client_protocol::mcp_server::McpServer;
use agent_client_protocol::{Conductor, ConnectTo, DynConnectTo, Proxy, RunWithConnectionTo};
use agent_client_protocol_conductor::{ConductorImpl, ProxiesAndAgent};
use agent_client_protocol_polyfill::mcp_over_acp::McpOverAcpPolyfill;
use agent_client_protocol_rmcp::McpServerExt as _;
use agent_client_protocol_test::testy::{Testy, TestyCommand};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use agent_client_protocol::{Client, Role, RunWithConnectionTo};
use agent_client_protocol_conductor::trace::TraceEvent;
use agent_client_protocol_conductor::{ConductorImpl, ProxiesAndAgent};
use agent_client_protocol_polyfill::mcp_over_acp::McpOverAcpPolyfill;
use agent_client_protocol_rmcp::McpServerExt as _;
use agent_client_protocol_test::testy::{Testy, TestyCommand};
use expect_test::expect;
use futures::StreamExt;
Expand Down
14 changes: 10 additions & 4 deletions src/agent-client-protocol-cookbook/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ pub mod global_mcp_server {
//!
//! ```
//! use agent_client_protocol::mcp_server::McpServer;
//! use agent_client_protocol_rmcp::McpServerExt;
//! use agent_client_protocol::{ConnectTo, RunWithConnectionTo, Proxy, Conductor};
//! use schemars::JsonSchema;
//! use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -556,7 +557,7 @@ pub mod global_mcp_server {
//! 2. Passes the modified request through to the next handler
//! 3. Handles incoming MCP protocol messages (tool calls, etc.) for its URL
//!
//! [`McpServer::builder`]: agent_client_protocol::mcp_server::McpServer::builder
//! [`McpServer::builder`]: agent_client_protocol_rmcp::McpServerExt::builder
//! [`McpServer::from_rmcp`]: agent_client_protocol_rmcp::McpServerExt::from_rmcp
//! [`with_mcp_server`]: agent_client_protocol::Builder::with_mcp_server
}
Expand All @@ -581,6 +582,7 @@ pub mod per_session_mcp_server {
//!
//! ```
//! use agent_client_protocol::mcp_server::McpServer;
//! use agent_client_protocol_rmcp::McpServerExt;
//! use agent_client_protocol::schema::NewSessionRequest;
//! use agent_client_protocol::{Client, Proxy, Conductor, ConnectTo};
//!
Expand Down Expand Up @@ -639,6 +641,7 @@ pub mod per_session_mcp_server {
//!
//! ```
//! # use agent_client_protocol::mcp_server::McpServer;
//! # use agent_client_protocol_rmcp::McpServerExt;
//! # use agent_client_protocol::schema::NewSessionRequest;
//! # use agent_client_protocol::{Client, Proxy, Conductor, ConnectTo};
//! # async fn run_proxy(transport: impl ConnectTo<Proxy>) -> Result<(), agent_client_protocol::Error> {
Expand Down Expand Up @@ -694,6 +697,7 @@ pub mod filtering_tools {
//!
//! ```
//! use agent_client_protocol::mcp_server::McpServer;
//! use agent_client_protocol_rmcp::McpServerExt;
//! use agent_client_protocol::{Conductor, RunWithConnectionTo};
//! use schemars::JsonSchema;
//! use serde::Deserialize;
Expand Down Expand Up @@ -730,6 +734,7 @@ pub mod filtering_tools {
//!
//! ```
//! use agent_client_protocol::mcp_server::McpServer;
//! use agent_client_protocol_rmcp::McpServerExt;
//! use agent_client_protocol::{Conductor, RunWithConnectionTo};
//! use schemars::JsonSchema;
//! use serde::Deserialize;
Expand Down Expand Up @@ -763,6 +768,7 @@ pub mod filtering_tools {
//!
//! ```
//! use agent_client_protocol::mcp_server::McpServer;
//! use agent_client_protocol_rmcp::McpServerExt;
//! use agent_client_protocol::Conductor;
//!
//! // This will error because "ech" is not a registered tool
Expand All @@ -775,9 +781,9 @@ pub mod filtering_tools {
//! Calling enable/disable on an already enabled/disabled tool is not an error -
//! the operations are idempotent.
//!
//! [`disable_tool`]: agent_client_protocol::mcp_server::McpServerBuilder::disable_tool
//! [`enable_tool`]: agent_client_protocol::mcp_server::McpServerBuilder::enable_tool
//! [`disable_all_tools`]: agent_client_protocol::mcp_server::McpServerBuilder::disable_all_tools
//! [`disable_tool`]: agent_client_protocol_rmcp::McpServerBuilder::disable_tool
//! [`enable_tool`]: agent_client_protocol_rmcp::McpServerBuilder::enable_tool
//! [`disable_all_tools`]: agent_client_protocol_rmcp::McpServerBuilder::disable_all_tools
}

pub mod running_proxies_with_conductor {
Expand Down
4 changes: 4 additions & 0 deletions src/agent-client-protocol-rmcp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add the MCP server builder APIs moved out of `agent-client-protocol`, keeping `rmcp` and Tokio dependencies in this integration crate.

## [0.11.2](https://github.com/agentclientprotocol/rust-sdk/compare/agent-client-protocol-rmcp-v0.11.1...agent-client-protocol-rmcp-v0.11.2) - 2026-05-16

### Other
Expand Down
6 changes: 4 additions & 2 deletions src/agent-client-protocol-rmcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ categories = ["development-tools"]

[dependencies]
agent-client-protocol.workspace = true
futures.workspace = true
futures-concurrency.workspace = true
rmcp.workspace = true
schemars.workspace = true
serde.workspace = true
serde_json.workspace = true
tokio.workspace = true
tokio-util.workspace = true

[dev-dependencies]
schemars.workspace = true
serde.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true

Expand Down
13 changes: 11 additions & 2 deletions src/agent-client-protocol-rmcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@

## Overview

This crate bridges [rmcp](https://docs.rs/rmcp)-based MCP server implementations with the ACP MCP server framework from `agent-client-protocol`. It lets you use any rmcp service as an MCP server in an ACP proxy.
This crate bridges [rmcp](https://docs.rs/rmcp)-based MCP server implementations with the ACP MCP server framework from `agent-client-protocol`. It lets you define MCP tools in Rust or use any rmcp service as an MCP server in an ACP proxy.

## Usage

Use the `McpServerExt` trait to create an MCP server from an rmcp service:
Use the `McpServerExt` trait to build an MCP server with tools:

```rust
use agent_client_protocol::mcp_server::McpServer;
use agent_client_protocol_rmcp::McpServerExt;

let server = McpServer::builder("my-tools").build();
```

Or create an MCP server from an rmcp service:

```rust
use agent_client_protocol::mcp_server::McpServer;
Expand Down
Loading