Skip to content

AnyRouter MCP with Cursor

Add the AnyRouter MCP server to Cursor via the Settings UI or by editing ~/.cursor/mcp.json.

Cursor exposes MCP through a Settings UI, and you can reach the same result by editing ~/.cursor/mcp.json directly — pick whichever you prefer below.

  1. Open Cursor Settings → MCP & Integrations → Add Custom MCP.
  2. Fill in the details:
    • Name: anyrouter
    • URL: https://anyrouter.dev/api/v1/mcp
  3. Click Save. Cursor opens your browser at anyrouter.dev/oauth/consent — pick a permission level (Read-only is the default and safest) and click Allow.
  1. Open (or create) ~/.cursor/mcp.json.

  2. Add the AnyRouter server:

    {
      "mcpServers": {
        "anyrouter": {
          "url": "https://anyrouter.dev/api/v1/mcp"
        }
      }
    }
    
  3. Reload Cursor. The next tool call triggers the OAuth flow at anyrouter.dev/oauth/consent — pick a permission level and click Allow.

Verify

In any Cursor chat, ask "list my AnyRouter API keys". The agent calls list_keys and surfaces the result inline. The tools you can reach depend on the permission level you granted at consent.

Revoke

Disconnecting has two layers:

  • Cursor side — remove the entry from Settings → MCP & Integrations, or delete it from ~/.cursor/mcp.json.
  • AnyRouter side — revoke the OAuth token from the MCP dashboard. This invalidates the connection immediately; any later tool call from Cursor returns 401 Unauthorized until you reconnect.

Related