Skip to main content

Module http

Module http 

Source
Available on crate feature http-server only.
Expand description

HTTP transport for MCP Server.

This module provides McpHttpServer which wraps the core McpServer and handles HTTP/SSE I/O using actix-web.

§Example

use mcp::server::{McpServerConfig, http::McpHttpServer};

let config = McpServerConfig::builder()
    .name("my-server")
    .version("1.0.0")
    .with_tool(MyTool)
    .build();

McpHttpServer::run(config, "127.0.0.1", 8080).await?;

Structs§

McpHttpServer
MCP Server with HTTP transport.