Skip to main content
Glama

MCP Gateway


๐Ÿ“– Overview

MCP Gateway is a native, cross-platform desktop control plane and multiplexer for Anthropic's Model Context Protocol (MCP).

Normally, AI agents and IDEs (Cursor, Claude Desktop, Antigravity, Windsurf, Zed, Cline) require managing dozens of fragmented, individual MCP server processes. This results in port conflicts, memory bloat, high latencies, zero centralized access control, and complete lack of traffic observability.

MCP Gateway solves this by acting as a high-performance unified reverse proxy:

  • Exposes a single multiplexed SSE/HTTP endpoint (http://127.0.0.1:8080/sse) to your AI clients.

  • Connects simultaneously to multiple downstream MCP servers over Stdio, Server-Sent Events (SSE), and Streamable HTTP.

  • Dynamically aggregates, namespaces, audits, and secures all tools, prompts, resources, and database connections.

flowchart LR
    subgraph AI_Clients["AI IDEs & Agents"]
        C1["Claude Desktop"]
        C2["Cursor"]
        C3["Antigravity / Gemini"]
        C4["Windsurf / Zed"]
    end

    subgraph Gateway["MCP Gateway (Tauri v2 + Rust Core)"]
        direction TB
        Proxy["Unified SSE / HTTP Hub (:8080)"]
        SecGuard["Security Guardrails & Token Auth"]
        ApprModal["Interactive Tool Approval Modal"]
        Router["Tool Namespacing & Router"]
        DBEng["Built-in DB Engine (PG/SQLite/MySQL/Redis)"]
        TelMon["Live Telemetry & RPC Logger"]
        Tunnel["Cloudflare Zero Trust Tunnel"]
    end

    subgraph Upstream["Upstream MCP Servers"]
        S1["Local Stdio Servers (Docker, Node, Python)"]
        S2["Remote SSE Servers (Coolify, EasyPanel)"]
        S3["Cloud MCP Services"]
        S4["PostgreSQL / SQLite Databases"]
    end

    AI_Clients -->|Single SSE Connection| Proxy
    Proxy --> SecGuard
    SecGuard --> ApprModal
    ApprModal --> Router
    Router --> S1
    Router --> S2
    Router --> S3
    Router --> DBEng
    DBEng --> S4
    Tunnel -.->|Secure Remote Ingress| Proxy
    TelMon -.->|Observe| Router

Related MCP server: mcp_proxy

โœจ Features & Capabilities

1. โšก Unified Multi-Transport Multiplexing

  • Single Endpoint for AI: Point Claude Desktop or Cursor to http://127.0.0.1:8080/sse and gain instant access to every configured server.

  • Multi-Transport Support:

    • Stdio: Local binaries, Node (npx), Python (uvx), Docker containers.

    • SSE (Server-Sent Events): Long-lived real-time streams.

    • Streamable HTTP: Remote cloud MCP endpoints with custom auth headers.

  • Smart Tool Namespacing: Prevents name collisions across servers by auto-namespacing tools (e.g., coolify__<tool>, github__<tool>).

2. ๐Ÿ›ก๏ธ Enterprise-Grade Security & Guardrails

  • Bearer Token Management: Generate, inspect, rotate, and revoke cryptographically secure API tokens with customizable expiry and permission scopes.

  • Granular Permission Policies: Set per-server and per-tool rules:

    • Allow: Auto-execute without friction.

    • Require Approval: Pops up an interactive approval dialog before execution.

    • Deny: Blocks access entirely.

  • Interactive Approval Modal: Review tool arguments, target server, and operation severity before confirming destructive actions (e.g., DROP TABLE, container teardowns).

  • Zero-Secrets Policy: Tokens and credentials stay strictly local on host memory/storage; never exposed in telemetry or client error responses.

3. ๐ŸŒ Cloudflare Tunnel (Remote Zero-Trust Access)

  • Direct Remote Sharing: Share your local MCP servers with remote team members or cloud AI agents without public IP or firewall port forwarding.

  • Integrated Control: Start, stop, and inspect the tunnel status and public ingress hostname directly from the desktop UI.

4. ๐Ÿ—„๏ธ Built-in Database Engine (PostgreSQL, SQLite, MySQL, Redis)

  • Native Rust Connectors: High-performance database inspection powered by native Rust drivers.

  • Schema & Table Inspector: Inspect tables, column types, primary keys, and relations.

  • Interactive Query Console: Execute parameterized SQL queries, explain query performance, and safely test read/write workloads with transaction rollbacks.

5. ๐Ÿงช Interactive Tools Explorer & Playground

  • JSON Schema Inspector: Auto-parses tool parameter definitions (inputSchema) into clean visual forms.

  • Live Test Runner: Trigger any MCP tool directly inside the GUI, view execution latency, and inspect formatted JSON results.

  • Search & Filter: Real-time filtering, category sorting, and pagination across dozens or hundreds of aggregated tools.

6. ๐Ÿ“œ Resources & Prompts Explorer

  • MCP Resources: Browse file URIs, database schemas, and persistent application state exposed by connected servers.

  • Prompt Templates: Inspect registered prompt templates, variable slots, and sample prompts.

7. ๐Ÿ“Š Real-Time Traffic & RPC Telemetry

  • Live JSON-RPC Stream: Inspect bi-directional messages (tools/call, tools/list, resources/read, ping).

  • Telemetry Metrics: Real-time roundtrip latency (ms), success/error rates, and daily call counts.

  • Audit Log Controls: Search logs, auto-scroll toggle, pause/resume streaming, and 1-click JSON log export.

8. ๐Ÿ”„ IDE Auto-Discovery & 1-Click Sync

  • Automatic Config Scans: Scans and detects installed MCP configurations from:

    • ~/.cursor/mcp.json (Cursor)

    • ~/.gemini/config/mcp_config.json (Antigravity)

    • ~/Library/Application Support/Claude/claude_desktop_config.json (Claude Desktop)

    • Windsurf configuration directories

  • Export mcp.json: Generate a clean, 1-click configuration snippet ready to paste into any client.

9. ๐ŸŽจ Modern Native Desktop Experience

  • Responsive Layout: Fluid design built with Tailwind CSS v4, collapsible icon sidebar rail with tooltips, and screen-size adaptive buttons.

  • Table Pagination & Sorting: Robust pagination and column sorting across all data grids.

  • Native macOS & Windows Assets: Transparent floating quantum gateway emblem (.icns for macOS Dock, .ico for Windows).


๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v20+) or Bun (recommended)

  • Rust (latest stable) & Cargo (for Tauri v2 native desktop core)

Installation

  1. Clone the repository:

    git clone https://github.com/neondeveloperz/mcp-gateway.git
    cd mcp-gateway
  2. Install frontend dependencies:

    bun install
    # or: npm install
  3. Run in development mode (Desktop App):

    bun run tauri dev
  4. Build native production binaries:

    bun run tauri build

    The compiled desktop installer (.dmg on macOS, .msi / .exe on Windows) will be located in src-tauri/target/release/bundle/.


๐Ÿ”Œ Connecting to AI Clients

Add MCP Gateway to your AI client's configuration file as a single multiplexed server:

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "mcp-gateway": {
      "command": "curl",
      "args": ["-s", "-N", "http://127.0.0.1:8080/sse"],
      "headers": {
        "Authorization": "Bearer YOUR_GATEWAY_TOKEN"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "mcp-gateway": {
      "url": "http://127.0.0.1:8080/sse",
      "headers": {
        "Authorization": "Bearer YOUR_GATEWAY_TOKEN"
      }
    }
  }
}

Antigravity / Gemini CLI (~/.gemini/config/mcp_config.json)

{
  "mcpServers": {
    "mcp-gateway": {
      "url": "http://127.0.0.1:8080/sse",
      "headers": {
        "Authorization": "Bearer YOUR_GATEWAY_TOKEN"
      }
    }
  }
}

๐Ÿ› ๏ธ Project Architecture

mcp-gateway/
โ”œโ”€โ”€ public/                 # Static assets, web favicon, app-icon
โ”œโ”€โ”€ src-tauri/              # Rust Native Backend (Tauri v2 Core)
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ lib.rs          # Tauri command dispatcher & lifecycle
โ”‚   โ”‚   โ”œโ”€โ”€ gateway.rs      # Unified MCP routing engine & SSE server
โ”‚   โ”‚   โ”œโ”€โ”€ discovery.rs    # Host telemetry & IDE config scanner
โ”‚   โ”‚   โ”œโ”€โ”€ database.rs     # Native PostgreSQL/SQLite/MySQL/Redis engine
โ”‚   โ”‚   โ”œโ”€โ”€ security.rs     # Token guardrails & permission checks
โ”‚   โ”‚   โ”œโ”€โ”€ tunnel.rs       # Cloudflare Tunnel integration
โ”‚   โ”‚   โ””โ”€โ”€ types.rs        # Shared Rust types & data structures
โ”‚   โ”œโ”€โ”€ icons/              # Multi-resolution native app icons (.icns, .ico)
โ”‚   โ””โ”€โ”€ Cargo.toml          # Rust dependencies & optimization profiles
โ”œโ”€โ”€ src/                    # Frontend GUI (React 19 + TypeScript)
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ overview/       # Gateway dashboard, activity charts & stats
โ”‚   โ”‚   โ”œโ”€โ”€ servers/        # Server manager, connection state & actions
โ”‚   โ”‚   โ”œโ”€โ”€ database/       # Built-in database explorer & SQL runner
โ”‚   โ”‚   โ”œโ”€โ”€ tools/          # Interactive tool tester & parameter form
โ”‚   โ”‚   โ”œโ”€โ”€ resources/      # Prompt templates & resource inspector
โ”‚   โ”‚   โ”œโ”€โ”€ logs/           # Real-time JSON-RPC traffic monitor
โ”‚   โ”‚   โ”œโ”€โ”€ tunnel/         # Cloudflare Tunnel controller
โ”‚   โ”‚   โ”œโ”€โ”€ tokens/         # Bearer token generator & permissions
โ”‚   โ”‚   โ”œโ”€โ”€ security/       # Guardrail rules & interactive approval modal
โ”‚   โ”‚   โ”œโ”€โ”€ status/         # System telemetry & ping health probes
โ”‚   โ”‚   โ””โ”€โ”€ ui/             # shadcn/ui components, pagination, sorting
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ””โ”€โ”€ mcp-service.ts  # Gateway API client & event dispatcher
โ”‚   โ”œโ”€โ”€ App.tsx             # Main view router & layout container
โ”‚   โ””โ”€โ”€ main.tsx            # Application entry point
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ README.md

๐Ÿ›ก๏ธ Security & Privacy

  • Local-First Architecture: MCP Gateway runs strictly on your local machine (127.0.0.1). No telemetry or code is sent to external cloud servers unless you explicitly configure a Cloudflare Tunnel.

  • Fail-Safe Approvals: Destructive actions can be gated behind human confirmation via the approval modal.

  • Encrypted Local Storage: Stored tokens and server credentials follow least-privilege host permissions.


๐Ÿ“„ License

This project is licensed under the MIT License.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Centralizes management and routing of multiple MCP servers, exposing them to AI clients via HTTP/SSE endpoints with configurable visibility, sharing, and smart routing.
    2,698 npm
    Apache 2.0
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables centralized routing, discovery, namespacing, and execution of tools from multiple remote MCP servers over HTTP/SSE, aggregating them behind a unified MCP gateway with dynamic server management.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI clients to connect once and access tools from many registered MCP servers plus built-in modules, with multi-user authentication, per-user server/tool toggles, and a skills hub.
    MIT