MCPInstall
mcpgate logo

mcpgate

by mokeyish 8 stars mokeyish/mcpgate

⚡ Blazing-fast MCP gateway written in Rust. Experience unparalleled speed & performance! 🚀

READMEmain

MCP Gateway

The MCP Gateway is a lightweight tool that can convert the mcpServers configuration in configuration files into Streamable HTTP or Server-Sent Events (SSE) HTTP services for remote invocation.

Features

  • Supports multiple backend service types: stdio/SSE/streamableHttp
  • Provides a unified service discovery interface
  • Supports various runtime methods: Docker/Podman/NPM, etc.
  • Lightweight deployment with single binary execution

Quick Start

1. Download the Program

Get the binary for your platform from the releases page.

2. Configure MCP Server

Create a configuration file ./config.json:

{
    "mcpServers": {
        "filesystem": {
            "name": "File System",
            "description": "Operations on file system files",
            "type": "stdio",
            "command": "podman",
            "cwd": "./work/filesystem",
            "args": [
                "run",
                "-i",
                "--rm",
                "-v", "./:/projects",
                "--user", "0:0",
                "mcp/filesystem",
                "/projects"
            ]
        },
        "sequentialthinking": {
            "name": "Sequential Thinking",
            "description": "A tool for dynamic reflective problem-solving through structured thought processes",
            "type": "stdio",
            "command": "podman",
            "args": [
                "run",
                "-i",
                "--rm",
                "mcp/sequentialthinking"
            ]
        }
    }
}

3. Start the Service

./mcpgate -C ./config.json -P 8080

4. Verify the Service

Access the service discovery interface in your browser:

http://localhost:8080/mcp/config.json

Service Configuration Methods

1. Using Existing HTTP Services

Directly configure remote SSE or Streamable HTTP endpoints:

{
    "mcpServers": {
        "sequentialthinking_sse": {
            "type": "sse",
            "url": "https://mcpserver.com/sequentialthinking/sse"
        },
        "sequentialthinking_http": {
            "type": "streamable",
            "url": "https://mcpserver.com/sequentialthinking"
        }
    }
}

2. Using Container Runtime

Get official images from Docker Hub - MCP:

{
    "mcpServers": {
        "sequentialthinking": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "mcp/sequentialthinking"
            ]
        }
    }
}

3. Using NPM Packages

Requires pre-installed Node.js environment:

{
    "mcpServers": {
        "memory": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "run",
                "-y",
                "@modelcontextprotocol/server-memory"
            ]
        }
    }
}

4. Custom Service Development

Refer to language SDKs to develop custom services:

Python Example

Using Python SDK:

{
    "mcpServers": {
        "custom_server": {
            "type": "stdio",
            "command": "python",
            "args": ["server.py"]
        }
    }
}

Advanced Configuration

ParameterDescriptionDefault
-CConfiguration file path./config.json
-HBind IP0.0.0.0
-PService listening port8080

Notes

  1. Ensure stdio-type services are designed for standard input/output
  2. SSE services must support text/event-stream format
  3. HTTPS configuration is recommended for production environments

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

More Deployment & DevOps MCP servers

Similar servers from the same category.

OpsLevel

opslevel

Provides direct access to OpsLevel's developer portal data, enabling intelligent interactions with service catalogs, component metrics, and operational workflows for DevOps teams managing service infrastructure.

TextModel

KubeSphere

kubesphere

Integrates with KubeSphere APIs to enable management of Kubernetes clusters, workspaces, users, and extensions through natural language commands without navigating the web console.

Deployment & DevOps

Integrates tools for managing resources in the Cloudflare Workers Platform.

Deployment & DevOps

EdgeOne Pages

tencentedgeone

Enables rapid deployment of HTML content to Tencent's EdgeOne Pages service with integrated Functions and KV store support for edge hosting

content