Nchan MCP Transport is a high-performance WebSocket/SSE transport layer and gateway for Anthropic's MCP (Model Context Protocol). It is powered by Nginx, Nchan, and FastAPI, making it ideal for building real-time, scalable AI integrations with Claude and other LLM agents.
Feature | Description |
---|---|
🔄 Dual Protocol Support | Seamlessly supports WebSocket and SSE with automatic detection |
🚀 High Performance Pub/Sub | Built on Nginx + Nchan, handles thousands of concurrent connections |
🔌 MCP-Compliant Transport | Fully implements Model Context Protocol (JSON-RPC 2.0) |
🧰 OpenAPI Integration | Auto-generate MCP tools from any OpenAPI spec |
🪝 Tool / Resource System | Use Python decorators to register tools and resources |
📡 Asynchronous Execution | Background task queue + live progress updates via push notifications |
🧱 Dockerized Deployment | Easily spin up with Docker Compose |
MCP allows AI assistants like Claude to communicate with external tools. However, native MCP is HTTP+SSE, which struggles with long tasks, network instability, and high concurrency. Nchan MCP Transport bridges the gap by providing:
pip install httmcp
git clone https://github.com/yourusername/nchan-mcp-transport.git
cd nchan-mcp-transport
docker-compose up -d
@server.tool()
async def search_docs(query: str) -> str:
return f"Searching for {query}..."
openapi_server = await OpenAPIMCP.from_openapi("https://example.com/openapi.json", publish_server="http://nchan:80")
app.include_router(openapi_server.router)
# Installation
pip install httmcp[cli]
# One-click deployment from GPTs Actions OpenAPI spec
python -m httmcp -f gpt_actions_openapi.json -p http://nchan:80
Pull requests are welcome! File issues if you’d like to help improve:
MIT License
The best way to deploy MCP server. A high-performance WebSocket/SSE transport layer & gateway for Anthropic's MCP (Model Context Protocol) — powered by Nginx, Nchan, and FastAPI.
actions
gpts
gpts-actions
mcp-transport
nchan-websocket
sse-for-anthropic
mcp-jsonrpc-gateway
claude-plugin-backend
streamable-http
real-time-ai-api-gateway
fastapi-websocket-mcp
mcp-pubsub
mcp-openapi-bridge