Skip to main content

Crate agent_client_protocol_rmcp

Crate agent_client_protocol_rmcp 

Source
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_fn method 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_mut method when defining tools.

Structs§

McpServerBuilder
Builder for creating MCP servers with tools.

Enums§

EnabledTools
Tracks which tools are enabled.

Traits§

McpServerExt
Extension constructors for ACP MCP servers backed by rmcp.
McpTool
Trait for defining MCP tools.