Skip to main content

What is the Lovable MCP server?

Lovable exposes itself as a Model Context Protocol (MCP) server at https://mcp.lovable.dev. This lets an AI client manage your Lovable projects through natural language. When connected, your AI agent can create projects, send messages to Lovable, inspect code, deploy apps, and more, all without leaving the client you’re already working in. The Lovable MCP server is available on all plans.
This is different from chat connectors (MCP servers), which let the Lovable agent connect to your tools. The Lovable MCP server lets external agents connect to Lovable.
The MCP server is one of the ways to use Lovable programmatically, each from a different place:

What MCP is

MCP (Model Context Protocol) is an open standard that lets AI agents discover and call external tools. When an agent connects to an MCP server, it can see what tools are available and decide when to use them. Lovable’s MCP server makes Lovable one of those tools: findable, invokable, and composable.

Supported AI clients

Lovable provides setup steps for these clients:
  • ChatGPT
  • Claude (Claude Desktop on macOS and Windows, and claude.ai)
  • Claude Code
  • Codex
  • Cursor
  • VS Code
Other MCP clients can also connect if they support OAuth, the login method the Lovable MCP server uses. A client that runs on your computer and completes login at a local address (localhost or 127.0.0.1) needs no approval from Lovable. It registers with Lovable automatically when you add https://mcp.lovable.dev and log in with your Lovable account. An MCP client without a preconfigured Lovable connection can use a custom OAuth client if it accepts custom OAuth credentials. A hosted MCP client, which runs on the web, needs one when its automatic registration fails with an invalid_redirect_uri error. To connect the MCP client:
  1. In Workspace settings → API keys & OAuth → OAuth clients, register an OAuth client with the MCP client’s callback URL and every scope the MCP client requests.
  2. Enter the OAuth client’s client ID in the MCP client. For a Web server client, also enter its client secret.
Each user then signs in to Lovable and authorizes the MCP client to act on their behalf. Authorization fails if the MCP client requests a scope that the OAuth client does not include. The Lovable MCP server uses the offline, projects:read, projects:write, workspaces:read, and workspaces:write scopes. Workspace admins and owners can register OAuth clients on all plans. The four project and workspace scopes require a Business or Enterprise workspace. Until Lovable verifies the OAuth client, users see a warning on the Lovable authorization screen. To remove the warning, request verification. The rest of this page refers to these apps as “the client” or “your client.”

The flow

  1. An agent connects to the Lovable MCP server
  2. The agent calls a tool (for example, create_project) with a description of what to build
  3. Lovable builds the project and returns a preview URL
  4. You can open the preview, review what was built, and continue iterating by sending more messages
  5. The agent keeps building as you refine, adding features, fixing issues, and changing the design
  6. When you’re happy with it, publish with deploy_project. Or don’t, publishing is always optional.

Who this is for

  • Developers using an AI client or editor such as ChatGPT, Claude Code, Codex, Cursor, or VS Code who want to create and iterate on Lovable projects without leaving it
  • Teams who want Lovable as a step in a larger agent flow: generate content, scaffold a UI, deploy it, and hand off the URL

Why use the Lovable MCP server

  • Agent-driven development: Let your client scaffold and iterate on Lovable projects using natural language.
  • Code inspection: Read project files, diff changes, and browse edit history programmatically.
  • Drafts: Try a change in a draft, review it, and accept it only when it works.
  • Cross-tool workflows: Combine Lovable with other MCP-connected tools in a single agent session.

Common use cases

Prerequisites

  • A Lovable account on any plan.
  • Third-party MCP client access enabled for your workspace, which allows external clients to connect to the Lovable MCP server
    • Enabled by default on Free, Pro, and Business workspaces
    • Disabled by default on Enterprise workspaces. On Enterprise, a workspace admin or owner can enable it in Workspace settings → Security → Privacy & security → Integrations, under Third-party MCP clients
  • An MCP client installed, such as one of the supported AI clients

Before you connect

When you connect a client to the Lovable MCP server, it can act on your account within the scopes you authorize. A few things to know before connecting:
  • Access can span projects and workspaces. The connection is not restricted to one project. Review the requested scopes before authorizing it. Calls remain subject to the OAuth scopes you grant and your existing Lovable access.
  • Calls run live on your account. Tool calls use real credits and edit real projects.
  • deploy_project deploys the app and returns a live URL. On Free and Pro plans, anyone with the link can reach the app unless its website access is set to Invite only. On Business and Enterprise plans, website access follows the workspace default. The URL may be restricted to workspace members only if internal publishing is configured.
  • query_database runs SQL with your full database permissions. Read, write, and schema changes.
  • accept_draft can change your live app’s backend immediately. Accepting a draft makes its changes to the database’s structure and backend functions live before you publish. See Accept a draft.

How to connect

On Lovable Business and Enterprise, an admin can enable enterprise-managed authentication so that members use Lovable from Claude through Okta without a separate Lovable sign-in. Claude requires a Team or Enterprise plan.
The steps below connect your own Lovable account using OAuth. When you connect for the first time, your client opens a browser window to authenticate with your Lovable account and authorize access.
Workspace admins and owners can also find everything on this page inside Lovable: Workspace settings → Build & deploy → MCP server shows the server URL, setup steps for common clients, and a Manage access shortcut to the workspace’s Third-party MCP clients setting.
Pick your client below.
Add the Lovable MCP server in ChatGPT using this URL:
ChatGPT prompts you to authenticate via OAuth when you connect.
Add Lovable through Claude’s connector settings. Works in Claude Desktop (macOS and Windows) and on claude.ai.
1

Open the connector picker

In Claude, click the + sign.
2

Browse connectors

Click Connectors → Browse Connectors, then search for Lovable.
3

Connect and authenticate

Click Connect, then log in to Lovable when Claude prompts you.
The Lovable tools appear in the composer’s tool menu once authentication is complete.
Run this command in your terminal:
Alternatively, install the Lovable plugin, which also adds slash commands for common tasks:
The first time a Lovable tool runs, Claude Code opens a browser window to log in to Lovable.Verify with /mcp (look for the lovable server) or ask Claude Code to “list my Lovable workspaces.”
If you prefer editing the config directly, add the following to your MCP configuration:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
If your config file already has an mcpServers object with other servers in it, add the "lovable" entry inside the existing object. Don’t paste a second mcpServers block, the file won’t be valid JSON.
Restart Claude Desktop after saving. The Lovable tools will appear in your agent’s tool list.
With the Codex CLI installed, run these commands in your terminal:
Complete the browser sign-in with your Lovable account and authorize access.Start a new Codex session and use /mcp to check that the lovable server is connected.For other configuration options, see the Codex MCP documentation.
Install the Lovable plugin in Cursor for a guided setup that connects the MCP server for you and adds slash commands for common tasks: /lovable-new, /lovable-iterate, /lovable-db, and /lovable-deploy. Log in with your Lovable account when prompted on the first tool call.To connect the server manually instead, add the following to your MCP configuration (~/.cursor/mcp.json globally, or .cursor/mcp.json in your project root):
If your mcp.json already has an mcpServers object with other servers in it, add the "lovable" entry inside the existing object. Don’t paste a second mcpServers block, the file won’t be valid JSON.
Reload your Cursor window after saving.
Add the Lovable MCP server through VS Code’s MCP settings, or add the following to your MCP configuration file:
VS Code prompts you to authenticate via OAuth in your browser.

Available tools

The Lovable MCP server exposes the following tools. Tool calls run with your Lovable account’s permissions and operate on your real projects.
A machine-readable version of this reference, including tool parameters, lives at mcp.lovable.dev/skill.md. It is maintained alongside the server, so it always matches the tools the server currently exposes. The skill, the Claude Code plugin, and client setup guides are open source in the lovablelabs/mcp repository.

Identity and workspaces

Projects

Agent interaction

Drafts

These tools work with a project’s drafts, copies of the project where you test changes before you add them to the main version. To build in a draft, pass its draft_id to send_message.

Instructions and skills

Code inspection

The project’s database

These tools act on the project’s built-in database. A project that uses your own Supabase project is managed in Supabase instead.

Connectors

Analytics

File uploads

Feedback

Client-specific tools

Two tools only appear in certain clients:
  • render_project_widget shows a live build-progress widget after create_project. It appears in clients that support MCP Apps, such as ChatGPT.
  • import-claude-design-from-url imports a Claude design into a new Lovable project. It appears in Claude clients only.

Skills

A skill is a reusable instruction file that tells your AI client how to use the Lovable MCP server effectively: when to trigger it, how to sequence tool calls, and what patterns to follow. Add it to your client once and it will know how to drive Lovable without extra prompting. Lovable publishes the skill at mcp.lovable.dev/skill.md. It is maintained alongside the server, so it always matches the tools the server currently exposes. Download the file and add it to your client’s skills or instructions directory, for example .claude/skills/lovable-mcp/SKILL.md for Claude Code.

Troubleshooting

Run tools/list to confirm the connection. If tools don’t appear, troubleshoot based on how you connected:
  • Connected through the client’s UI (OAuth): Open your client’s connector or MCP settings, remove the Lovable entry, and add it again to re-run the OAuth flow.
  • Using a config file: Open the config file and confirm the JSON is valid and the "lovable" entry is nested inside the existing mcpServers object. Restart the client after saving.
Call list_workspaces to retrieve valid workspace IDs. If you omit workspace_id on create_project, Lovable picks the workspace automatically when only one is eligible; if multiple workspaces qualify, the tool returns a WAITING response listing them so you can re-call with a specific workspace_id.
The project ID is incorrect or the project was deleted. Call list_projects with the workspace ID to find the correct ID.
The project doesn’t have a database provisioned. Call enable_database first (takes 30-60 seconds), then retry.
Lovable databases support a fixed set of PostgreSQL extensions. query_database refuses a CREATE EXTENSION statement for any other extension and returns this error with the list of supported extensions. Remove the statement and build the feature with plain SQL instead. See Supported PostgreSQL extensions.
Confirm the table exists by running SELECT table_name FROM information_schema.tables through query_database first, then query the table you need.
When your workspace enables Block publishing with critical issues, deploy_project refuses to publish while the project has unresolved critical security findings. Findings from earlier scans count too, such as findings from the Deep scan or from AI pentests with Aikido. The response is a 400 with type security_critical_findings, and its finding_refs field names the findings that blocked it.What to do: open the project’s Security view, fix the named findings or intentionally ignore them, then call deploy_project again.
If your workspace has Enforce SSO enabled, the Lovable MCP server requires a new SSO login when the workspace’s Session duration has passed, from 8 hours to 30 days. With Indefinite, the server does not ask you to log in again for this reason.When the session expires, the server responds with 401 Unauthorized and a WWW-Authenticate: Bearer error="invalid_token" challenge. MCP clients that follow the MCP specification, such as Claude Desktop, Cursor, and Claude Code, restart the OAuth flow automatically. The client opens a browser window so you can log in to your identity provider again.To resolve it, complete the login prompt in your browser. Your client picks up the new token automatically and tool calls resume.See Set up single sign-on (SSO) for how workspace owners and admins configure session duration.
This is intended if you used Log out everywhere in your account settings. Logging out everywhere disconnects every external app connected to your Lovable account, including MCP clients.To reconnect, open your client’s connector or MCP settings, remove the Lovable entry, and add it again. Your client opens a browser window so you can log in to Lovable.

FAQ

Chat connectors let the Lovable agent connect to your external tools, such as Notion, Linear, or Miro, while you build. The Lovable MCP server is the reverse. It lets your external client, such as ChatGPT, Claude, Claude Code, Codex, Cursor, or VS Code, connect to Lovable and manage your projects from there.
All plans. On Enterprise workspaces, a workspace admin or owner must first enable Third-party MCP clients in Workspace settings → Security → Privacy & security → Integrations.
API key authentication is not currently available. OAuth is the only supported way to connect to the Lovable MCP server.
Standard Lovable credits apply to create_project and send_message calls. Other tools are free.
Access depends on the OAuth scopes you authorize and your existing Lovable access. The connection can access multiple projects and workspaces, but it cannot expand your access to them.