Connect Your Own Agent
Your own AI agent can work on the real files. It reads the project, writes pages and components, checks that the site builds, and publishes it. It talks to Lediv directly, with nothing to install and no bridge to run. If you would rather not bring one, Lediv Agent is built into the editor on Pro.
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 in 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 to ~/.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 with 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,
as the protocol asks. A client cannot connect if it only speaks the older HTTP with server-sent
events, sends a bare */* instead of those two types, or can only put the credential
in the address.
Approve it
On the screen Lediv opens, follow these steps.
- Tick what the agent may do.
- Choose All projects or a single one.
- Click Connect.
The screen offers only what the agent asked for, and a client that asks for nothing is offered read and edit. Read projects cannot be unticked, because an agent that cannot read the project cannot do anything else with it. If the permission you need is missing, the agent 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 that does not push the date back, so about once a month it asks you again.
Approved agents live under Connected apps in your account, which holds up to ten. Approving the same agent again, from another device or to change its permissions, adds a second entry, so disconnect the one you no longer use.
Use a token instead
Use a token when a client 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 instead of 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, plus its saved versions, its published address, its deployments, its connected domains and, on a project you own, who it is shared with. A png, jpeg, gif or webp up to about 1.5 MB comes back as an image, and any other asset as its name, type and size. |
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 also needs Manage domains, because it 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 act on projects you own, because publishing and domains are the owner's to decide. On a project shared with you, either one still reads the site's status, its address, deployments and domains, and refuses everything else. Reading and editing a shared project work as usual while its owner has an active plan, except for the list of who else is on it. That list 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. With the project open in the editor, you see them appear the same way you see a teammate typing.
Rolling back, saving or restoring a version, and connecting a domain need a Pro plan. Re-checking a domain's DNS or choosing the primary one needs Pro once the domain is past its grace period. Disconnecting a domain and reading the saved versions work 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 the agent 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 on the screen where you created it. It stops working immediately, on every agent using it. Deleting your Lediv account stops every token and every connected agent.