Replit connects MCP servers at the account level, not per project — a server you add once is available to Agent across every Repl you build, and Agent fetches the tool list itself.
Get an API key
Perfai Cloud authenticates Replit Agent with a Perfai API key. Create one and copy it — Perfai shows the full key only once. You’ll paste it into Replit’s authentication header asBearer pfk_xxxxxxxxxxxx_....
Installation
This is a workspace-level setting, not a per-project one.- Click your workspace name (top left) to open workspace settings, then under Workspace click Integrations.
-
Make sure the Your integrations tab is selected, then click + Add personal MCP server.

-
In the Connect an MCP server dialog, fill in:
- Display name:
Perfai MCP - MCP Server URL:
https://mcp-server.perfai.ai/mcp - Leave Scan tool output for prompt injection checked.
- Open Advanced settings → Custom headers → + Add header:
- Header name:
Authorization - Header value:
Bearer pfk_xxxxxxxxxxxx_...
- Header name:

- Display name:
- Click Test & save. Back in the Connectors table, Perfai MCP should show as connected.
Bearer followed by the full key, with no trailing whitespace. If it worked before and now fails, the key has expired or been revoked — create a new one and update the connector.
Confirm you’re signed in
The API key signs you in — there is no separate login step. Every tool call runs as the user who created the key, with that user’s organizations and role. In Replit Agent’s chat, type:pfk_xxxxxxxxxxxx_…), never the secret. If a tool call fails with 401, the key has expired or been revoked — create a new one and update the connector.

