roddutra/agent-mcp-gateway

40 stars · Last commit 2025-12-02

Provides per-subagent MCP access controls to Claude Code (or any MCP client) across all your MCPs and prevents context window bloat. Loads only 3 tools instead of all your MCP Server's tool definitions. Agents discover tools on-demand, only when needed. Control which servers and individual tools each agent/subagent can access.

README preview

# Agent MCP Gateway

<!-- mcp-name: io.github.roddutra/agent-mcp-gateway -->

A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) 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.

<a href="https://glama.ai/mcp/servers/@roddutra/agent-mcp-gateway">
  <img width="380" height="200" src="https://glama.ai/mcp/servers/@roddutra/agent-mcp-gateway/badge" />
</a>

## Status

- ✅ **M0: Foundation** - Configuration, policy engine, audit logging, `list_servers` tool
- ✅ **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

View full repository on GitHub →