MCP ExplorerExplorer

Mcpgate

@mokeyishon 25 days ago
1 Apache-2.0
FreeCommunity
AI Systems
#ai#llm#mcp
⚡ Blazing-fast MCP gateway written in Rust. Experience unparalleled speed & performance! 🚀

Overview

What is Mcpgate

mcpgate is a blazing-fast MCP gateway written in Rust that converts MCP server configurations into Streamable HTTP or Server-Sent Events (SSE) HTTP services for remote invocation.

Use cases

Use cases for mcpgate include integrating file system operations into web services, dynamic problem-solving tools for structured thought processes, and any scenario requiring efficient remote service communication.

How to use

To use mcpgate, download the binary for your platform, create a configuration file (config.json) with your MCP servers, start the service using the command ‘./mcpgate -C ./config.json -P 8080’, and verify the service through the provided HTTP endpoint.

Key features

Key features of mcpgate include support for multiple backend service types (stdio/SSE/streamableHttp), a unified service discovery interface, various runtime methods (Docker/Podman/NPM), and lightweight deployment with a single binary execution.

Where to use

mcpgate can be used in various fields where remote service invocation is required, such as web applications, microservices architecture, and real-time data processing.

Content

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

Parameter Description Default
-C Configuration file path ./config.json
-H Bind IP 0.0.0.0
-P Service listening port 8080

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.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers