@perfai/mcp) connects Perfai to your AI coding assistant via the Model Context Protocol. Once installed, you can list security, design, and quality issues, filter them by severity or status, and generate AI-powered fix prompts — all without leaving your editor.
Where to run Perfai commands: every Perfai action —
Login to Perfai, Show critical security issues, Generate a fix for security issue 14, and so on — is a natural-language prompt you type into your code agent’s chat (Claude Code, Cursor, VS Code Copilot Agent Mode, Windsurf, or Zed). They are not terminal commands. Only the one-time installation steps (npx, claude mcp add, editing a config file) run in a shell.Claude Code
One-command setup via the
claude mcp add CLI.Cursor
Global or per-project config via
.cursor/mcp.json.VS Code (Copilot Agent Mode)
Add to
.vscode/mcp.json or user settings.Windsurf
Drop the config in
~/.codeium/windsurf/mcp_config.json.Zed
Register via
context_servers in Zed’s settings.json.Generic MCP client
Works with any client that supports stdio MCP servers.
Requirements
- Node.js 18 or later — run
node --versionto check. - A Perfai account — sign up at cloud.perfai.ai.
The command
The Perfai MCP server is published as@perfai/mcp. Launch it with npx, naming the perfai-mcp-server binary:
How authentication works
The Perfai MCP server authenticates with your Perfai username and password, supplied as environment variables in the MCP config (PERFAI_USERNAME and PERFAI_PASSWORD).
1
Add your credentials
Set
PERFAI_USERNAME and PERFAI_PASSWORD in the server’s env block (see your editor’s setup page). Use the same email and password you use at cloud.perfai.ai.2
Run the login tool
Ask your AI assistant: “Login to Perfai”. The server reads your credentials from the environment, authenticates, and saves the session locally.
3
Confirm you're authenticated
Ask “What’s my Perfai auth status?” — once it reports authenticated, the protected tools become available.
4
Select an organization and app
Pick your organization, then select the app you want to work with. All issue and fix tools operate on the selected app.
Tools
Onlylogin and auth_status are available before you authenticate. After login, all of the following become available:
Perfai groups findings into three categories: security, design, and quality. Each has its own list and fix tool. Within security, you can further filter by severity (Critical, High, Medium, Low).
Typical workflow
1
Log in
Login to Perfai2
Select an organization
List my Perfai organizations → Select organization 13
Select an app
List my Perfai apps → Select the app payment-api4
Review issues
Summarize all issues for this app, then drill in: Show critical and high security issues5
Generate fixes
By ID, by category, or across the board (see below).

