Skip to main content

Install with one command

The fastest way to add Perfai to Claude Code is via the claude mcp add command. This registers the MCP server globally — it will be available in every project automatically.
Restart Claude Code (or open a new session) and the Perfai tools are ready.
Authentication uses your Perfai username and password, passed as the PERFAI_USERNAME and PERFAI_PASSWORD environment variables. They are stored in plaintext in ~/.claude.json — keep it private and prefer user scope over project scope for anything with credentials.
Use the long-form npx flags (--yes --package=…). The short -y/-p flags after -- are misread by the claude mcp add parser, and npx @perfai/mcp without an explicit binary fails with “could not determine executable to run” — the binary is named perfai-mcp-server.
--scope user registers the server globally. To limit it to a single project, use --scope project instead — this writes to .mcp.json in your current directory.

Manual configuration

If you prefer to edit the config file directly, add the following for your OS and scope.
Global (all projects) — file: ~/.claude.json
Project scope — file: .mcp.json in your project root

Verify the server is connected

List active MCP servers and confirm perfai-mcp shows ✔ Connected:

Login

The prompts below run inside the Claude Code chat, not your terminal. The only terminal steps are the install command and claude mcp list.
With your credentials set in the env block above, authenticate:
The server reads PERFAI_USERNAME / PERFAI_PASSWORD from the environment, signs you in, and saves the session. Confirm with:

Select an organization and app


List issues

Perfai groups findings into three categories — security, design, and quality.

Generate fixes

By ID — use the sequence number from the issue list, an issue ID, or a description:
By category:
For all (or by severity) — ask Claude to iterate over a filtered list:
Then confirm the fixes landed:

Useful prompts