Skip to main content

McpServerExt

Trait McpServerExt 

Source
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§

Source

fn builder(name: impl ToString) -> McpServerBuilder<Counterpart, NullRun>

Create an MCP server builder for defining tools in Rust code.

Source

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".

Implementations on Foreign Types§

Source§

impl<Counterpart: Role> McpServerExt<Counterpart> for McpServer<Counterpart>

Implementors§