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 ACP 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 something that implements the McpServerConnect trait.
§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".