Skip to main content
VS Code supports MCP servers through GitHub Copilot’s Agent mode (available in VS Code 1.99+). The config uses a 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.
The package binary is perfai-mcp-server. Always launch it with npx --yes --package=@perfai/mcp@latest perfai-mcp-servernpx @perfai/mcp alone fails with “could not determine executable to run.”

Global installation

The global MCP config is stored in VS Code’s user data directory.
File: ~/Library/Application Support/Code/User/mcp.json
VS Code uses "servers" as the top-level key — not "mcpServers". Using the wrong key means the server will not be discovered.

Project-scoped installation

Add .vscode/mcp.json to your project root. VS Code picks this up automatically when the workspace opens.
Don’t commit .vscode/mcp.json if it contains your PERFAI_PASSWORD. Add it to .gitignore, or keep credentials in the global user config instead. VS Code also supports ${input:...} variables to prompt for secrets rather than hardcoding them.

Verify the server is running

  1. Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P).
  2. Run “MCP: List Servers” — confirm perfai-mcp appears and shows a running status.
  3. If it’s stopped, run “MCP: Restart Server” and select perfai-mcp.

Login

The prompts below run inside Copilot Chat (Agent mode), not your terminal. The only terminal/file steps are editing the config.
Open Copilot Chat, switch to Agent mode, and type:
The server reads PERFAI_USERNAME / PERFAI_PASSWORD from the config, signs you in, and saves the session locally. Confirm with:

Select an organization and app


List issues

Findings are grouped into security, design, and quality categories.

Generate fixes

By ID (sequence number, issue ID, or description):
By category:
For all / by severity — ask Copilot to iterate: