Skip to main content
The Perfai MCP server (@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 --version to 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:
The package binary is perfai-mcp-server — it does not share the package name, so npx @perfai/mcp alone fails with “could not determine executable to run.” Always pass --package=@perfai/mcp@latest perfai-mcp-server.
In a JSON config file this becomes:

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.
Credentials are stored in plaintext in the MCP config file. Treat that file like a secret — don’t commit it to a shared repository. Prefer user-scoped (global) config over project-scoped config for anything containing credentials.

Tools

Only login 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 Perfai
2

Select an organization

List my Perfai organizationsSelect organization 1
3

Select an app

List my Perfai appsSelect the app payment-api
4

Review issues

Summarize all issues for this app, then drill in: Show critical and high security issues
5

Generate fixes

By ID, by category, or across the board (see below).

Listing issues


Generating fixes

By ID (sequence number from the issue list, an issue ID, or a description):
By category (security, design, or quality):
For all / by severity — ask your assistant to iterate over a filtered list:
After applying fixes, confirm they resolved:

Next steps

Pick your editor to get started: