Skip to main content
The Perfai MCP server works with any client that supports stdio MCP servers — Claude Desktop, JetBrains AI, Continue.dev, and others. This page covers the general configuration pattern and direct CLI usage.

How it runs

The server is distributed as the @perfai/mcp npm package and launched with npx:
It communicates over stdio (stdin/stdout) — the standard MCP transport. Your client starts the server as a subprocess and exchanges messages over stdin/stdout.
You must name the perfai-mcp-server binary via --package=. Running npx @perfai/mcp alone fails with “could not determine executable to run” because the package’s binary does not match its name.

Authentication

The server signs in with your Perfai username and password, supplied as the PERFAI_USERNAME and PERFAI_PASSWORD environment variables in the server’s env block. After the login tool runs, the session is saved locally.
Credentials are stored in plaintext in the MCP config file. Keep that file private and out of shared repositories.

Standard config format

Most MCP clients use a JSON config with an mcpServers key:
Common config file locations by client:
VS Code uses "servers" instead of "mcpServers" at the top level. See the VS Code setup guide for details. Zed uses a nested "context_servers" object with env inside command. See the Zed setup guide.

Claude Desktop setup

File: ~/Library/Application Support/Claude/claude_desktop_config.json
Restart Claude Desktop after saving the config. The perfai-mcp server should appear in the MCP tools panel.

Requirements

  • Node.js 18+ — the server requires Node 18 or later. Run node --version to check.
  • npx must be on your system PATH. It comes bundled with Node.js.

Tools

Before login, only login and auth_status are available. After authenticating, your client gains access to:

Login

The prompts below run inside your MCP client’s chat (Claude Desktop, JetBrains AI, Continue.dev, etc.), not your terminal. The only terminal/file steps are editing the config.
With your credentials set in the env block, tell your AI assistant:
The server reads the env vars, authenticates, and stores the session locally. Confirm with What's my Perfai auth status?.

Common prompts


Troubleshooting

could not determine executable to run
  • You’re missing the binary name. Use npx --yes --package=@perfai/mcp@latest perfai-mcp-server, not npx @perfai/mcp.
Authentication Failed / Configuration Required
  • The server didn’t find credentials. Confirm PERFAI_USERNAME and PERFAI_PASSWORD are set in the server’s env block and restart the client.
Server not starting
  • Confirm node --version returns 18 or later.
  • Run npx --yes --package=@perfai/mcp@latest perfai-mcp-server in a terminal to test directly — startup messages and any errors appear in the output.
npx not found
  • Install Node.js from nodejs.org. npx is included automatically.
  • On macOS with Homebrew: brew install node.