MCP Gateway
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Gateway
A single MCP server for internal LLM services. Those services call only the gateway; the gateway routes to per-app MCPs (ADO, Oracle, and the rest of the estate).
Internal LLM → MCP Gateway (one MCP) → ADO MCP, Oracle MCP, … (~50 app MCPs)v1 also applies identity, redaction, authorization, and audit on that hop. Downstream MCP URLs and which caller may use which MCP live in static config (config/mcp-servers.yaml). IDE clients are out of scope.
This branch implements feature 1: authenticated tool discovery. tools/call, redaction, and audit are still stubbed.
See docs/mcp-gateway.md for locked decisions and BDD.
Tech stack
Layer | Choice | Why |
Language | Python 3.12+ | Matches the team preference; strong libraries for HTTP proxies, policy, and data masking |
HTTP API | FastAPI + Uvicorn | Native async, typed request models, good fit for a JSON-RPC/MCP front door on port 8000 |
Settings | Pydantic Settings | Env-driven config ( |
Registry | Static YAML |
|
Audit store | SQLAlchemy 2 (asyncio) + aiosqlite | Local SQLite audit table; same engine can move to Postgres |
Downstream MCP | httpx | Async client for MCP JSON-RPC against registered app MCPs |
Tests | pytest + pytest-asyncio | FastAPI |
Lint | Ruff | Single tool for lint and import sorting |
Related MCP server: MCP Policy Gateway
Layout
config/mcp-servers.yaml # Static registry (ADO, Oracle examples)
src/mcp_gateway/
main.py # FastAPI app factory and uvicorn entrypoint
config.py # Settings
api/ # HTTP: /health and JSON-RPC POST /
auth/ # Token → internal LLM caller (stub)
governance/ # Redaction + authorization (stubs)
audit/ # Append-only audit store (stub)
registry/ # Static YAML catalog
proxy/ # MCP client to app MCPs
discovery.py # tools/list aggregation + namespacing
tests/
features/ # Gherkin aligned with the architecture docLocal run
Requires Python 3.12+ and uv.
uv sync --group dev
cp .env.example .env
uv run mcp-gatewayService listens on http://localhost:8000.
curl -s http://localhost:8000/health
curl -s -X POST http://localhost:8000/ \
-H 'content-type: application/json' \
-H 'authorization: Bearer coding-assistant-dev-token' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'uv run pytestThis server cannot be deployed
Maintenance
Related MCP Connectors
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Scan prompts for injection attacks, redact PII, and audit LLM SDK usage from any MCP client
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
Call AI by role, not by model: tiered AI gateway over REST and MCP.
Related MCP Servers
- FlicenseAqualityDmaintenanceUnified MCP server for querying multiple LLM providers (Gemini, OpenAI, Anthropic, etc.) with advanced routing, cost optimization, and fallback resilience.222 npm-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and MCP clients to safely access upstream MCP servers through centralized policy enforcement, including allow/deny/approval decisions, schema pinning, circuit breakers, and audit logging.MIT
- AlicenseNot gradedqualityCmaintenanceProvides a security and context-control layer that multiplexes multiple MCP servers behind a single endpoint, scanning tool definitions and results, enforcing authorization, rate limiting, and audit logging, and dynamically retrieving tools to manage context window usage.MIT
- AlicenseAqualityCmaintenancePuts a single MCP endpoint in front of many downstream MCP servers, routing each prompt to the right server and tools so an agent sees a few relevant tools instead of every schema. Reads run automatically, writes require explicit user confirmation via elicitation, and consequential calls are blocked by a risk gate that logs every routing decision and call.3MIT