mcp-gway
MCP Gateway
단일 HTTP/SSE 엔드포인트 뒤에서 여러 MCP(Model Context Protocol) 서버를 집계하는 독립형 CLI 게이트웨이로, Code Mode를 통해 여러 MCP 서버를 사용할 때 LLM 입력 토큰 사용량을 최대 92%까지 줄입니다.
기능
다중 서버 집계 — 여러 MCP 서버(HTTP, SSE, Stdio, Streamable HTTP)에 연결하고 단일 엔드포인트로 노출합니다
Code Mode — LLM이 모든 스키마를 미리 로드하지 않고도 도구를 동적으로 발견하고 사용할 수 있게 해주는 4개의 메타 도구
OAuth 2.0 지원 — 동적 클라이언트 등록(RFC 7591) 및 토큰 저장 기능을 갖춘 내장 OAuth 흐름
격리된 샌드박스 — 안전한 코드 실행을 위한 Starlark 기반 샌드박스
MCP 프로토콜 호환 — Claude Desktop, Cursor 및 모든 MCP 호환 클라이언트에서 작동
Related MCP server: MCP Server Proxy
설치
pip install mcp-gway또는 mise 사용:
mise install
uv sync빠른 시작
# Add an MCP server
mcp-gway add youtube --type http --url http://localhost:3001/mcp
# Add a stdio server
mcp-gway add filesystem --type stdio --command npx --args '["-y", "@anthropic/mcp-filesystem"]'
# Add a server requiring OAuth
mcp-gway add supabase --type streamable-http --url https://mcp.supabase.com/mcp
# List all servers
mcp-gway list
# Start the gateway
mcp-gway serve --port 8080Claude Desktop에서 연결
Claude Desktop 구성(~/Library/Application Support/Claude/claude_desktop_config.json)에 추가하세요:
{
"mcpServers": {
"gateway": {
"url": "http://localhost:8080/mcp"
}
}
}명령어
명령어 | 설명 |
| MCP 서버를 추가하고 |
| MCP 서버 제거 |
| 서버의 도구 업데이트 |
| 연결된 모든 서버 나열 |
| 서버의 도구 시그니처 표시 |
| 연결을 새로 고치고 도구 재발견 |
| 게이트웨이 서버 시작 |
Code Mode
연결되면 게이트웨이는 4개의 메타 도구를 노출합니다:
도구 | 설명 |
| 사용 가능한 모든 |
| 스텁에서 함수 시그니처 읽기 |
| 도구에 대한 자세한 문서 가져오기 |
| 샌드박스 처리된 Starlark 인터프리터에서 코드 실행 |
OAuth 인증
OAuth가 필요한 서버(예: Supabase)의 경우:
# Trigger OAuth flow
mcp-gway refresh supabase --auth
# Or store token manually
mkdir -p ~/.config/mcp-gway/tokens
echo '{"access_token": "YOUR_TOKEN"}' > ~/.config/mcp-gway/tokens/supabase.json개발
# Install dependencies
mise install
uv sync
# Run tests
uv run pytest -v
# Lint and format
uv run ruff check src/ tests/
uv run ruff format src/ tests/아키텍처
┌─────────────────────────────────────────────────────────┐
│ MCP Gateway │
├─────────────────────────────────────────────────────────┤
│ CLI (click) │ HTTP/SSE Server (Starlette) │
│ - add │ - POST /mcp (JSON-RPC) │
│ - remove │ - GET /mcp (SSE stream) │
│ - list │ - POST /mcp/messages │
│ - refresh │ │
├─────────────────────────────────────────────────────────┤
│ Code Mode (4 meta-tools) │ Starlark Sandbox │
│ - listToolFiles │ - Hermetic execution │
│ - readToolFile │ - Server injection │
│ - getToolDocs │ │
│ - executeToolCode │ │
├─────────────────────────────────────────────────────────┤
│ Registry (.pyi files) │ OAuth2 (RFC 7591) │
│ - servers/*.pyi │ - Dynamic registration│
│ - Tool signatures │ - Token storage │
└─────────────────────────────────────────────────────────┘
│ │ │
┌────┴────┐ ┌────┴────┐ ┌────┴────┐
│ Server1 │ │ Server2 │ │ Server3 │
│ (HTTP) │ │ (SSE) │ │ (Stdio) │
└─────────┘ └─────────┘ └─────────┘라이선스
MIT
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
- FlicenseNot gradedqualityNot gradedmaintenanceAggregates multiple MCP servers behind a single, secure endpoint with unified tool/resource discovery, OAuth authentication, and resilient request routing. Enables users to manage and interact with multiple MCP backends through one centralized interface with load balancing and circuit breakers.2
- AlicenseNot gradedqualityDmaintenanceAggregates multiple MCP servers into a single endpoint, enabling LLM clients to access tools, resources, and prompts from various backends through one connection.15MIT
- AlicenseBqualityBmaintenanceAggregates multiple MCP servers via a single interface with token optimization and multiple operating modes (Gateway, Meta, Proxy, Search, Code).78MIT
- FlicenseNot gradedqualityCmaintenanceAggregates multiple MCP servers into a single unified endpoint with hot-plugging, multi-protocol support, and management via web and CLI.9
Related MCP Connectors
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Self-hosted federated MCP gateway: one OAuth 2.1 MCP server in front of N apps, user-level scopes.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
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/deuriib/mcp-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server