/ Directory / Playground / Agent Gateway
● Community agentgateway ⚡ Instant

Agent Gateway

by agentgateway · agentgateway/agentgateway

Sit one proxy in front of all your MCP servers — pluggable auth, request shaping, observability, and circuit breakers in Rust.

Agent Gateway is a high-performance proxy specialized for MCP and LLM traffic. It terminates auth, applies per-route policy, emits traces, and provides circuit-breaking. Useful when you have more than two MCP servers and want central control.

Why use it

Key features

Live Demo

What it looks like in practice

ready

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "agentgateway": {
      "command": "docker",
      "args": [
        "run",
        "-p",
        "3000:3000",
        "ghcr.io/agentgateway/agentgateway:latest"
      ]
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "agentgateway": {
      "command": "docker",
      "args": [
        "run",
        "-p",
        "3000:3000",
        "ghcr.io/agentgateway/agentgateway:latest"
      ]
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "agentgateway": {
      "command": "docker",
      "args": [
        "run",
        "-p",
        "3000:3000",
        "ghcr.io/agentgateway/agentgateway:latest"
      ]
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "agentgateway": {
      "command": "docker",
      "args": [
        "run",
        "-p",
        "3000:3000",
        "ghcr.io/agentgateway/agentgateway:latest"
      ]
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "agentgateway",
      "command": "docker",
      "args": [
        "run",
        "-p",
        "3000:3000",
        "ghcr.io/agentgateway/agentgateway:latest"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "agentgateway": {
      "command": {
        "path": "docker",
        "args": [
          "run",
          "-p",
          "3000:3000",
          "ghcr.io/agentgateway/agentgateway:latest"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add agentgateway -- docker run -p 3000:3000 ghcr.io/agentgateway/agentgateway:latest

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use Agent Gateway

Front many MCP servers with one auth surface

👤 Developers ⏱ ~15 min intermediate

When to use: You have 5+ internal MCPs and copying configs to every dev is painful.

Flow
  1. Deploy gateway
    Run agentgateway behind your IdP.✓ Copied
    → Login works
  2. Register backends
    Add each MCP server with route and policy.✓ Copied
    → Backends listed
  3. Point clients
    Devs point Claude at https://mcp.corp/.✓ Copied
    → Single config

Outcome: Central control plane for MCP traffic.

Combinations

Pair with other MCPs for X10 leverage

agentgateway + mcp-gateway-registry

Use registry for discovery UI; this for low-latency routing

Combine agentgateway with mcp-gateway-registry: Use registry for discovery UI; this for low-latency routing✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
gateway-passthrough (see docs) Forwards to registered backend MCPs 1 call

Cost & Limits

What this costs to run

API quota
Bound by host
Tokens per call
Passthrough
Monetary
Free OSS; your hosting
Tip
Enable circuit breakers — saves on cascading failures

Security

Permissions, secrets, blast radius

Minimum scopes: gateway-admin
Credential storage: Auth secrets in vault
Data egress: Backends you register
Never grant: expose admin API publicly

Troubleshooting

Common errors and fixes

High p99 latency

Disable unnecessary plugins; agentgateway is fast but plugins add up

Alternatives

Agent Gateway vs others

AlternativeWhen to use it insteadTradeoff
mcp-context-forgeYou want IBM's alternativeDifferent ops model

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills