AnyRouter MCP with GitHub Copilot

Add the AnyRouter MCP server to GitHub Copilot Chat in VS Code.

Copilot Chat in VS Code supports remote MCP servers in Agent mode.

  1. Create .vscode/mcp.json at the repo root. It holds no secrets, so you can commit it:

    {
      "servers": {
        "anyrouter": {
          "type": "http",
          "url": "https://anyrouter.dev/api/v1/mcp"
        }
      }
    }

    For a user-wide setup, put the same block under github.copilot.chat.mcp.servers in settings.json.

  2. In Copilot Chat, switch the mode to Agent and confirm anyrouter in the Tools list.

  3. On the first call, approve anyrouter.dev/oauth/consent (Read-only is the default).

  4. Check it: ask "how many AnyRouter credits do I have left?". Copilot calls get_credits.

Revoke

Remove the entry from mcp.json or settings.json, and revoke the token in the MCP dashboard. Later tool calls return 401 Unauthorized until you reconnect.

AnyRouter routes requests to third-party models. Models and outputs are provided as is, with no warranty; you use them at your own risk. Disclaimer