Skip to content

AnyRouter MCP with other clients

Connect any MCP-aware client to AnyRouter using the standard remote HTTP transport, OAuth, or a static API key.

Anything that speaks the Model Context Protocol over remote HTTP connects to AnyRouter the same way — one URL, https://anyrouter.dev/api/v1/mcp, and either OAuth or a static bearer key.

  1. Add a remote MCP server in your client's config, pointing at:

    https://anyrouter.dev/api/v1/mcp
    
  2. On the first tool invocation, the client opens a browser at anyrouter.dev/oauth/consent.

  3. Pick a permission level (Read-only is the default and safest) and click Allow.

  4. The client receives the authorization code through its registered callback and stores the token.

Later tool calls reuse the stored token until you revoke it from the MCP dashboard.

If your client can't run the OAuth callback dance — headless agents, CI jobs, embedded automations — authenticate with a bearer token instead. Two key types work:

Smoke test:

curl https://anyrouter.dev/api/v1/mcp \
  -H "Authorization: Bearer ak_your_management_key" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":1}'

Full reference: MCP API → Manual authentication.

Verify

Once configured, ask your client to run any AnyRouter tool — for example, "list AnyRouter models" calls list_models and returns the catalog. Over the static-key path, the same curl tools/list above should return a JSON list of tools rather than a 401.

Revoke

Revoke an OAuth token any time from the MCP dashboard; the connection stops working immediately. To disable static-key access, revoke or delete the key from /dashboard/keys or /dashboard/management-keys.

Troubleshooting

What must my client support?
CapabilityNotes
Remote MCP transport (HTTP)Required. AnyRouter does not expose stdio.
Dynamic Client Registration (RFC 7591)Required for OAuth. Most modern MCP clients have it.
Authorization Code + PKCE (S256)Required for OAuth.
Bearer-token authRequired for the static-key path.

If your client supports all four, it works without any AnyRouter-specific configuration.

Related