mcp-http-adapter

Adapter that allows you to expose a stdio MCP server over streamable HTTP.

GitHubスター

1

ユーザー評価

未評価

フォーク

0

イシュー

0

閲覧数

1

お気に入り

0

README
MCP HTTP adapter

Adapter that allows you to expose a stdio MCP server over streamable HTTP. Useful for exposing servers that can otherwise only be run locally with a broader audience.

graph LR
  server(MCP server)
	adapter[This adapter]
	client(MCP client)

	client -->|HTTP| adapter
  adapter -->|stdio| server
Usage
Creating the config file

Before running the adapter, you first need to create a configuration file (e.g. config.json) describing the command that should be run to start the stdio MCP server that we're going to proxy.

This config file requires the following fields:

  • command: The command to run.
  • args: List of arguments to pass to the command.
  • env: List of environment variables to include in the environment.

For example, for the Github MCP server this config would look like:

{
  "command": "github-mcp-server",
  "args": ["stdio"],
  "env": ["GITHUB_PERSONAL_ACCESS_TOKEN"]
}
Running using uv

Once you have the config file, you can run the adapter using:

CONFIG_PATH=config.json uv run fastmcp run main.py --transport streamable-http

Note that you'll also need to pass any variables listed in env here as well.

Running using Docker

Alternatively, you can also run the server using Docker. Note that in this case you'll need to make sure that the required MCP server binaries are also included in the image, together with your config file.

For an example involving the Github MCP server, see the docker/github folder. You can also run this example locally using:

docker run --rm -it -p 8000:8000 --env-file .env jrderuiter/mcp-stdio-adapter-github

where the .env file should contain the environment variable GITHUB_PERSONAL_ACCESS_TOKEN with a GitHub PAT token.

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

Julian de Ruiter

作者情報
Julian de Ruiter
Xebia DataAmsterdam

56

フォロワー

57

リポジトリ

6

Gist

2

貢献数

トップ貢献者

スレッド