perfai-cloud-mcp) connects Perfai to your AI coding assistant via the Model Context Protocol. Once installed, you can register an app, run a security scan, review vulnerabilities, and get AI-powered fix prompts and auto-fix instructions — all without leaving your editor.
Where to run Perfai commands: every Perfai action —
Login to Perfai, Run a security test, Show me the vulnerabilities it found, 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.Claude
The chat app, not Claude Code — custom connector via Settings.
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.Postman
Native MCP request type and call tools directly.
AWS Kiro
Amazon’s AI IDE — successor to Amazon Q Developer. Config via
mcp.json.Cline
VS Code extension for autonomous coding. Config via
cline_mcp_settings.json.LM Studio
Local model runner — add via the Program tab’s
mcp.json.Continue.dev
VS Code / JetBrains extension. Config via
.continue/mcpServers/.Replit
Browser-based agent — custom connector via the Integrations pane.
Lovable
Browser-based app builder — custom connector via the Connectors dashboard.
Bolt
Browser-based app builder — custom connector via account-level Connectors.
IBM Bob
Standalone AI coding IDE. Config via
mcp.json, global or per-project.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 asperfai-cloud-mcp. Launch it with npx:
On Windows, some MCP hosts fail to spawn
npx directly with a spawn npx ENOENT error, because npx is a .cmd shim rather than an executable. If you hit this, wrap it through cmd: "command": "cmd", "args": ["/c", "npx", "-y", "perfai-cloud-mcp"].How authentication works
How you sign in depends on how your client runs Perfai MCP:- Local clients (Claude Code, Cursor, VS Code, Windsurf, Zed, and other stdio clients) launch
perfai-cloud-mcpon your machine. Browser login is the default. For headless machines and CI, set a Perfai API key asPERFAI_API_KEYinstead. - Remote clients (Postman, AWS Kiro, Cline, LM Studio, Continue.dev, Replit, Lovable, Bolt, IBM Bob) connect to
https://mcp-server.perfai.ai/mcp. They authenticate with a Perfai API key, sent asAuthorization: Bearer pfk_xxxxxxxxxxxx_...or pasted into the client’s API Key / Bearer token field.
Browser login (local clients)
Callinglogin with no arguments opens a browser to Perfai’s own sign-in page (OAuth) and completes the session automatically. No credentials go in your config.
1
Run the login tool
Ask your AI assistant: “Login to Perfai”. A browser window opens to Perfai’s sign-in page. If that browser already has an active
cloud.perfai.ai session, this can complete silently via SSO with no prompt at all.2
Confirm you're authenticated
Ask “What’s my Perfai auth status?” — once it reports authenticated, the protected tools become available.
3
Register your app
Register the app you want to test by URL. All security-testing and vulnerability tools operate on the currently selected app.
API key in the env block (local clients)
To skip the browser, create an API key and add it to the server’s env block:
PERFAI_TOKEN also accepts an API key, so you can paste a key into an existing PERFAI_TOKEN entry.
Local clients still read
PERFAI_EMAIL / PERFAI_PASSWORD from the env block as a fallback. That stores your password in a config file, so use an API key instead.Create an API key
A Perfai API key (pfk_<key id>_<secret>) is a personal credential for MCP clients:
- It acts as you. The key has the same organizations and role as the user who created it. A Viewer’s key can’t dismiss or fix findings. Organization selection works the same as with a normal login.
- It’s shown once. Perfai returns the full key only in the creation response. Copy it straight into your client config.
- It expires. Keys last 90 days by default. You can set up to 365 days.
- It’s revocable. Revoke a key at any time and it stops working.
- You can hold up to 10 active keys. Use one key per client or machine, so you can revoke one without breaking the others.
- Log into cloud.perfai.ai.
- In the left sidebar, click API Keys.
- Click + Create key.
- Name: something that identifies where it’s used, e.g.
CursororReplit. - Expires after (days): optional — leave blank for the 90-day default, or set up to 365.
- Click Create key and copy the value immediately — it’s shown once, right after creation, and never shown again. Store it like a password.
List and revoke keys
The same API Keys page lists every key you’ve created, with its creation date, expiry, and last-used time. Click Revoke next to any key to disable it immediately — the list never shows a key’s secret again. If you lose a key, revoke it and create a new one.Troubleshooting API keys
Tools
Onlylogin and auth_status are available before you authenticate. After login, all of the following become available:
Authentication
Organization management
App management
Security testing
Vulnerability management
Typical workflow
1
Log in
Login to Perfai2
Register your app
Register https://myapp.com with Perfai3
Run a security test
Run a security test on the selected app4
Review the findings
Show me the vulnerabilities it found5
Fix and verify
Auto-fix all critical and high vulnerabilities, then confirm each one: Mark vulnerability 3 as fixed
