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.
Generate your Bearer token
The value Replit needs is a PerfAI Token (id_token which is a JWT).id_tokens are short-lived. If Agent later reports the connector failing after previously working, your token has likely expired — generate a fresh one with either method below and update the connector.
- macOS / Linux
- Windows (PowerShell)
read -s masks the password prompt so it never lands in your shell history. Copy the printed id_token value in full.Bearer <id_token>, or into a bare token field exactly as-is depending on how Replit’s form is laid out.
Installation
- Open any Repl and go to the Integrations pane.
- Scroll to MCP Servers for Replit Agent and click Add MCP server.
- Paste the endpoint:
- URL:
https://mcp-server.perfai.ai/mcp
- URL:
- In the authentication section, add a header:
- Header name:
Authorization - Header value:
Bearer <id_token>
- Header name:
- Optionally test a read-only endpoint (like
auth_status) before saving, then save.
Verify the server is connected
- Reopen the Integrations pane and find perfai-cloud under your connected MCP servers.
- It should show as connected with 19 tools discovered.
- If it fails, re-check the header value for trailing whitespace, and make sure the token hasn’t expired (generate a fresh
id_tokenif it has).
Login
The prompts below run inside Replit Agent’s chat, not your terminal. The only setup step outside the chat is adding the connector above.
login with no arguments. Confirm the session with:

