Skip to main content

serve

Function serve 

Source
pub async fn serve<T, E, A>(
    cli: Cli,
    transport: T,
) -> Result<RunningService<RoleServer, McpServerSqlite>>
where T: IntoTransport<RoleServer, E, A>, E: Error + Send + Sync + 'static,
Expand description

Builds and serves the MCP server from the given CLI arguments over the provided transport. Creates the connection pool, runs init scripts on new databases, assembles the authorization resolver from the preset and allow/deny overrides, and starts the MCP service. Returns the running service handle.