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.
-
Create
.vscode/mcp.jsonat 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.serversinsettings.json. -
In Copilot Chat, switch the mode to Agent and confirm
anyrouterin the Tools list. -
On the first call, approve
anyrouter.dev/oauth/consent(Read-only is the default). -
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