Home › Rules › Lovable MCP in Cursor and Codex
Lovable MCP server in Cursor, Codex, VS Code, ChatGPT and Claude
Short answer: Lovable runs an MCP server at https://mcp.lovable.dev. Hook it up to Cursor, OpenAI Codex, VS Code, ChatGPT or Claude, and you can ask that tool in plain English to create Lovable projects, send changes to Lovable, read the code, and publish. In Cursor, the quickest way is Lovable's plugin from the Cursor Marketplace, or one block in mcp.json. In Codex, it's two commands: codex mcp add and codex mcp login. Lovable says the server works on all plans, including Free. You log in with your Lovable account in a browser. There's no API key. Every call runs on your real Lovable account and can use real credits.
Using Claude Code? That has its own command and plugin. See Lovable MCP server + Claude Code.
Pick your tool
| Tool | Easiest way | Or by hand |
|---|---|---|
| Cursor | Install the Lovable plugin from the Cursor Marketplace | .cursor/mcp.json or ~/.cursor/mcp.json |
| Codex (CLI, IDE extension, ChatGPT desktop app) | codex mcp add, then codex mcp login | ~/.codex/config.toml |
| VS Code | Command Palette → MCP: Add Server | An MCP config file with a servers block |
| Claude Desktop / claude.ai | + → Connectors → Browse Connectors → Lovable | claude_desktop_config.json |
| ChatGPT | Add the server URL, or use Lovable's ChatGPT app | Not needed |
What you need first
- A Lovable account on any plan. Lovable's docs say the MCP server is available on all plans. Outside access (Lovable calls it "Third-party MCP clients") is on by default for Free, Pro and Business workspaces. On Enterprise it's off until a workspace admin or owner turns it on in Workspace settings → Security → Privacy & security.
- A browser for the login. The connection uses OAuth: your tool opens a browser window, you log in to Lovable and approve access. Lovable's docs say API keys aren't supported for the MCP server.
- The tool itself. Cursor's pricing page lists a Free plan with limited agent requests, plus paid plans. OpenAI's Codex pricing page lists Codex in the CLI and IDE extension from ChatGPT Plus ($20 a month). Free and Go list Codex in the desktop app, "subject to rollout". You can also sign in to Codex with an OpenAI API key and pay API rates instead.
- Optional shortcut inside Lovable: workspace admins and owners can open Workspace settings → Build & deploy → MCP server. It shows the server address and setup steps for common tools.
Connect Lovable to Cursor
Option 1: the Lovable plugin (guided)
Lovable's docs recommend this for Cursor. The plugin connects the MCP server for you and adds slash commands. The plugin's page in the Cursor Marketplace lists what's in it: 4 commands, 4 skills, 2 rules and the lovable MCP server. It's listed as created by Lovable.
- Open the Lovable plugin page in the Cursor Marketplace, or search "Lovable" in the marketplace panel inside Cursor. The marketplace page shows this install command:
/add-plugin lovable
Get a free starter kit: the Discord Bot Builder ($6)
The Discord Bot Builder kit ($6) free, plus all 137 rules files as a bonus. One email with your download links.
Free. No spam. Unsubscribe anytime. See our privacy note.
- Choose where it applies. Cursor's docs say plugins can be installed at the project level or the user level (all your projects).
- Log in to Lovable when Cursor asks, on the first tool call.
- Use the commands:
/lovable-new(new project from a short brief),/lovable-iterate(send a change and check the diff),/lovable-db(set up or look at the project's database) and/lovable-deploy(publish and get the live link).
Cursor says its marketplace plugins are open source and manually reviewed.
Option 2: add it to mcp.json yourself
Lovable's docs give this exact block for Cursor. Put it in .cursor/mcp.json in your project folder (that project only), or ~/.cursor/mcp.json in your home folder (every project):
{
"mcpServers": {
"lovable": {
"type": "http",
"url": "https://mcp.lovable.dev",
"auth": {
"CLIENT_ID": "6d465f583e1e4ce5801b1616f735670c"
}
}
}
}
- Already have other servers in the file? Add only the
"lovable"part inside your existingmcpServersblock. Lovable's docs warn that a secondmcpServersblock makes the file invalid JSON. - The
CLIENT_IDisn't a secret. Lovable's GitHub README calls it Lovable's public OAuth client ID. Cursor's docs explain theauthblock: it's for servers that hand out a fixed client ID. - Reload your Cursor window after saving, as Lovable's docs say.
Check it worked: open Customize in the sidebar, then MCPs, and look for lovable with its toggle on. Then ask the agent: "list my Lovable workspaces". By default, Cursor asks your OK before it runs an MCP tool.
Connect Lovable to OpenAI Codex
Lovable's own GitHub repository (lovablelabs/mcp) gives these two commands for the Codex CLI. The first saves the server, the second opens the browser so you can log in to Lovable:
codex mcp add lovable --url https://mcp.lovable.dev
codex mcp login lovable
- One setup covers three apps. OpenAI's Codex docs say the ChatGPT desktop app, the Codex CLI and the Codex IDE extension share the same MCP settings, so you can switch between them without setting it up again.
- Where it's saved: Codex keeps MCP servers in
~/.codex/config.toml. You can also give one project its own.codex/config.toml, but Codex's docs say that only works in trusted projects.
Check it worked. In your terminal, codex mcp list shows your servers and codex mcp get lovable shows the Lovable entry. Inside a Codex session, type /mcp to see your active servers and tools.
codex mcp list
codex mcp get lovable
Prefer editing the file? Codex's docs say each server is a [mcp_servers.<name>] table, and a server you reach by address needs only url. That makes the Lovable entry two lines. Run codex mcp login lovable afterward to log in:
[mcp_servers.lovable]
url = "https://mcp.lovable.dev"
To switch Lovable off for a while without deleting it, Codex's docs say to add enabled = false under that table. codex mcp remove lovable deletes the entry, and codex mcp logout lovable removes the saved login.
Connect Lovable to VS Code
- Open the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on a Mac) and run MCP: Add Server.
- Choose HTTP and paste
https://mcp.lovable.dev. - Give it the ID
lovable, pick where to save it, and log in to Lovable when VS Code opens your browser.
Or add Lovable's block to your MCP config file. Note the top word is servers, not mcpServers. VS Code's docs say its own format uses servers, so don't copy the Cursor block here.
{
"servers": {
"lovable": {
"type": "http",
"url": "https://mcp.lovable.dev"
}
}
}
VS Code's docs say adding a server isn't proof it works. Ask for something small, like "list my Lovable workspaces", then expand the tool call in the chat and check it came from the lovable server.
Connect Lovable to Claude Desktop or claude.ai
In Claude, click the + sign, then Connectors → Browse Connectors, search for Lovable, click Connect and log in to Lovable. Lovable's docs say this works in Claude Desktop (Mac and Windows) and on claude.ai. If you'd rather edit the config file, Lovable's docs give this block. On a Mac the file is ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows it's %APPDATA%\Claude\claude_desktop_config.json.
{
"mcpServers": {
"lovable": {
"type": "http",
"url": "https://mcp.lovable.dev"
}
}
}
Restart Claude Desktop after saving.
Connect Lovable to ChatGPT
Lovable's MCP docs say to add the server in ChatGPT with the address https://mcp.lovable.dev. ChatGPT then asks you to log in to Lovable. OpenAI's plugin directory also lists a Lovable plugin made by Lovable Labs. OpenAI says availability depends on your plan and workspace settings. Separately, Lovable's ChatGPT app lets you tag @Lovable in a chat to turn your plan into a first build, which you then keep editing in Lovable.
Matching kit: MVP Spec-to-Build Pack ($7)
The free rules set the boundaries. The MVP pack gives you the build order: a 1-page spec to fill in first, then 7 prompts in sequence (skeleton, review, login, database, security, one feature at a time, polish), plus a "did I leak user data?" checklist.
See the MVP Spec-to-Build Pack ($7) →
Instant download. 7-day refund, no questions asked.
Add Lovable's skill file (Cursor and Codex)
Lovable publishes a skill file at mcp.lovable.dev/skill.md. It tells your AI which Lovable tool to use when, and in what order. Lovable's docs say to save it in your tool's skills folder. One folder works for both tools here: Codex's docs and Cursor's docs both list .agents/skills/ in your project. From your project folder on a Mac or Linux:
mkdir -p .agents/skills/lovable-mcp
curl -o .agents/skills/lovable-mcp/SKILL.md https://mcp.lovable.dev/skill.md
One fix is needed. Codex's docs say a SKILL.md must include a name and a description, and Cursor's docs list both as required. Lovable's file starts straight with a heading. Paste this at the very top of the saved file. The name has to match the folder name:
---
name: lovable-mcp
description: Use when I ask to create, change, check, or publish a Lovable project through the Lovable MCP server.
---
- For all your projects, use
~/.agents/skills/lovable-mcp/instead. Both tools read that folder too. - If you installed the Cursor plugin, you can skip this. The plugin already comes with 4 Lovable skills.
- In Codex, type
$or run/skillsto call a skill by name.
What you can ask for
Lovable's docs list tools for your workspaces, projects (create, copy, publish), messages to Lovable's agent (with an optional plan mode), reading files and diffs, Instructions and skills, the project's built-in database, connectors and visitor analytics. Example prompts from Lovable's docs:
- "Show me what changed in the last three edits to my project"
- "Deploy my project [ID] and give me the live URL"
The full tool list is in our Claude Code version of this guide. It's the same server for every tool.
Credits, publishing and your data
- Credits: creating a project and sending Lovable a message use your normal Lovable credits. Lovable's docs say the other tools are free. More in Lovable credits explained.
- It's your real account, and the connection can reach more than one project or workspace, within the access you approve.
- Publishing is public by default on Free and Pro. Anyone with the live link can open the app unless its website access is set to Invite only.
- The database tool has full permissions: it can read, change and delete data. Have your AI show you any SQL first.
- Instructions updates replace the old text completely.
Troubleshooting checklist
- Tools don't show up? If you connected through the tool's settings, Lovable's docs say to remove the Lovable entry and add it again so the login runs fresh. If you used a config file, check the JSON is valid and the
"lovable"entry sits inside the existingmcpServersblock, then restart the tool. - Cursor login window loops or never finishes? Lovable's README says to make sure the
authblock withCLIENT_IDis there. - Cursor error you can't read? Open the Output panel (Ctrl+Shift+U, or Cmd+Shift+U on a Mac) and pick MCP Logs.
- Codex says you're not logged in, or the token expired? Run
codex mcp login lovableagain. Lovable's README says to re-run your tool's login when you get a 401 error. - "Transport not supported"? Lovable's README says your tool must support Streamable HTTP. Cursor and Codex both list it in their docs.
- "Workspace not found" or "Project not found"? Ask your AI to list your workspaces, then your projects, and use the IDs it gets back.
- "No database found"? The project's database isn't switched on. Lovable's docs say enabling it takes 30 to 60 seconds.
- Enterprise workspace? An admin has to turn on Third-party MCP clients first.
Put your Lovable rules in AGENTS.md
The Cursor plugin's commands come with their own rules. If you use the plain server, write your ground rules down once. Cursor reads an AGENTS.md in your project root, and Codex reads AGENTS.md files before doing any work, so one file covers both. Paste this section in and fill in the brackets:
## Lovable (through the Lovable MCP server)
- My Lovable project: [project name]. Project ID: [paste it once you know it].
- Ask me before any call that uses Lovable credits (creating a project or sending Lovable a message). Tell me what you plan to send first.
- For anything bigger than a small change, send it to Lovable in plan mode first and show me the plan.
- After Lovable finishes a change, show me the diff and tell me how to check it in the preview.
- Never publish (deploy) without my OK. Tell me who will be able to see the live link.
- Before running SQL on the project's database, show me the exact query. Never change or delete data, or the table structure, without my OK.
- Don't change the project's Instructions (knowledge) or workspace skills unless I ask. Those updates replace the old text completely.
- Work on one Lovable project at a time, and only the one I named.
If the project is also synced to GitHub, Lovable's own agent reads AGENTS.md too, so keep this section short. Rules for Lovable itself go in Project settings → Instructions (see our Project Knowledge examples). More starters: AGENTS.md examples and Cursor rules vs AGENTS.md.
MCP server or GitHub sync?
With the MCP server, Lovable still writes the code and Cursor or Codex works like a remote control. With GitHub sync, the code comes to your computer and Cursor or Codex edits the files itself. To keep building in Lovable, use the MCP server. To edit the code yourself, see Move a Lovable project to Cursor or Claude Code.
Next step for Lovable, Cursor and Codex: Agent Skills
Skills are folders your AI coding agent loads only when the job comes up, and Claude Code, Cursor and OpenAI Codex all read the same SKILL.md format. The Vibe Coder Skills Pack ($9) is 6 ready-to-copy SKILL.md skills (fix-one-bug, stop-the-loop, leak-check, ship-check, explain-project, builder-handoff) for Claude Code, Cursor and OpenAI Codex. Also included in the 6-kit bundle.
Get the Skills Pack for $9 on Gumroad → See what's inside
One .zip of skill folders plus one markdown file. 7-day refund, no questions asked.
Best value
All 6 kits for $29 — or $20.30 with code WELCOME30 (through Nov 30)
Connecting the tools is the easy part. The kits tell your AI what to build, step by step: a small game, a Discord bot, an email-triage agent, an MVP, or a cleanup of messy code.
Get all 6 kits for $29 → See what's in each kit
$29 instead of $48 for the six kits bought separately; WELCOME30 takes 30% off that at checkout ($20.30). Instant download from Gumroad. 7-day refund, no questions asked.
Related
- Connect Lovable to Claude Code (MCP server, plugin and skill)
- Move a Lovable project to Cursor or Claude Code (GitHub sync + AGENTS.md)
- Lovable vs Claude Code for beginners (real prices)
- Cursor vs Claude Code vs Codex for beginners
- AGENTS.md examples
- Cursor rules examples
- Cursor rules vs skills
- Lovable Project Knowledge examples
- Lovable credits explained
Sources
- Lovable docs: Lovable MCP server
- Lovable: MCP skill file (skill.md)
- Lovable on GitHub: lovablelabs/mcp (README with Codex CLI setup)
- Lovable docs: Lovable ChatGPT app
- Cursor Marketplace: Lovable plugin
- Cursor docs: Model Context Protocol (MCP)
- Cursor help: MCP integrations
- Cursor docs: Plugins
- Cursor docs: Skills
- Cursor docs: Rules (AGENTS.md)
- Cursor: Pricing
- OpenAI Codex docs: Model Context Protocol
- OpenAI Codex docs: Command line options (codex mcp)
- OpenAI Codex docs: Build skills
- OpenAI Codex docs: Custom instructions with AGENTS.md
- OpenAI Codex docs: Pricing
- OpenAI: Lovable plugin for ChatGPT
- VS Code docs: Add MCP servers
Commands, config files, menu paths and plan details checked Oct 29, 2026 on Lovable's, Cursor's, OpenAI's and Microsoft's own docs and pages. These tools change often. If something here no longer matches, tell us at [email protected].