MCP ExplorerExplorer

One Mcp

@One-MCPon 5 months ago
4 MIT
FreeCommunity
AI Systems
#mcp
An easy way to deploy multiple MCP servers in one Docker container.

Overview

What is One Mcp

one-mcp is a tool that simplifies the deployment of multiple MCP servers within a single Docker container, based on the multi-mcp project.

Use cases

Use cases include local development environments, cloud deployments on platforms like Huggingface, and scenarios where multiple MCP servers are needed for testing or production.

How to use

To use one-mcp, clone the repository, build the Docker image, and run it with your GitHub token and Tavily key. You can also deploy it to Huggingface by uploading the Dockerfile and mcp.json.

Key features

Key features include easy deployment in Docker, configuration flexibility through mcp.json, and optional authentication via AUTH_TOKEN for secure API access.

Where to use

one-mcp can be used in various fields such as software development, machine learning, and any application requiring multiple MCP server instances.

Content

One MCP

An easy way to deploy multiple MCP servers in one Docker container. Based on multi-mcp.

Getting Started

Local Deploy

docker pull ghcr.io/one-mcp/one-mcp:latest
docker run -p 7860:7860 one-mcp:latest

Extend the Image

You can based the Dockerfile in this repo to add things you need.
For example, you can use such a Dockerfile for the use of GitHub MCP.

You can also initialize environments like rust and java like this:

FROM ghcr.io/one-mcp/one-mcp:latest

# initiate rust environment
RUN apk add --no-cache rust cargo

# initiate java environment
RUN apk add --no-cache openjdk17-jre

# normally run the service
COPY mcp.json /app/mcp.json
EXPOSE 7860
CMD . .venv/bin/activate && hypercorn src.main:app --bind 0.0.0.0:7860

Use in your MCP client

For normal MCP client, you can use config below:

{
  "mcpServers": {
    "remote-mcp": {
      "autoApprove": [],
      "disabled": false,
      "timeout": 60,
      "type": "streamableHttp",
      "url": "https://example.com/mcp",
      "headers": {
        "X-MCP-Token": "123456"
      }
    }
  }
}

If your client does not support remote MCP server, or if you used authentication that some clients does not support, please use config below:

{
  "mcpServers": {
    "mcp-proxy": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://example.com/sse",
        "--header",
        "Authorization: Bearer <your-auth-token>"
      ]
    }
  }
}

If you are using Windows and Cline, you can try this:

{
  "mcpServers": {
    "mcp-proxy": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "mcp-remote",
        "https://example.com/sse",
        "--header",
        "Authorization: Bearer <your-auth-token>"
      ]
    }
  }
}

Extra prompts

This tool aggregates all of your selected MCP servers under one server, and used namespace like server_name::tool_name to avoid conflicts and allow multiple servers to expose tools with the same base name. But for some MCP clients, the model does not use the namespaced name, but uses tool name standalone, which will cause error.
You can try to use such a prompt to avoid that:

When you trying to use MCP tools, please use the `mcp-proxy` as server name and takes the namespace for tool names and resource names, like:
   1. `github::add_issue_comment` instead of `add_issue_comment`
   2. `context7::resolve-library-id` instead of `resolve-library-id`

Configuration

You can change the mcp.json file to add what you want.
The detailed configuration can be found here.

Authentication

Authentication in this project is controlled by the AUTH_TOKEN environment variable:

  • If the AUTH_TOKEN environment variable is not set: Authentication will be disabled, and all API requests can be accessed without a token.
  • If the AUTH_TOKEN environment variable is set: Authentication will be enabled. All protected API requests must include a Bearer Token in the HTTP request header, and this token must exactly match the value of the AUTH_TOKEN environment variable.

When authentication is enabled, you’ll need to include the Authorization header in your requests, like so:

Authorization: Bearer YOUR_AUTH_TOKEN_VALUE

OR:

X-MCP-Token: <Your-AUTH_TOKEN>

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers