Bridge for stdio-only MCP tools that exposes their stdio protocol via streamable-http
Project description
MCP Network Bridge
Enable network access to STDIO-based MCP servers through HTTP streamable protocol.
The Problem
Many open-source MCP servers only support the local-only stdio protocol. For
one reason or another their developers never bothered to implement one of the
two network-enabled modes: SSE or StreamableHTTP. In most cases that's fine -
Claude Code or Cursor or any other modern IDE supports MCP over stdio.
But when your AI application is not a stock-standard IDE that needs access to
some MCP server over the network you've got a problem.
One option is to add Streaming HTTP support to the MCP servers that you want to use. It's usually not very difficult but also it's not very scalable.
A better option is to Bridge the STDIO local-only protocol to StreamableHTTP network-enabled protocol. And that's what this project is for.
Learn more about STDIO and StreamableHTTP MCP Protocols
Quick Start
The typical MCP server will provide a sample config to use. It could be something like:
{
"server": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-everything"
]
}
}
We can use the same config.json with mcp-network-bridge:
Run directly with uvx
uvx mcp-http-bridge --config config.json
Or specify the command as a parameter:
uvx mcp-http-bridge --command "npx -y @modelcontextprotocol/server-everything"
We can also run it in a Docker container with both Python (uvx) and Node.JS (npx) environment pre-installed:
Run with Docker:
docker run --rm -it -p 8000:8000 -v $(pwd)/config.json:/app/config.json ghcr.io/mludvig/mcp-http-bridge
Check our sample docker-compose.yml for a Docker Compose example.
Your MCP server is now available at http://localhost:8000/mcp/.
Test it out with MCP Inspector.
MCP server network access
With the bridge running the MCP server can now be accessed over the network:
{
"server": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp/",
}
}
Security
This bridge doesn't implement any security or access control.
You'll have to configure something like nginx in front of it for TLS or Authentication support.
That's beyond the scope of this project since better and more appropriate tools already exist.
Development
Local Development
This project uses uv for dependency management:
# Install dependencies
uv sync --extra dev
# Run tests
uv run pytest
# Run linting
uv run ruff check src/ tests/
# Format code
uv run ruff format src/ tests/
# Run the CLI
uv run mcp-http-bridge --help
CI/CD
This project uses GitHub Actions for:
- Continuous Integration: Runs tests, linting, and formatting checks on every push and PR
- Build and Release: Automatically builds and publishes to PyPI and GHCR when tags are pushed
- Dependency Updates: Dependabot keeps dependencies up to date
To publish a new release:
- Update the version in
pyproject.toml - Create a git tag:
git tag v0.1.1 - Push the tag:
git push origin v0.1.1 - GitHub Actions will automatically build and publish to PyPI and GHCR
Publishing to PyPI
The workflow uses Trusted Publishing to securely publish to PyPI without storing API tokens. Make sure to configure the PyPI trusted publisher for this repository.
Author
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_http_bridge-1.3.2.tar.gz.
File metadata
- Download URL: mcp_http_bridge-1.3.2.tar.gz
- Upload date:
- Size: 74.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ba6a93906edd373303bb5e2a8a288b3685c820c0659d12e7b9d3b287cc15055
|
|
| MD5 |
9ffce43ae65a8de8eba8aaf887c778bf
|
|
| BLAKE2b-256 |
ace4b1e8aff043a97e14a7b7a8342df5a04620ce4f60a23bdda27b3f15c56fb1
|
Provenance
The following attestation bundles were made for mcp_http_bridge-1.3.2.tar.gz:
Publisher:
release.yml on mludvig/mcp-http-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_http_bridge-1.3.2.tar.gz -
Subject digest:
7ba6a93906edd373303bb5e2a8a288b3685c820c0659d12e7b9d3b287cc15055 - Sigstore transparency entry: 366702983
- Sigstore integration time:
-
Permalink:
mludvig/mcp-http-bridge@b40b2630477f1ed3c7a22d793ac847e9db17bfed -
Branch / Tag:
refs/tags/v1.3.2 - Owner: https://github.com/mludvig
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b40b2630477f1ed3c7a22d793ac847e9db17bfed -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcp_http_bridge-1.3.2-py3-none-any.whl.
File metadata
- Download URL: mcp_http_bridge-1.3.2-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b8c40e1cb82ebef347e8f0f0b6ab6286c85a36127edc3e92840d9e923cc48b9
|
|
| MD5 |
bf686598fd4587473361f42bb792d3d0
|
|
| BLAKE2b-256 |
01b231b9d301e9dd02937ea14ffa6493d273d161205eba61deb7d2808266d60b
|
Provenance
The following attestation bundles were made for mcp_http_bridge-1.3.2-py3-none-any.whl:
Publisher:
release.yml on mludvig/mcp-http-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_http_bridge-1.3.2-py3-none-any.whl -
Subject digest:
2b8c40e1cb82ebef347e8f0f0b6ab6286c85a36127edc3e92840d9e923cc48b9 - Sigstore transparency entry: 366703011
- Sigstore integration time:
-
Permalink:
mludvig/mcp-http-bridge@b40b2630477f1ed3c7a22d793ac847e9db17bfed -
Branch / Tag:
refs/tags/v1.3.2 - Owner: https://github.com/mludvig
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b40b2630477f1ed3c7a22d793ac847e9db17bfed -
Trigger Event:
push
-
Statement type: