Custom MCP servers are available on every Lovable plan. If your workspace is on Enterprise, an admin needs to enable Third-party MCP clients first under Workspace settings → Security → Privacy & security — it’s on by default for Free, Pro, and Business.
Get an API key
Perfai Cloud authenticates Lovable with a Perfai API key. Create one and copy it — Perfai shows the full key only once.Installation
- In the left sidebar, click Connectors.
-
Click the + button (top right) and select MCP server from the dropdown.

-
Fill in the Add MCP server form:
- Server name:
Perfai MCP - Server URL:
https://mcp-server.perfai.ai/mcp - Authentication: select Bearer token or API key, then paste your API key into the field that appears

- Server name:
- Click Add server. Back in Connectors, Perfai MCP should appear under your enabled connectors. If it fails, re-check the key for trailing whitespace. If it worked before and now reports “could not connect,” 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 Lovable’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.

