servers key (not mcpServers) and can be scoped globally or per-project.
MCP tool use requires GitHub Copilot Chat with Agent mode enabled. Make sure you’re running VS Code 1.99 or later.
No credentials are required in the config. Calling
login opens a browser to Perfai’s own sign-in page (OAuth) and completes automatically — see Login below.Global installation
The global MCP config is stored in VS Code’s user data directory.- macOS
- Linux
- Windows
File:
~/Library/Application Support/Code/User/mcp.jsonProject-scoped installation
Add.vscode/mcp.json to your project root. VS Code picks this up automatically when the workspace opens.
Prefer not to use the browser login (headless machines, CI)? Create a Perfai API key and add
"env": { "PERFAI_API_KEY": "pfk_xxxxxxxxxxxx_..." } to the perfai-cloud-mcp entry. If you do, don’t commit .vscode/mcp.json — add it to .gitignore, keep the key in the global user config instead, or use VS Code’s ${input:...} variables to prompt for it rather than hardcoding it.Verify the server is running
- Open the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P). - Run “MCP: List Servers” — confirm perfai-cloud-mcp appears and shows a running status.
- If it’s stopped, run “MCP: Restart Server” and select perfai-cloud-mcp.
Login
The prompts below run inside Copilot Chat (Agent mode), not your terminal. The only terminal/file steps are editing the config.
PERFAI_API_KEY if you set it). Confirm with:

