Connect Your AI Agent
AI agents can work on the real files: they read the project, write pages and components, check that the site builds, and publish it. You bring your own, and it talks to Lediv directly, with nothing to install and no bridge to run.
You only need one address:
https://lediv.app/mcp The first time your agent connects, Lediv opens an approval screen in your browser, where you sign in and approve it.
Add Lediv to your agent
Claude
On claude.ai, open Customize, then Connectors, click + and choose Add custom connector. Paste the address and connect. Claude for desktop picks up the connectors on your account. In a chat, turn it on from the + menu, under Connectors.
Claude Code
claude mcp add --transport http lediv https://lediv.app/mcp ChatGPT
In the ChatGPT desktop app, open Settings, then MCP servers, and add it as a Streamable HTTP server. It shares its configuration with Codex, so adding it in either place adds it in both.
Codex
codex mcp add lediv --url https://lediv.app/mcp
codex mcp login lediv Cursor
Add it to .cursor/mcp.json in the project, or ~/.cursor/mcp.json for
every project:
{
"mcpServers": {
"lediv": {
"url": "https://lediv.app/mcp"
}
}
} VS Code
Run MCP: Add Server from the command palette, or write
.vscode/mcp.json yourself. The key is servers, not
mcpServers, and a remote server needs "type": "http".
{
"servers": {
"lediv": {
"type": "http",
"url": "https://lediv.app/mcp"
}
}
} Gemini CLI
Add it to ~/.gemini/settings.json. Use httpUrl. The
url key is for the older transport and will not work.
{
"mcpServers": {
"lediv": {
"httpUrl": "https://lediv.app/mcp"
}
}
} Then run /mcp auth lediv to approve it.
Any other agent
Lediv speaks MCP over Streamable HTTP at
https://lediv.app/mcp. It registers your agent on its own the first time, or takes
a token in the Authorization header. It answers a POST whose
Accept lists both application/json and text/event-stream,
which is what the protocol asks a client to send. A client that only speaks the older HTTP with
server-sent events, that sends a bare */* instead of naming those two, or that can
only put the credential in the address, cannot connect.
Approve it
On the screen Lediv opens:
- Tick what the agent may do.
- Choose All projects or a single one.
- Click Connect.
You can tick what the agent asked for; a client that asks for nothing is offered read and edit. Read projects is the one you cannot untick, because an agent that cannot read the project cannot do anything else with it either. If the permission you need is not on the screen, it did not ask for it, and a token is how you give it anyway.
An approval lasts 30 days from the day you gave it. The agent renews its own credential quietly, but using it does not push that date back, so about once a month it asks you again.
Approved agents live under Connected apps in your account. Approving the same agent again, from another device or to change its permissions, adds a second entry there that counts toward the ten an account can hold; disconnect the one you no longer use.
Use a token instead
For a client that only knows how to send a header, or when you would rather hold a credential you can see and revoke on its own.
- Open Account in your dashboard and click New token under Access tokens.
- Name it after the agent that will use it, so you can revoke one without touching the rest.
- Tick the permissions it needs. Under Projects, keep All projects or name a single one. Under Expiry, choose 30 days, 90 days, 1 year, or Never.
- Copy the token. It is shown once.
In Cursor or Gemini CLI, add a header next to the address:
"headers": { "Authorization": "Bearer YOUR_TOKEN" } In Codex, name the environment variable that holds it:
[mcp_servers.lediv]
url = "https://lediv.app/mcp"
bearer_token_env_var = "LEDIV_TOKEN" In Claude Code, pass it on the command that adds the server:
claude mcp add --transport http lediv https://lediv.app/mcp --header "Authorization: Bearer YOUR_TOKEN" Keep the token where you keep passwords. Cursor and VS Code hold their configuration inside the project, so point at an environment variable there rather than writing the token itself. Cursor reads one straight from the header:
"headers": { "Authorization": "Bearer ${env:LEDIV_TOKEN}" } What you are granting
Both ways in offer the same four permissions.
| Scope | What it allows |
|---|---|
Read projects projects:read | Read the file tree, the file contents and the assets of a project (a small png, jpeg, gif or webp comes back as an image, anything else comes back as its name, type and size), plus its saved versions, its published address, its deployments, its connected domains and, on a project you own, who it is shared with. |
Edit projects projects:write | Create a project, create, edit, move and delete its files, import a file from a URL, and save and restore versions (saving and restoring need a Pro plan). |
Publish sites sites:publish | Publish the site, see how a publish went, roll it back to an earlier deployment, hide it from search engines, share and revoke a preview link, change the site address, and unpublish it. Unpublishing a site that still has custom domains on it also needs Manage domains, because that is the call that disconnects them for good. |
Manage domains domains:manage | Connect a domain, re-check its DNS, choose the primary one, and disconnect one. |
Moving a project to the trash, and bringing it back, needs Edit projects and Publish sites together. Trashing answers 404 on every address the site had and deletes every earlier deploy, so it is a publishing act as much as a project one.
Publish sites and Manage domains only work on projects you own. On a project somebody shared with you, every one of those actions is refused, because publishing a site and connecting a domain are the owner's to decide; all either permission still opens there is reading whether the project is published and at what address. Reading and editing work on shared projects as usual, apart from the list of who else is on them: that roster carries email addresses, so only the owner can read it.
A credential can do everything the permissions you ticked allow, whoever is holding it and whether or not your agent would ever ask. Leave out what you do not need. An agent that only drafts pages has no reason to publish, or to trash the project.
What it can do
Ask it in your own words.
- Create a project and write its first pages and components.
- Restyle a section, add a page, fix copy across several files.
- Check that the project builds, and read the HTML of a page, before anything goes live.
- Save a version before a big change, and restore it if it went wrong.
- Publish, and roll the site back to an earlier deployment if a publish went wrong.
Edits land live. If you have the project open in the editor, you see them appear as they happen, the same way you see a teammate typing.
Rolling back, saving or restoring a version, and every custom domain operation except disconnecting one need a Pro plan. Reading the saved versions of a project works on any plan.
What it cannot do
- Upload a picture from your computer. Ask it to import one from a URL, or drag the file into the editor yourself.
- Touch billing, plans or your account.
- Reach a project the credential was not given.
Taking access back
Disconnect an approved agent from Connected apps. That ends the approval and every credential behind it, so it cannot renew itself and has to ask you again. Allow up to a minute for an agent that is mid-conversation to notice.
Revoke a token from the same screen where you created it. It stops working immediately, on every agent using it.
Deleting your Lediv account takes both with it. Every token and every connected agent stop working when the account goes.