MCP Streamable HTTP

v1.0.0Developer Toolsstable

Example implementation of MCP Streamable HTTP client/server in Python and TypeScript.

llmmcpmcp-clientmcp-servermcp-streamable-http
Share:
129
Stars
0
Downloads
0
Weekly
0/5

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

Implement Streamable HTTP for MCP
Example implementations in Python and TypeScript
Enable streaming transport for MCP
LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 7, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-streamable-http

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-http
2

Set 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' > .env
3

Start 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 8124
4

Run 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.js
5

Start 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 8124
6

Interact 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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-streamable-http": { "command": "npx", "args": ["-y", "mcp-streamable-http"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides