Expand description
§agent-client-protocol-rmcp
This crate provides integration between rmcp MCP servers and the Agent Client Protocol MCP server framework.
§Usage
Build an MCP server with tools using the extension trait:
ⓘ
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:
ⓘ
use agent_client_protocol::mcp_server::McpServer;
use agent_client_protocol_rmcp::McpServerExt;
let server = McpServer::from_rmcp("my-server", MyRmcpService::new);
// Use as a handler
Proxy.builder()
.with_handler(server)
.serve(client)
.await?;Macros§
- tool_fn
- This is a hack that must be given as the final argument of
the MCP server builder’s
tool_fnmethod when defining stateless concurrent tools. - tool_
fn_ mut - This is a hack that must be given as the final argument of
the MCP server builder’s
tool_fn_mutmethod when defining tools.
Structs§
- McpServer
Builder - Builder for creating MCP servers with tools.
Enums§
- Enabled
Tools - Tracks which tools are enabled.
Traits§
- McpServer
Ext - Extension constructors for ACP MCP servers backed by
rmcp. - McpTool
- Trait for defining MCP tools.