# Lovable

> Add Stableship to Lovable as a custom MCP connector, and check each change before you publish.

Lovable connects to Stableship as a custom MCP connector, so its chat can read what Stableship found, fix it and ask Stableship to verify the fix. Lovable reads `AGENTS.md` from your repository.

> **Note** We have not yet tested Lovable with Stableship end to end. It connects over MCP with the steps below, taken from Lovable's own docs. If a step does not match what you see, tell us at support@stableship.ai.

## Connect

1. In Lovable: Connectors, Add custom, MCP server.

2. Name it Stableship. Server URL:

   ```
   https://api.stableship.ai/mcp
   ```

3. Keep OAuth, click Add & authorize, and approve.

Approving opens app.stableship.ai: sign in, pick the workspace and approve. No token to copy. You can disconnect it any time in Stableship: **Settings**, then **Connections**, then **Connected apps**.

## Use a token instead

First make a token: in Stableship open **Settings**, then **Connections**, open **API tokens and connected apps**, and choose **Create token** with **Read findings and rules** and **Start checks and verify fixes**. Copy it: it starts with `sst_` and is shown once. Use it where these steps say `sst_your_token`.

Choose "Bearer token or API key" instead of OAuth and paste this token:

```
sst_your_token
```

Keep the token out of your repository.

## Check it works

Back in Lovable, the connector shows Connected. Then ask Lovable to list your Stableship projects: it calls `list_projects` and names your app.

If it does not connect:

- In Connectors, open Stableship and authorize again.
- Or [use a token instead](#use-a-token-instead).

## Before you publish

Lovable publishes when you click **Publish**, so Stableship checks each change that reaches GitHub before you do. When a change breaks one of your rules, Stableship says "don't publish yet". If you already published it, publish the last good version again, or copy the revert from the release page and give it to Lovable: it reverts the commit and pushes.

## Hand over the fix plan

On a release, choose **Send to my agent**. With the connector on, Lovable can read the fix plan itself. **Open in Lovable** fills Lovable's chat with the request, when Stableship knows your Lovable project.

## Keep the rules in your repository

Ask Lovable to call `get_repo_files` and commit the Stableship section of `AGENTS.md`: the rules, and how to use the tools. Stableship never writes to your repository itself. No connector? Paste the project instructions from Stableship's setup into Lovable's standing instructions instead.

Lovable apps without a Supabase account build the private copy from the migrations in your repository: see [Connecting Supabase](/docs/help/connecting-supabase).
