
Agent MCP Gateway
Solves a real problem if you're running multiple MCP servers in Claude Code or similar environments: instead of dumping every tool definition into context at startup (often 5k to 50k tokens), this gateway loads just three tools that let agents discover and request specific capabilities on demand. You configure downstream MCP servers in one file and access policies in another, then agents call list_servers to see what's available, get_server_tools to fetch definitions, and execute_tool to run them. Supports wildcard patterns for tool matching, per-agent access control with deny-before-allow rules, audit logging, and hot config reloads. Most useful when you have lots of MCP servers configured but each agent or subagent only needs a subset, cutting context usage by 90% or more.
- GitHub stars
- 41
- tools
- 4
- transport
- STDIO
- env vars
- 4
- last updated
- Dec 2, 2025
Tools
4 toolsPublic tool metadata for what this MCP can expose to an agent.
list_serversLists MCP servers available to the calling agent based on policy rules.
Lists MCP servers available to the calling agent based on policy rules.
No parameter schema in public metadata yet.
get_server_toolsRetrieves tool definitions from a specific MCP server, filtered by agent permissions.
Retrieves tool definitions from a specific MCP server, filtered by agent permissions.
No parameter schema in public metadata yet.
execute_toolExecutes a tool on a downstream MCP server with transparent result forwarding.
Executes a tool on a downstream MCP server with transparent result forwarding.
No parameter schema in public metadata yet.
get_gateway_statusReturns comprehensive gateway health and diagnostics information.
Returns comprehensive gateway health and diagnostics information.
No parameter schema in public metadata yet.
Sponsors
Configuration
GATEWAY_MCP_CONFIGPath to MCP servers configuration file (default: .mcp.json)
GATEWAY_RULESPath to gateway access control rules file (default: .mcp-gateway-rules.json)
GATEWAY_DEFAULT_AGENTDefault agent ID when not provided in tool calls
GATEWAY_DEBUGEnable debug mode and expose diagnostic tools (default: false)
Readme
Agent MCP Gateway
A Model Context Protocol (MCP) gateway that aggregates multiple MCP servers and provides policy-based access control for agents and subagents. Solves Claude Code's MCP context window waste by enabling on-demand tool discovery instead of loading all tool definitions upfront.
Status
- β
M0: Foundation - Configuration, policy engine, audit logging,
list_serverstool - β
M1: Core - Proxy infrastructure,
get_server_tools,execute_tool, middleware, metrics, hot reload, OAuth support - π§ M2: Production - HTTP transport, health checks (planned)
- π§ M3: DX - Single-agent mode, config validation CLI, Docker (planned)
Current Version: M1-Core Complete (with OAuth)
Table of Contents
Details
- Repository
- github.com/roddutra/agent-mcp-gateway
- Category
- AI & LLM Tools
- Package
agent-mcp-gateway- Transport
- STDIO
- Registry
- MCP registry, active