Skip to main content

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:

  1. Update the version in pyproject.toml
  2. Create a git tag: git tag v0.1.1
  3. Push the tag: git push origin v0.1.1
  4. 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

Michael Ludvig

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

mcp_http_bridge-1.3.1.tar.gz (74.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_http_bridge-1.3.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_http_bridge-1.3.1.tar.gz.

File metadata

  • Download URL: mcp_http_bridge-1.3.1.tar.gz
  • Upload date:
  • Size: 74.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcp_http_bridge-1.3.1.tar.gz
Algorithm Hash digest
SHA256 36a491cd97b12c4d426c479749eb4ad39a22d0de396e469c651f997ed63a2cca
MD5 42730edcc8c9c69e181afb5497849afe
BLAKE2b-256 978ed902e3da225e72b520f579da378d7b23ebce49a8180f5c59e8efdc0aa680

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_http_bridge-1.3.1.tar.gz:

Publisher: release.yml on mludvig/mcp-http-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_http_bridge-1.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_http_bridge-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd03dbc81294d7156b0e8d12f5fc56297b350daf2eeb511cfe2e4ce0dc42a12e
MD5 c73a62d1c8174287d4414469980dec1f
BLAKE2b-256 a84f2526d86a51cd804f3333e496790886c254ec7006a92791405e30d15f1190

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_http_bridge-1.3.1-py3-none-any.whl:

Publisher: release.yml on mludvig/mcp-http-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page