MCP Streamable HTTP
Example implementation of MCP Streamable HTTP client/server in Python and TypeScript.
What is MCP Streamable HTTP?
MCP Streamable HTTP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to example implementation of mcp streamable http client/server in python and typescript.
Example implementation of MCP Streamable HTTP client/server in Python and TypeScript.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Example implementation of MCP Streamable HTTP client/server
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-streamable-httpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP Streamable HTTP
The MCP Streamable HTTP project provides reference implementations of the MCP Streamable HTTP transport in both Python and TypeScript, enabling developers to build and test MCP servers that communicate over HTTP with streaming support. It includes a complete client and server pair demonstrating real-time tool invocation through an AI-powered weather service example. Use this project to understand the Streamable HTTP transport spec or as a starting point for your own streaming MCP server.
Prerequisites
- Python 3.10+ (for the Python example) or Node.js 18+ (for the TypeScript example)
- An Anthropic API key (set in a .env file as ANTHROPIC_API_KEY)
- Git to clone the repository
- An MCP-compatible client or the included example client for testing
Clone the repository
Clone the mcp-streamable-http repository from Invariant Labs.
git clone https://github.com/invariantlabs-ai/mcp-streamable-http.git
cd mcp-streamable-httpSet your Anthropic API key
Create a .env file in the root with your Anthropic API key. This is required by the example client to process natural language through Claude.
echo 'ANTHROPIC_API_KEY=your_api_key_here' > .envStart the Python server (or TypeScript server)
For the Python example, install dependencies and start the weather MCP server. It listens on port 8123 by default. Use --port to change the port.
cd python-example/server
pip install .
python weather.py
# Or with a custom port:
python weather.py --port 8124Run the TypeScript server alternatively
If you prefer TypeScript, build and start the TypeScript server implementation.
cd typescript-example/server
npm install && npm run build
node build/index.jsStart the example client
In a separate terminal, run the example client which connects to the running server and opens an interactive chat loop powered by Claude.
cd python-example/client
pip install .
python client.py
# Connect to a non-default port:
python client.py --mcp-localhost-port 8124Interact with the weather tool via the chat loop
The client starts an interactive session. Type natural language queries about weather and Claude will invoke the MCP weather tool over Streamable HTTP transport.
MCP Streamable HTTP Examples
Client configuration
Configure Claude Desktop to connect to the running Streamable HTTP server using the mcp-remote adapter.
{
"mcpServers": {
"streamable-http-weather": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:8123/mcp"],
"env": {
"ANTHROPIC_API_KEY": "your_api_key_here"
}
}
}
}Prompts to try
Try these weather queries in the interactive client chat loop to test the Streamable HTTP transport.
- "Are there any weather alerts in Sacramento?"
- "What's the weather like in New York City right now?"
- "Tell me the forecast for Boston tomorrow"
- "Is it going to rain in Seattle this week?"
- "What's the current temperature in Austin, Texas?"Troubleshooting MCP Streamable HTTP
Client fails to connect with 'Connection refused' on port 8123
Ensure the server is running before starting the client. Check for port conflicts using 'lsof -i :8123'. Start the server in one terminal, then the client in another. Use --port and --mcp-localhost-port flags to use an alternate port on both sides.
ANTHROPIC_API_KEY not found or authentication error in the client
Create a .env file in the project root with ANTHROPIC_API_KEY=your_key. Alternatively, export it as an environment variable: 'export ANTHROPIC_API_KEY=your_key' before running the client.
pip install fails due to Python version incompatibility
The Python examples require Python 3.10 or higher for the MCP SDK. Check your version with 'python --version'. Use pyenv or a virtual environment to install a compatible Python version.
Frequently Asked Questions about MCP Streamable HTTP
What is MCP Streamable HTTP?
MCP Streamable HTTP is a Model Context Protocol (MCP) server that example implementation of mcp streamable http client/server in python and typescript. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCP Streamable HTTP?
Follow the installation instructions on the MCP Streamable HTTP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MCP Streamable HTTP?
MCP Streamable HTTP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP Streamable HTTP free to use?
Yes, MCP Streamable HTTP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
MCP Streamable HTTP Alternatives — Similar Developer Tools Servers
Looking for alternatives to MCP Streamable HTTP? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MCP Streamable HTTP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MCP Streamable HTTP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.