> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/build/building-from-your-ai-agent/mcp-gateway/lovable.md).

# Lovable

Add fastn to Lovable as a custom MCP server, sign in, and use your fastn tools from Lovable's chat.

In Lovable, fastn is a chat connector. It gives Lovable's chat your fastn tools while you build. It attaches to you and your chats, not to the app you publish.

{% hint style="info" %}
**Before you start:** custom MCP servers work on every Lovable plan. On Business and Enterprise, a workspace admin can turn them off; if **MCP server** is greyed out, ask your admin.
{% endhint %}

## Add fastn

{% stepper %}
{% step %}

#### Add a custom MCP server

In Lovable, open **Connectors** in the sidebar. Click **Add custom** at the top right and choose **MCP server**.
{% endstep %}

{% step %}

#### Enter fastn's URL

Enter **Server name** `fastn` and **Server URL** `https://mcp.fastn.dev/fastn-workspace`, leave **Authentication** on **OAuth (default)**, and click **Add & authorize**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-66bd7b52d247ef195b91005651034040687e88ee%2Fmcp-lovable-add-server.webp?alt=media" alt="Lovable&#x27;s Add MCP server form with Server name fastn, Server URL https://mcp.fastn.dev/fastn-workspace, Authentication set to OAuth (default) with Bearer token or API key and No authentication as the other options, and Cancel and Add and authorize buttons"><figcaption><p>Keep <strong>OAuth</strong>. fastn signs you in, so no token is needed.</p></figcaption></figure>
{% endstep %}

{% step %}

#### Pick the workspace

fastn opens in a popup. Sign in if asked. If you belong to more than one fastn org, pick the workspace Lovable works in and click **Connect**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-eff63e3f987cddff391ccf8663de8883ff0166d4%2Fmcp-lovable-choose-workspace.webp?alt=media" alt="fastn&#x27;s page titled Which workspace should Lovable (api.lovable.dev) use?, with The org selected in fastn chosen, a list of orgs and a Connect button"><figcaption><p><strong>The org selected in fastn</strong> follows whichever org you have open in the fastn dashboard; picking a named org pins Lovable to it.</p></figcaption></figure>

The popup closes and Lovable shows *MCP server added successfully*, with fastn marked **Connected** and its tools listed.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-e7dcd2d1bec6f7f9c9b958985c94577f1b58dcfe%2Fmcp-lovable-connected.webp?alt=media" alt="Lovable&#x27;s fastn connector page showing fastn Connected and Chat, an Always allow all tools from this connection toggle, and Manage my agent&#x27;s permissions listing fastn tools such as fastnPlatform__cancelWorkflowPromotion, fastnPlatform__createAction and fastnPlatform__createAlert"><figcaption><p>Set per-tool approvals here, or turn on <strong>Always allow all tools from this connection</strong>.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Use it

Start a chat or open a project and ask for the outcome in one sentence. To check the connection first, ask *Using the fastn connector, who am I in fastn?* Lovable answers with the org you picked when signing in.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-fec3ed035465cc369512dd69a4e40063914ce7b6%2Fmcp-lovable-answer.webp?alt=media" alt="Lovable&#x27;s chat answering Using the fastn connector, who am I in fastn? with Checked your identity in fastn and a list of name, email, role, organization, environment and plan"><figcaption><p>Read-only fastn tools run straight away. Lovable asks before any tool that changes something.</p></figcaption></figure>

From here Lovable works through the same steps as every agent: see [Building from your AI agent](https://docs.fastn.ai/build/building-from-your-ai-agent.md).

## Troubleshooting

* **Nothing happens after Add & authorize.** Your browser blocked the sign-in popup. Allow popups for lovable.dev and click **Add & authorize** again.
* **Lovable doesn't use fastn.** Name it in your message, for example *Using the fastn connector, …*.
* **Lovable works on the wrong org.** Open fastn under **Connectors**, click **Disconnect fastn**, add it again and pick the workspace when you sign in.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/build/building-from-your-ai-agent/mcp-gateway/lovable.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
