MCP stdio adapter

by jrderuiter

360 downloads
Not rated
GitHub

About

Expose a remote MCP server (HTTP) as a local stdio MCP server.

Details

Author
jrderuiter
Downloads
360
Categories
Developer Tools

- Converts remote HTTP MCP servers to local stdio.
- Supports both native Python (uv) and Docker runtimes.
- Simple environment variable configuration (SERVER_ADDRESS).
- Ready-to-use in Zed editor with minimal setup.
- No modification required to the remote server.

Run the adapter from the command line by setting the SERVER_ADDRESS environment variable to your remote server’s URL and using either uv run fastmcp run main.py or a Docker container (jrderuiter/mcp-stdio-adapter). In Zed, add a context_servers entry with the appropriate command and environment variables (native or Docker).

MCP stdio adapter

Adapter that allows you to expose a remote MCP servers (streamable HTTP) as a local stdio MCP server. Useful for using remote MCP servers in applications that only support stdio (such as Zed).

graph LR
    remote(Remote server)
	adapter[This adapter]
	editor(Local editor)

editor -->|stdio| adapter
adapter -->|HTTP| remote

Usage

From the command line

You can run the proxy as follows:

SERVER_ADDRESS=http://<address-of-your-mcp-server> uv run fastmcp run main.py

or using Docker:

docker run --rm -it -e SERVER_ADDRESS=http://<your-server-address> jrderuiter/mcp-stdio-adapter

In Zed

For Zed, you can configure the proxy by adding the following context_servers entry in your settings file:

  "context_servers": {
    "<name-of-your-server>": {
      "command": {
        "path": "uv",
        "args": [
          "run",
          "--project",
          "<local-path-to-this-repo>",
          "fastmcp",
          "run",
          "<local-path-to-this-repo>/main.py"
        ],
        "env": {
          "SERVER_ADDRESS": "http://<address-of-your-server>"
        }
      }
    }

or using Docker:

  "context_servers": {
    "<name-of-your-server>": {
      "command": {
        "path": "docker",
        "args": [
          "run",
          "--rm",
          "-i",
          "-e",
          "SERVER_ADDRESS",
          "jrderuiter/mcp-stdio-adapter",
        ],
        "env": {
          "SERVER_ADDRESS": "http://<address-of-your-server>"
        }
      }
    }

Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Submit a pull request

Author

Julian de Ruiter

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.