MCP server

EdgeRouteAI exposes its routing as a Model Context Protocol server, so any MCP-aware client (Claude Desktop, Cursor, Cline, Continue, etc.) can call auto and the 11 underlying providers without leaving the chat UI.

Endpoints

  • Streamable HTTP (primary): https://mcp.edgerouteai.com. Single POST per request; SSE upgrade for streamed responses. Authorization: Bearer edgrt_….
  • Stdio shim: npx -y @edgerouteai/mcp-stdio. Wraps the HTTP transport for clients that only speak stdio (current Claude Desktop, older Cursor builds).

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json on macOS (or the equivalent on Windows / Linux) and add:

claude_desktop_config.json
{
  "mcpServers": {
    "edgerouteai": {
      "command": "npx",
      "args": ["-y", "@edgerouteai/mcp-stdio"],
      "env": { "EDGEROUTE_KEY": "edgrt_…" }
    }
  }
}

Cursor / Cline

Both speak stdio MCP — same config shape as above, dropped into their respective MCP config files. The dashboard's Setup page generates a copy-paste version that bakes your key in.

Protocol surface

The server implements MCP 2024-11-05. The exposed tools/list response contains a single tool, chat, that takes model and messages and proxies to the same gateway that /v1/chat/completions uses. Streaming is supported via SSE.

All routing logic — auto-routing, smart-router preferences, BYOK fallback, guardrails, analytics — applies identically whether you call via REST or MCP.