Streamable HttpBLOCK
Example implementation of MCP Streamable HTTP client/server in Python and TypeScript.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
This repository provides example implementations of MCP (Model Context Protocol) Streamable HTTP client and server in Python and Typescript, based on the specification: 📄 MCP Streamable HTTP Spec.
You can set up a client + server stack entirely using either Python or TypeScript. This example also demonstrates cross-language compatibility, allowing a Python client to communicate with a TypeScript server, and vice-versa.
🚀 Getting Started
1. Clone the Repository
git clone https://github.com/invariantlabs-ai/mcp-streamable-http.git cd python-example
2. Python Example
1. Add Your Anthropic API Key
Update the .env file inside the python-example/client directory with the following content:
ANTHROPIC_API_KEY=your_api_key_here
2. Set Up the Server
cd python-example/server pip install . python weather.py
By default, the server will start at http://localhost:8123. If you'd like to specify a different port, use the --port flag:
python weather.py --port=9000
3. Set Up the Client
cd ../client pip install .
4. Run the Client
python client.py
This will start an interactive chat loop using the MCP Streamable HTTP protocol. If you started the MCP server on a different port, specify it using the --mcp-localhost-port flag:
python client.py --mcp-localhost-port=9000
3. Typescript Example
1. Add Your Anthropic API Key
Update the .env file inside the typescript-example/client directory with the following content:
ANTHROPIC_API_KEY=your_api_key_here
2. Set Up the Server
cd typescript-example/server npm install && npm run build node build/index.js
By default, the server will start at http://localhost:8123. If you'd like to specify a differe
a9ed2ebce6a8OBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add server --env ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} -- npx -y [email protected]{
"mcpServers": {
"server": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}"
}
}
}
}Exposed tools (2)
2 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
get_alerts | read | Get weather alerts for a US state. |
get_forecast | read | Get weather forecast for a location. |
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | FAIL |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (2 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (7)
.env
.env
.env
.env
@anthropic-ai/sdk, @modelcontextprotocol/sdk, dotenv, @types/node, typescript
@modelcontextprotocol/sdk, express, @types/express, @types/node, typescript
Gates applied: no_behavioural_pass, no_license.
a9ed2ebce6a8full audit observations/trust-audit/mcp-server/invariantlabs-ai__streamable-http-1.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | a9ed2ebce6a8 | BLOCK | D | 69 | first audit |
Questions
What is the Streamable Http MCP server?
Example implementation of MCP Streamable HTTP client/server in Python and TypeScript.
What tools does Streamable Http expose?
2 in total: 2 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Streamable Http safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (69/100) and found 2 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does Streamable Http need?
It reads ANTHROPIC_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Streamable Http run?
It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as server at 1.0.0.
How current is this page?
The grade is for one exact copy of the source (a9ed2ebce6a8), read on 2026-10-07. The repository is watched and re-audited when it changes.