MCPGate
MCPGate
軽量なMCPゲートウェイ — MCPツールを集約、フィルタリング、監視します。
MCPGateは、MCPクライアント(Claude Desktop、Claude Code、Cursor、VS Code)と複数のMCPサーバーの間に配置されます。単一の統合されたMCPエンドポイントを提供しつつ、どのツールを公開するかをきめ細かく制御できます。
特徴
ツール集約 — 複数のMCPサーバーを接続し、すべてのツールを1つのエンドポイント経由で公開
ツールフィルタリング — シンプルなYAML設定により、サーバーごとに特定のツールを許可/ブロック
ツールプレフィックス — 自動名前空間化(
github.create_issueなど)により競合を回避Webダッシュボード — サーバー、ツール、リクエストログを表示するリアルタイムステータスページ
デュアルトランスポート — Stdio(Claude Desktop)またはHTTP/SSE(リモートクライアント)に対応
監査ログ — すべてのツール呼び出しをタイミング付きで記録。PostgreSQLによる永続化も可能
セルフホスト — Railway、Docker、またはローカル環境で実行可能
Related MCP server: MCPHub
クイックスタート
ローカル(stdio — Claude Desktop用)
npx mcp-gate start --config mcpgate.yamlclaude_desktop_config.json に以下を追加します:
{
"mcpServers": {
"mcpgate": {
"command": "npx",
"args": ["-y", "mcp-gate", "start", "--config", "/path/to/mcpgate.yaml"]
}
}
}ローカル(HTTP — ダッシュボード付き)
npx mcp-gate start --config mcpgate.yaml
# Dashboard at http://localhost:3000
# MCP endpoint at http://localhost:3000/mcpDocker
docker compose up
# Dashboard at http://localhost:3000
# Includes PostgreSQL for persistent audit trailまたはスタンドアロンで実行:
docker run -p 3000:3000 \
-e MCPGATE_CONFIG=$(cat mcpgate.yaml | base64 -w 0) \
-e GITHUB_TOKEN=$GITHUB_TOKEN \
ghcr.io/mprezz/mcpgateRailway
永続的な監査ログのためにPostgreSQLプラグインを追加してください。MCPGateは DATABASE_URL を自動的に検出します。
設定
mcpgate.yaml を作成します:
gateway:
name: "my-gateway"
transport: "stdio" # stdio | http | both
port: 3000
toolPrefix: true # prefix tools with server name
servers:
- name: "github"
transport: "stdio"
command: "npx"
args: ["-y", "@modelcontextprotocol/server-github"]
env:
GITHUB_TOKEN: "${GITHUB_TOKEN}"
tools:
allow:
- "create_issue"
- "search_repos"
- name: "filesystem"
transport: "stdio"
command: "npx"
args: ["-y", "@modelcontextprotocol/server-filesystem", "/home/user"]
tools:
block:
- "write_file"
- "delete_file"
logging:
level: "info"詳細なリファレンスについては mcpgate.example.yaml を参照してください。
サポートされているアップストリームトランスポート
stdio— MCPGateがアップストリームプロセスをローカルで起動しますhttp— MCPGateがStreamable HTTP経由でリモートのMCPサーバーに接続します
HTTPアップストリームの例:
servers:
- name: "remote-api"
transport: "http"
url: "https://remote-mcp.example.com/mcp"
headers:
Authorization: "Bearer ${REMOTE_MCP_TOKEN}"ツールフィルタリング
各サーバーで allow または block をサポートしています(排他的):
allow— 指定したツールのみを公開します(ホワイトリスト)block— 指定したツール以外のすべてを公開します(ブラックリスト)指定なし — すべてのツールを公開します
認証
HTTPトランスポートを保護するためにベアラートークンを追加します:
gateway:
auth:
token: "${MCPGATE_AUTH_TOKEN}"認証が設定されている場合:
すべてのエンドポイントで
Authorization: Bearer <token>ヘッダーが必要です/healthは公開されたままとなります(Railway/Dockerのヘルスチェック用)MCPクライアントは、トランスポート設定のカスタムヘッダー経由でトークンを渡します
認証が設定されていない場合、すべてのエンドポイントはオープンになります(ローカル/プライベート利用向け)。
環境変数の補間
YAML内で ${VAR} または ${VAR:-default} を使用して環境変数を参照できます:
env:
GITHUB_TOKEN: "${GITHUB_TOKEN}"
API_URL: "${API_URL:-https://api.example.com}"ダッシュボード
HTTPモードで実行すると、MCPGateはルートURLでWebダッシュボードを提供します:
/— アップストリームサーバー、ツール、リクエストログを表示するステータスページ/api/status— プログラムアクセス用のJSON API/health— ヘルスチェックエンドポイント(Railway/Docker用)/mcp— MCPプロトコルエンドポイント(Streamable HTTP)
ストレージ
MCPGateは、すべてのツール呼び出しをタイミングおよびエラー情報とともに記録します。
デフォルト — インメモリ(設定不要、再起動時に消失)
PostgreSQL —
DATABASE_URL環境変数を設定(テーブルは自動的に作成されます)
# Local development with Docker Compose
docker compose up postgres -d
export DATABASE_URL=postgresql://mcpgate:mcpgate@localhost:5432/mcpgate
npx mcp-gate start --config mcpgate.yaml環境変数
変数 | 必須 | デフォルト | 説明 |
| いいえ |
| HTTPポート(Railwayはこれを自動設定します) |
| いいえ | — | Base64エンコードされたYAML設定(Railway/Docker用) |
| いいえ | — | PostgreSQL接続文字列(永続的な監査ログを有効化) |
| いいえ |
|
|
| いいえ | — | HTTP認証用ベアラートークン(YAML内で |
開発
git clone https://github.com/mprezz/mcpgate.git
cd mcpgate
npm install
npm run dev # development with hot reload
npm run build # compile TypeScript
npm run test # run tests (vitest)
npm run lint # eslint
npm run typecheck # tsc --noEmitアーキテクチャ
Client (Claude, Cursor)
│
▼ stdio or HTTP/SSE
┌──────────────────────────────┐
│ MCPGate │
│ │
│ ┌─────────────────────┐ │
│ │ Tool Registry │ │ ← filters + namespaces tools
│ └─────────────────────┘ │
│ ┌─────────────────────┐ │
│ │ Tool Router │ │ ← routes calls to correct server
│ └─────────────────────┘ │
│ ┌─────────────────────┐ │
│ │ Upstream Manager │ │ ← manages server connections
│ └─────────────────────┘ │
│ ┌─────────────────────┐ │
│ │ Storage │ │ ← memory or PostgreSQL
│ └─────────────────────┘ │
└──────────────────────────────┘
│ │ │
▼ ▼ ▼
Server A Server B Server C
(GitHub) (Filesystem) (Custom)ライセンス
Apache 2.0 — LICENSE を参照
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseCqualityDmaintenanceA powerful gateway for the Model Context Protocol (MCP) that unifies AI toolchains by federating multiple MCP servers, wrapping REST APIs as MCP tools, and supporting multiple transport methods with an admin dashboard.1
- AlicenseNot gradedqualityNot gradedmaintenanceA unified gateway and dashboard that aggregates multiple MCP servers into a single endpoint for streamlined management by AI clients. It features a centralized YAML configuration, a web-based monitoring dashboard, and hot-reload support for managing filesystem, GitHub, and database tools.
- FlicenseNot gradedqualityDmaintenanceA centralized management platform that aggregates multiple Model Context Protocol (MCP) servers into a single unified endpoint for AI agents. It provides a web interface for hot-swappable tool management, proxying of existing servers, and AI-powered generation of custom MCP plugins.1
- AlicenseNot gradedqualityCmaintenanceA unified gateway and web dashboard that aggregates multiple MCP servers into a single Streamable HTTP endpoint. It supports stdio, SSE, and HTTP protocols, featuring optimized tool exposure modes to reduce token consumption for AI clients.5MIT
Related MCP Connectors
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/martin-santiago/mcpgate'
If you have feedback or need assistance with the MCP directory API, please join our Discord server