1 unstable release

Uses new Rust 2024

0.5.0 Dec 26, 2025

#2645 in HTTP server

MIT/Apache

1MB
22K SLoC

Warp integration for the Rust MCP SDK.

This crate provides integration between the MCP SDK and the Warp web framework, making it easy to expose MCP servers over HTTP.

Features

  • HTTP POST endpoint for JSON-RPC messages
  • Server-Sent Events (SSE) streaming for notifications
  • Session management with automatic cleanup
  • Protocol version validation
  • CORS support via Warp filters

Quick Start

use mcpkit::prelude::*;
use mcpkit_warp::McpRouter;

// Your MCP server handler (use #[mcp_server] macro)
#[mcp_server(name = "my-server", version = "1.0.0")]
impl MyServer {
    #[tool(description = "Say hello")]
    async fn hello(&self, name: String) -> ToolOutput {
        ToolOutput::text(format!("Hello, {name}!"))
    }
}

#[tokio::main]
async fn main() {
    McpRouter::new(MyServer::new())
        .serve(([0, 0, 0, 0], 3000))
        .await;
}

mcpkit-warp

Warp framework integration for mcpkit MCP servers.

Features

  • Full MCP protocol support over HTTP
  • Filter-based architecture
  • CORS support with configurable origins
  • Session management with SSE streaming

Usage

use mcpkit_warp::McpRouter;

#[tokio::main]
async fn main() {
    let handler = MyHandler::new();
    let router = McpRouter::new(handler).with_cors();

    // Serve with CORS
    warp::serve(router.into_filter())
        .run(([0, 0, 0, 0], 3000))
        .await;
}

Requirements

  • Rust 1.85+
  • Warp 0.3+

License

MIT OR Apache-2.0

Dependencies

~25–43MB
~571K SLoC