integrations/official/MCP (Model Context Protocol)

MCP (Model Context Protocol) + AIgateway

Mount AIgateway as an MCP server inside any compatible host.

Anthropic's MCP standard lets agents discover and call tools through a typed protocol. AIgateway exposes the catalog via MCP at api.aigateway.sh/mcp — Claude Code, Cursor agents, and any MCP-aware client can list models, read a model's exact invocation schema, and call any modality (chat, embeddings, images, audio, video, rerank, OCR, and more).

MCP (Model Context Protocol) homepage →
Setup

Three steps or fewer.

STEP 01

Add to your MCP client (Streamable HTTP, MCP 2025-03-26)

Preferred transport. One POST endpoint, no session management. Add this to your MCP host's config.

{
  "mcpServers": {
    "aigateway": {
      "type": "http",
      "url": "https://api.aigateway.sh/mcp",
      "headers": { "Authorization": "Bearer sk-aig-..." }
    }
  }
}
STEP 02

Or use legacy SSE (MCP 2024-11-05)

If your client only supports the older SSE transport, use these endpoints instead.

{
  "mcpServers": {
    "aigateway": {
      "type": "sse",
      "url": "https://api.aigateway.sh/mcp/sse",
      "headers": { "Authorization": "Bearer sk-aig-..." }
    }
  }
}
STEP 03

Inspect the server

Open https://api.aigateway.sh/mcp/inspect in a browser to list tools, schemas, and sample invocations without leaving the URL.

Notes
  • Discovery tools: list_models, search_models, get_model (get_model returns a model's exact endpoint, request/response/streaming schema, quirks, and runnable snippets — call it before invoking an unfamiliar model).
  • Invocation tools: chat, embed, generate_image, transcribe, speak, translate, classify, moderate, rerank, ocr, detect_objects, plus async generate_video, generate_music, generate_3d (poll get_job / cancel_job).
  • MCP covers discovery + invocation. Sub-accounts, evals, and replays are REST/SDK primitives (see /reference), not MCP tools.
  • Both transports are live in production. Streamable HTTP is the recommended transport per the current MCP spec.
More integrations

Same key. Every other tool.