Get the FREE Ultimate OpenClaw Setup Guide →

agentgateway

Next Generation Agentic Proxy for AI Agents and MCP servers

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio agentgateway-agentgateway docker run -i agentgateway/agentgateway \
  --env AGENTGATEWAY_LOG_LEVEL="Set to desired log level (e.g., info, debug)" \
  --env AGENTGATEWAY_CONFIG_HOST="Host for MCP config API (optional)" \
  --env AGENTGATEWAY_CONFIG_PORT="Port for MCP config API (optional)"

How to use

agentgateway is a high-performance data plane designed to enable secure, observable, and governed communication for agent-to-agent and agent-to-tool interactions. It supports leading interoperability protocols including Agent2Agent (A2A) and the Model Context Protocol (MCP), with a focus on RBAC, multi-tenant isolation, and dynamic configuration updates via xDS without downtime. The project is implemented in Rust for performance and safety, and it can transform legacy APIs into MCP resources (e.g., OpenAPI) to facilitate modern agent-based workflows. The built-in UI helps you explore and manage connections, tenants, and resources, making it easier to observe and govern traffic across agent frameworks.

To use agentgateway, run the server using your preferred deployment method (Docker image, local binary, etc.). The MCP interface allows you to define resources and access policies, while the A2A integration handles agent-to-agent and tool-to-agent communications. You can update configurations dynamically without restarting the service, enabling zero-downtime operations in multi-tenant environments. For developers and operators, the UI and REST/SDK surfaces provide visibility into resource usage, RBAC, and governance policies across tenants.

How to install

Prerequisites:

  • Docker (recommended for quick start) or Rust toolchain if building from source
  • Network access to pull images or fetch dependencies

Option A: Run via Docker (recommended for quick start)

  1. Install Docker on your system.
  2. Pull and run the agentgateway Docker image: docker run -i agentgateway/agentgateway
  3. If needed, expose ports or mount configuration as environment variables: docker run -i -e AGENTGATEWAY_LOG_LEVEL=info -p 8080:8080 agentgateway/agentgateway

Option B: Build from Source (requires Rust)

  1. Install Rust and Cargo from https://rustup.rs/
  2. Install Git and clone the repository: git clone https://github.com/agentgateway/agentgateway.git cd agentgateway
  3. Build the project: cargo build --release
  4. Run the binary (path may vary based on target): ./target/release/agentgateway
  5. Optional: run with environment-specific config or as a systemd service for production deployment

Prerequisites recap:

  • Docker or Rust toolchain
  • Network access for pulling images or dependencies
  • Basic familiarity with MCP/A2A concepts and RBAC configuration

Additional notes

Environment variables and configuration:

  • AGENTGATEWAY_LOG_LEVEL: Set log verbosity (e.g., info, debug, warn)
  • AGENTGATEWAY_CONFIG_HOST/PORT: Optional MCP config API host and port
  • You can override image tags and registries when using Docker (e.g., docker pull ghcr.io/agentgateway/agentgateway:latest)

Common issues:

  • If the service starts but cannot connect to the MCP controller, verify network policies and host/port bindings.
  • Ensure RBAC policies are correctly configured to allow tenant and resource access across agents.
  • When updating dynamic configurations, use the MCP xDS feed as documented and monitor for consistency across tenants.

Tips:

  • Use the built-in UI to explore tenants, resources, and policies; enable the UI in your deployment if not using a separate management plane.
  • For Kubernetes deployments, refer to kgateway-based deployments for integrating agentgateway as a data plane.

Related MCP Servers

Sponsor this space

Reach thousands of developers