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.

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

The Lovable MCP server’s OAuth flow is currently restricted to the following clients:
  • ChatGPT
  • Claude (Claude Desktop on macOS and Windows, and claude.ai)
  • Claude Code
  • Cursor
  • VS Code
Other MCP clients cannot complete the OAuth flow at this time. The rest of this page refers to these supported 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 ChatGPT, Claude Code, Cursor, or VS Code who want to spin up and iterate on Lovable projects without leaving their AI client or editor
  • 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.
  • 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 Settings → Security → Privacy & security, under Third-party MCP clients
  • One of the supported AI clients installed

Before you connect

When you connect a client to the Lovable MCP server, it has the same account access you do. A few things to know before connecting:
  • Scope is your full account, not one project. Whatever client you connect can list, read, and edit every project you have access to in Lovable.
  • 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. 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.

How to connect

The Lovable MCP server uses OAuth for authentication. When you connect for the first time, your client opens a browser window to authenticate with your Lovable account.
Workspace admins and owners can also find everything on this page inside Lovable: 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 ConnectorsBrowse Connectors, then search for Lovable.
3

Connect and authenticate

Click Connect, then sign 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 sign 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.
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. Sign 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

Knowledge and skills

Code inspection

Cloud database

Connectors

Analytics

File uploads

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.
Confirm the table exists by running SELECT table_name FROM information_schema.tables through query_database first, then query the table you need.
If your workspace has Enforce SSO enabled with a session duration (24 hours, 48 hours, or 7 days), the Lovable MCP server requires a fresh SSO sign-in once that window elapses.When the session expires, the server responds with 401 Unauthorized and a WWW-Authenticate: Bearer error="invalid_token" challenge. Spec-compliant MCP clients (Claude Desktop, Cursor, Claude Code) automatically restart the OAuth flow, which opens a browser window so you can re-authenticate against your identity provider.To resolve it, complete the sign-in 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.

FAQ

Chat connectors let the Lovable agent connect to your external tools (for example, Notion, Linear, or Miro) during a build session. The Lovable MCP server is the reverse: it lets your external client (ChatGPT, Claude, Claude Code, Cursor, or VS Code) connect to Lovable and control it programmatically.
All plans. On Enterprise workspaces, a workspace admin or owner must first enable Third-party MCP clients in Settings → Security → Privacy & security.
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.
The MCP server inherits your Lovable user permissions exactly, with no additional surface area.