Skip to main content
Cursor supports MCP servers via a JSON config file. You can register Perfai globally (available in every workspace) or per-project (checked into your repo).
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

File: ~/.cursor/mcp.json
Create the file if it doesn’t exist:

Project-scoped installation

Add the config to .cursor/mcp.json at the root of your project. This makes the server available only when that project is open.
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 that config — add it to .gitignore or keep the key in your global ~/.cursor/mcp.json instead.

Enable the server in Cursor

After saving the config file:
  1. Open Cursor Settings → MCP (or search “MCP” in the command palette).
  2. Confirm perfai-cloud-mcp appears in the server list with a green status indicator.
  3. If it shows as disconnected, click Restart next to the server entry.

Login

The prompts below run inside Cursor’s Agent chat, not your terminal. The only terminal/file steps are creating the config file.
In Cursor’s Agent mode, type:
This opens a browser to Perfai’s sign-in page (or uses PERFAI_API_KEY if you set it). Confirm with:

Register an app and run a scan


Fix and verify

One at a time:
All at once, prioritized by severity:
Then confirm the fixes landed: