Connecting Lovable

Add Pertento to Lovable as a custom MCP server, so Lovable can read your experiment results while it builds your app.

3 min read


Lovable can use Pertento while you build. Connected as a custom MCP server, it reads your experiments, results, surveys and learnings as context in the project chat and in Chats. For example, it can check how a test on your sign-up page did before it rebuilds that page.

Custom MCP servers are available on every Lovable plan. On Business and Enterprise, a workspace admin can turn them off: if MCP server is greyed out in the steps below, ask your admin.

Lovable is not one of the apps Pertento marks as verified, so these steps use a personal token rather than sign-in.

Make a token in Pertento

  1. 1Open Settings → Agent access and click New token.
  2. 2Give it a name, for example "Lovable".
  3. 3Choose what it may do. For context while you build, Read is enough. Add Build experiments if you also want Lovable to draft experiments in Pertento. See Scopes and websites for an AI assistant.
  4. 4Under Websites, pick the website you are building in Lovable.
  5. 5Choose how long it lasts, enter your password, confirm with your passkey if you are asked to, and click Create token.
  6. 6Click Copy the token. It is shown only once. The command on the same screen is for Claude Code, so you do not need it here.

Add Pertento to Lovable

  1. 1In Lovable, open Connectors, select Add custom, then MCP server.
  2. 2Enter "Pertento" as the server name.
  3. 3Keep Direct connection. Pertento does not need Lovable's static IPs.
  4. 4Enter the server URL: https://app.pertento.ai/mcp
  5. 5For authentication, choose the bearer token or API key option, and paste your token. It starts with ptk_.
  6. 6Click Add server.

To check it works, ask in your project chat: "Using the Pertento connector, list my websites."

Using it

Ask for Pertento by name, so Lovable knows which connector to use:

  • "Using Pertento, how did the latest test on the pricing page do?"
  • "Check the Pertento results for experiment 1234 and build the winning variant into the page."

If you build a winning variant into your app, end the experiment in Pertento as well. Otherwise visitors in it still get the variant's changes on top of your new page.

To run experiments on an app built with Lovable, the Pertento script has to be on it. See Installing the Pertento script.

Approving what Lovable does

Lovable runs a tool marked as read-only without asking, and shows an approval card before any other tool runs. Pertento marks its reading tools as read-only, so questions about results are answered straight away, while building, starting or deploying anything asks you first.

Anything that changes what visitors see is also previewed by Pertento before it happens. If you want to read every preview, do not choose Always allow all tools from this connection on the approval card. See How an assistant makes live changes safely.

Each person connects their own

Connectors in Lovable's chat are per person. Each teammate adds Pertento with a token of their own, so each can do only what their own Pertento role allows.

Sign-in instead of a token

Lovable offers sign-in (OAuth) by default. If it reaches Pertento's consent screen, Lovable is shown as an Unverified app: check the web address the screen shows for it before you click Allow. If sign-in does not work, remove the server in Lovable and add it again with a token.