pub trait McpServerExt<Counterpart: Role> {
// Provided methods
fn builder(name: impl ToString) -> McpServerBuilder<Counterpart, NullRun> { ... }
fn from_rmcp<S>(
name: impl ToString,
new_fn: impl Fn() -> S + Send + Sync + 'static,
) -> McpServer<Counterpart, NullRun>
where S: Service<RoleServer> { ... }
}Expand description
Extension constructors for MCP servers backed by rmcp.
Provided Methods§
Sourcefn builder(name: impl ToString) -> McpServerBuilder<Counterpart, NullRun>
fn builder(name: impl ToString) -> McpServerBuilder<Counterpart, NullRun>
Create an MCP server builder for defining tools in Rust code.
Sourcefn from_rmcp<S>(
name: impl ToString,
new_fn: impl Fn() -> S + Send + Sync + 'static,
) -> McpServer<Counterpart, NullRun>where
S: Service<RoleServer>,
fn from_rmcp<S>(
name: impl ToString,
new_fn: impl Fn() -> S + Send + Sync + 'static,
) -> McpServer<Counterpart, NullRun>where
S: Service<RoleServer>,
Create an MCP server from an rmcp service factory.
Native ACP requests lazily share one application service. Standalone connections invoke the factory independently and retain their ordinary MCP lifecycle.
§See also
See Self::builder to construct MCP servers from Rust code.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".