Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MCP

Starweaver currently supports MCP foundations in starweaver-tools and provider-native MCP request metadata in starweaver-model.

Static MCP toolset

#![allow(unused)]
fn main() {
use starweaver_agent::{McpToolSpec, McpToolset, McpToolsetConfig, McpTransport, Toolset};

let toolset = McpToolset::new(
    McpToolsetConfig::new(
        "docs",
        McpTransport::StreamableHttp {
            url: "https://mcp.example.test".to_string(),
            headers: Default::default(),
        },
    )
    .with_tool(
        McpToolSpec::new("search", serde_json::json!({"type": "object"}))
            .with_description("Search docs"),
    ),
);

assert_eq!(toolset.name(), "docs");
assert_eq!(toolset.tools().len(), 1);
}

Provider-native MCP

NativeMcpServer maps MCP server metadata into provider-native tool definitions for providers that execute MCP directly.

Live MCP clients, transports, resources, prompts, sampling, roots, logging, completions, notifications, subscriptions, long-running tasks, and protocol tests are tracked in spec/sdk/03-first-party-tool-bundles.md and memos/implementation-todo.md. Starweaver’s live MCP work should use the official Model Context Protocol Rust SDK at https://github.com/modelcontextprotocol/rust-sdk through the rmcp crate.