İçeriğe git
Docs menuMCP and API reference / MCP server
On this page
  1. Claude on desktop and the web
  2. Claude Code
  3. Before you approve
  4. Ask before it publishes
  5. Read-only
  6. Tools
  7. Two more tools for coding agents

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.

Your AI app

The MCP server lets an AI app read and edit your Lefine content. The address is the same for every app:

text
https://dash.lefine.ai/v1/mcp

Every app signs in on a Lefine page. There is no key to copy.

  1. The app opens a Lefine page.
  2. Pick the workspace and click Approve.
  3. 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

  1. Open Customize, then Connectors. Click Add, then Add custom connector.
  2. Fill in the two fields and click Continue:
    • Name: Lefine
    • MCP server URL: https://dash.lefine.ai/v1/mcp
  3. Keep the sign-in settings Claude detected. Click Continue again, then click Add.
  4. 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:

Terminal
claude mcp add --transport http --scope user lefine https://dash.lefine.ai/v1/mcp

Open 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.

  1. Go to chatgpt.com/plugins. Click the plus, then Add custom MCP server.
  2. Fill in the two fields. Under Authentication, choose OAuth.
    • Name: Lefine
    • Server URL: https://dash.lefine.ai/v1/mcp
  3. Tick I understand and want to continue, then click Create as a plugin.
  4. Click Install. In a chat, type @ and pick Lefine. A Lefine page opens to sign in.

Cursor

One click. Cursor asks you to confirm.

Add to Cursor

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.

Install in VS Code

Link blocked? Use the web version.

Codex

Run these in a terminal. The first adds Lefine. The second signs you in.

Terminal
codex mcp add lefine --url https://dash.lefine.ai/v1/mcpcodex mcp login lefine

Any other app

This finds your AI apps and sets them up:

Terminal
npx lefine setup

Or paste the address into the app's MCP settings:

text
https://dash.lefine.ai/v1/mcp

To run the MCP server on your own computer instead:

Terminal
npx @lefine/mcp@next

Restart 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:

text
https://dash.lefine.ai/v1/mcp?level=read

Tools

ToolWhat it does
lefine_contextwho the key is, which modules are on, what it may do. Call it first.
lefine_findsearch the actions you can run
lefine_readrun an action that only reads
lefine_writerun an action that writes drafts or settings; nothing goes live
lefine_publishrun an action that goes live or spends money, after a person approves
lefine_lookupfind a page, key, media file, app, project, type or global by name
lefine_editchange fields of one page, global or key as a draft
lefine_launchtake the workspace into a new market in one run, for example "launch in Japanese"
lefine_launch_statusread 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.

ToolWhen the agent uses it
lefine_find_similar_keyAlways first. Give appId (app_…, from lefine.ts) and the text, the key name, or both. Returns up to 10 keys, closest first
lefine_add_keyOnly when nothing fits. Adds one key with its source text

lefine_find_similar_key answers with the keys to reuse:

json
[ { "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: false only after checking the meaning differs);
  • the namespace does not exist (pass newNamespace: true only 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.

Next step · MCP and API referenceMCP tool reference
Was this page helpful?