mcp_gateway Product type

MCP Gateway

Aggregate every MCP server your agent needs behind one endpoint. The gateway namespaces tools, fans out tools/list, and routes tools/call by prefix.

HOW IT WORKS

One JSON-RPC endpoint, many MCP servers

Register N upstream MCP servers per project. Agents see one endpoint; the gateway handles the fan-out and the routing.

Server registry

Per-project list of upstream servers (URL + optional Bearer token + namespace prefix + timeout). Add, edit, deactivate from the admin UI.

Namespaced tools

tools/list fans out to every server, prefixes tool names with each server's namespace, returns the union. Agents see github__list_issues, not just list_issues.

Prefix-routed calls

tools/call looks at the prefix, strips it, forwards the call to the right upstream. Server keeps its own tool naming; agent sees a flat menu.

Encrypted bearer tokens

Bearer tokens for upstream MCP servers are encrypted at rest with the Laravel APP_KEY.

SSRF guarded

Each upstream URL gets validated against the same SSRF guard that protects the API Gateway proxy. No internal-network exfiltration via a malicious MCP server URL.

Per-server timeout

Each upstream has its own 1-300s timeout. A slow server doesn't drag the whole tools/list fan-out down.

EXAMPLE

One endpoint for an agent's whole MCP stack

Imagine an agent that needs GitHub, your internal docs, and a vector-search MCP server. Without the MCP Gateway you configure each separately — three URLs, three credentials, three reload cycles. With it, you register three servers in one project; the agent points at one endpoint.

  • Single auth surface for the agent (one Bearer token)
  • Add or remove servers without touching the agent
  • Audit trail is centralised
  • SSRF + rate-limit applied once
agent.json json
{
  "mcpServers": {
    "promptgate": {
      "url": "https://promptgate.your.co/api/<uuid>/mcp",
      "headers": {
        "Authorization": "Bearer pg_live_..."
      }
    }
  }
}
DECISION HELPER

Pick this type when…

Use MCP Gateway when

  • An agent needs access to multiple upstream MCP servers
  • You'd rather hand the agent one URL than configure each server inside it
  • You want to add / remove MCP servers without touching the agent's config
  • You need encrypted-at-rest Bearer tokens for upstream MCP servers

Pick something else when

  • You want to expose your AI Gateway endpoints AS MCP tools to agents → MCP Server (the Bridge feature on AI Gateway projects)
  • You're building an LLM-backed feature in your own app → AI Gateway

Aggregate, don't multiply.

Five MCP servers? One endpoint. The gateway handles the fan-out, the prefixing, and the encryption.

Install Community Edition MCP Gateway docs ↗