Documentation Index
Fetch the complete documentation index at: https://docs.lovable.dev/llms.txt
Use this file to discover all available pages before exploring further.
What is the Lovable MCP server?
Lovable exposes itself as a Model Context Protocol (MCP) server athttps://mcp.lovable.dev. This lets AI clients (such as Claude Desktop, Cursor, and other MCP-compatible tools) 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.
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.The flow
- An agent connects to the Lovable MCP server
- The agent calls a tool (for example,
create_project) with a description of what to build - Lovable builds the project and returns a preview URL.
- You can open the preview, review what was built, and continue iterating by sending more messages
- The agent keeps building as you refine, adding features, fixing issues, changing the design
- When you’re happy with it, publish with
deploy_project. Or don’t, publishing is always optional.
Who this is for
- Developers using AI coding assistants (Claude Code, Cursor, Windsurf) who want to spin up and iterate on Lovable projects without leaving their editor
- Teams building automations with tools like n8n, LangGraph, or custom scripts that need to create or manage apps programmatically
- Agent builders who want Lovable as a step in a larger pipeline: generate content, scaffold a UI, deploy it, and hand off the URL, all in one flow
Why use the Lovable MCP server
- Agent-driven development: Let Claude, Cursor, or your own agent scaffold and iterate on Lovable projects using natural language.
- Automation: Trigger project creation, deployments, and chat interactions from scripts, workflows, or pipelines.
- 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
| Scenario | Example prompt to your agent | Outcome |
|---|---|---|
| Scaffold a new app | Create a Lovable project called ‘Feedback Hub’ with a form for collecting user feedback | Project created and first build completed |
| Iterate on an existing project | Add a dark mode toggle to my project [ID] | Agent sends message and waits for Lovable to finish |
| Review recent changes | Show me what changed in the last three edits to my project | Unified diff of recent commits |
| Deploy an app | Deploy my project [ID] and give me the live URL | Project published; live URL returned |
| Inspect the codebase | List all files in my project and read the main App.tsx | File tree and file content returned |
| Compare multiple variants | Build 3 versions of a landing page for [product], each with a different layout and visual style. Deploy all three and give me the live URLs. | Three deployed projects with live URLs to compare |
Prerequisite
- A Lovable account on a Pro or Business plan
Before you connect
How to connect
The Lovable MCP server uses OAuth for authentication. When you connect for the first time, your client will open a browser window to authenticate with your Lovable account.API key authentication is also supported for headless or scripted use cases. See How do I connect without OAuth? in the FAQ below.
- Claude Desktop / ChatGPT
- Cursor
- Claude Code
- Codex
- Other clients
Add the following to your MCP configuration:Restart Claude Desktop after saving. The Lovable tools will appear in your agent’s tool list.
- Claude Desktop (macOS):
~/Library/Application Support/Claude/claude_desktop_config.json - Claude Desktop (Windows):
%APPDATA%\Claude\claude_desktop_config.json
Available tools
The Lovable MCP server exposes the following tools. All tool calls are workspace-scoped to the API key or OAuth token used.Projects and workspaces
| Tool | Description |
|---|---|
get_me | Get the authenticated user’s profile and workspaces |
list_workspaces | List all workspaces the user belongs to |
get_workspace | Get details for a specific workspace |
list_projects | Search and list projects in a workspace, with filtering and full-text search |
get_project | Get project details, including editor URL, preview URL, and a screenshot |
create_project | Create a new project, optionally with an initial message to the agent |
deploy_project | Publish a project and get the live URL |
remix_project | Make a copy of an existing project into a workspace. The source project must be accessible to your workspace (your own workspace projects, templates, library projects, or projects with public remixing enabled). |
set_project_visibility | Set who can access the project in the editor: private (Workspace, all workspace members, default) or draft (Restricted, creator only, requires Business or Enterprise). Controls editor access only, not who can visit the published app. |
set_folder_visibility | Set a folder to personal or workspace visibility |
list_template_projects | List available project templates |
list_library_projects | List design system library projects available in a workspace |
Agent interaction
| Tool | Description |
|---|---|
send_message | Send a chat message to a project’s AI agent and wait for the response. Supports plan_mode (discuss before building) and files attachments. Pass wait=false to return immediately and poll with get_message instead. |
get_message | Poll for message completion status after send_message with wait=false |
Code inspection
| Tool | Description |
|---|---|
get_diff | Get the unified diff from a message or commit SHA |
list_files | List all files in a project at a specific git ref |
read_file | Read the contents of a single file at a specific git ref |
list_edits | List the edit history of a project with pagination |
Knowledge
| Tool | Description |
|---|---|
get_workspace_knowledge | Get the workspace’s custom AI instructions |
set_workspace_knowledge | Set the workspace’s custom AI instructions |
get_project_knowledge | Get a project’s custom AI instructions |
set_project_knowledge | Set a project’s custom AI instructions |
Cloud database
| Tool | Description |
|---|---|
get_database_status | Check whether Lovable Cloud is enabled for a project |
enable_database | Enable Lovable Cloud on a Lovable project (takes 30-60 seconds) |
query_database | Execute an SQL query on a Lovable Cloud project |
get_database_connection_info | Get the connection string and API URL for a Lovable Cloud project |
Connected MCP servers
| Tool | Description |
|---|---|
list_mcp_servers | List all MCP servers connected to a workspace |
list_mcp_catalog | Browse featured MCP server templates available to add |
list_connectors | List available connector integrations (standard, seamless, and MCP) |
list_connections | List authenticated connector accounts for a workspace |
add_mcp_server | Add an MCP server (catalog or custom) to a workspace |
remove_mcp_server | Remove an MCP server from a workspace |
Analytics
| Tool | Description |
|---|---|
get_project_analytics | Get historical analytics for a published project: visitors, pageviews, bounce rate, session duration, and breakdowns by page, source, device, and country. Requires start_date and end_date (RFC 3339). |
get_project_analytics_trend | Get real-time visitor count and 5-minute trend for a published project |
File uploads
| Tool | Description |
|---|---|
get_file_upload_url | Get a presigned URL to upload a file for use as a message attachment |
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-mcp skill
lovable-mcp skill
Copy this file and add it to your AI client’s skills or instructions directory.
FAQ
What is the difference between the Lovable MCP server and chat connectors?
What is the difference between the Lovable MCP server and chat connectors?
Chat connectors let the Lovable agent connect to your external tools (for example, Notion, Linear, Miro) during a build session. The Lovable MCP server is the reverse: it lets your external agent (Claude Desktop, Cursor, a custom script) connect to Lovable and control it programmatically.
How do I connect without OAuth (API key)?
How do I connect without OAuth (API key)?
API keys are supported for headless or scripted use cases where a browser-based OAuth flow isn’t practical. Generate a key from your workspace Settings under API keys (it will start with
lov_). Each key is scoped to a single workspace.Pass the key as a request header in your MCP client configuration:Does using the MCP server consume my Lovable credits?
Does using the MCP server consume my Lovable credits?
Standard Lovable credits apply to
create_project and send_message calls. Other tools are free.What permissions does the MCP server have?
What permissions does the MCP server have?
The MCP server inherits your Lovable user permissions exactly, with no additional surface area.
Why is this a research preview?
Why is this a research preview?
The Lovable MCP server is new infrastructure. Tool names, parameters, and response shapes may change as we refine the MCP server based on real-world usage.
Troubleshooting
Tools not showing after connecting
Tools not showing after connecting
Run
tools/list to confirm the connection. If tools don’t appear:- Verify your API key is set and valid
- Confirm the MCP config JSON is valid
- Restart the client after any config change
Workspace not found
Workspace not found
Call
list_workspaces to retrieve valid workspace IDs. The personal workspace is used by default if workspace_id is omitted.Project not found
Project not found
The project ID is incorrect or the project was deleted. Call
list_projects with the workspace ID to find the correct ID.No database found
No database found
The project doesn’t have a database provisioned. Call
enable_database first (takes 30–60 seconds), then retry.SQL query returns no results
SQL query returns no results
Confirm the table exists using
list_files to browse the project schema, or run a SELECT table_name FROM information_schema.tables query first.