Docs menuMCP and API reference / MCP server
On this page
MCP server
Connect Claude, ChatGPT, Cursor, VS Code or Codex to your workspace. The AI app signs in as you and asks before it publishes.
The MCP server lets an AI app read and edit your Lefine content. The address is the same for every app:
https://dash.lefine.ai/v1/mcpEvery app signs in on a Lefine page. There is no key to copy.
- The app opens a Lefine page.
- Pick the workspace and click Approve.
- The app now acts as you, with the access you approved.
You can also set it up in the dashboard: Settings → AI apps has the same steps, with buttons.
Claude on desktop and the web
- Open Customize, then Connectors. Click Add, then Add custom connector.
- Fill in the two fields and click Continue:
- Name:
Lefine - MCP server URL:
https://dash.lefine.ai/v1/mcp
- Name:
- Keep the sign-in settings Claude detected. Click Continue again, then click Add.
- If Claude does not open it for you, click Connect. On the Lefine page, pick the workspace and click Approve.
On a Team or Enterprise plan, an owner first goes to Organization settings, Connectors, Add, Custom, Web. Each member then clicks Connect under Customize, Connectors.
Claude Code
Run this in a terminal. It adds Lefine for every folder:
claude mcp add --transport http --scope user lefine https://dash.lefine.ai/v1/mcpOpen Claude Code, type /mcp, pick lefine and sign in.
ChatGPT
ChatGPT on the web only. On Business, Enterprise and Edu, an admin or owner creates it.
- Go to chatgpt.com/plugins. Click the plus, then Add custom MCP server.
- Fill in the two fields. Under Authentication, choose OAuth.
- Name:
Lefine - Server URL:
https://dash.lefine.ai/v1/mcp
- Name:
- Tick I understand and want to continue, then click Create as a plugin.
- Click Install. In a chat, type
@and pick Lefine. A Lefine page opens to sign in.
Cursor
One click. Cursor asks you to confirm.
Then open Cursor's MCP settings and click Connect to sign in to Lefine.
Nothing happened? Cursor may not be installed, or your browser blocked the link. Add the address above by hand in the MCP settings.
VS Code
One click. VS Code asks you to confirm, then you sign in to Lefine.
Link blocked? Use the web version.
Codex
Run these in a terminal. The first adds Lefine. The second signs you in.
codex mcp add lefine --url https://dash.lefine.ai/v1/mcpcodex mcp login lefineAny other app
This finds your AI apps and sets them up:
npx lefine setupOr paste the address into the app's MCP settings:
https://dash.lefine.ai/v1/mcpTo run the MCP server on your own computer instead:
npx @lefine/mcp@nextRestart your AI app to get new versions.
An app that cannot sign in at all needs a key. In Settings → AI apps, click Make a key for an AI app. The key acts as you, with the access you pick. Add it to the app as --header "Authorization: Bearer <key>".
Before you approve
Approving gives the AI the same access as your account, at the level you choose. Check the app's name on the Lefine page. Do not paste text you do not trust into the chat.
Ask before it publishes
An AI app can only publish if an owner or admin allows it. Other members go up to changing texts.
A publish asks you first, in the app or with a Lefine link. In Settings → AI apps, under Connected AI apps, a switch per app sets whether it asks. These always ask, whatever the switch says: permanent deletes, emails, access changes, connected apps and renders.
Revoke an app there too. Its next call fails.
Read-only
Turn on Read-only in Settings → AI apps. The address then ends in ?level=read, and the Lefine page offers Read and nothing more:
https://dash.lefine.ai/v1/mcp?level=readTools
| Tool | What it does |
|---|---|
lefine_context | who the key is, which modules are on, what it may do. Call it first. |
lefine_find | search the actions you can run |
lefine_read | run an action that only reads |
lefine_write | run an action that writes drafts or settings; nothing goes live |
lefine_publish | run an action that goes live or spends money, after a person approves |
lefine_lookup | find a page, key, media file, app, project, type or global by name |
lefine_edit | change fields of one page, global or key as a draft |
lefine_launch | take the workspace into a new market in one run, for example "launch in Japanese" |
lefine_launch_status | read a launch: its steps, its diff, and whether it waits for you |
Every action behind these tools is in the MCP tool reference.
Two more tools for coding agents
The local server for developers (npx lefine mcp) passes every tool above through to Lefine. It adds two for coding agents that add texts to your code. It signs in with npx lefine login, or with a key in LEFINE_TOKEN.
| Tool | When the agent uses it |
|---|---|
lefine_find_similar_key | Always first. Give appId (app_…, from lefine.ts) and the text, the key name, or both. Returns up to 10 keys, closest first |
lefine_add_key | Only when nothing fits. Adds one key with its source text |
lefine_find_similar_key answers with the keys to reuse:
[ { "namespace": "pricing", "key": "cta", "sourceText": "Start free trial", "score": 0.92 }]or No similar key. A new one is fine.
lefine_add_key refuses, and says why, when:
- the key exists in any namespace: "The key already exists: … Edit its text in Lefine instead of adding it again.";
- a key with the same text exists: "This text already has a key: pricing.cta. Use it in code." (pass
reuse: falseonly after checking the meaning differs); - the namespace does not exist (pass
newNamespace: trueonly when a new one is meant); - the text is not valid ICU.
On success: Added pricing.hint. It is not live until someone publishes in Lefine. Run npx lefine strings types so the editor knows it. The key ships with the next publish, which a person approves.