Expand description
§Brainwires MCP Server
MCP server framework with middleware pipeline for the Brainwires Agent Framework.
Provides everything needed to build an MCP-compliant tool server:
McpServer— async event loop that reads JSON-RPC, runs middleware, dispatches to handlerMcpHandler— trait defining how your server responds to initialize/list_tools/call_toolMcpToolRegistry— stores tool definitions + handlers, dispatches tool callsMiddlewareChain— ordered middleware pipeline (auth, logging, rate-limiting, tool filtering)ServerTransport— pluggable transport (stdio included)
Re-exports§
pub use connection::ClientInfo;pub use connection::RequestContext;pub use error::AgentNetworkError;pub use handler::McpHandler;pub use mcp_transport::ServerTransport;pub use mcp_transport::StdioServerTransport;pub use middleware::Middleware;pub use middleware::MiddlewareChain;pub use middleware::MiddlewareResult;pub use registry::McpToolDef;pub use registry::McpToolRegistry;pub use registry::ToolHandler;pub use server::McpServer;pub use tasks::McpTask;pub use tasks::McpTaskState;pub use tasks::McpTaskStore;pub use middleware::auth::AuthMiddleware;pub use middleware::logging::LoggingMiddleware;pub use middleware::rate_limit::RateLimitMiddleware;pub use middleware::tool_filter::ToolFilterMiddleware;
Modules§
- connection
- WebSocket/HTTP connection types.
- error
- Error types for the MCP server.
- handler
- MCP request handler trait.
- mcp_
transport - MCP server transport (stdio).
- middleware
- Middleware pipeline (auth, logging, rate-limiting, tool filtering).
- registry
- MCP tool registry.
- server
- MCP server lifecycle.
- tasks
- MCP Tasks primitive (SEP-1686). MCP Tasks primitive (SEP-1686).