> ## Documentation Index
> Fetch the complete documentation index at: https://docs.embededitor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect an AI Agent over MCP

> Let your users' AI agent edit the photo open in the editor over MCP: they copy a link from the editor, paste it into Claude or ChatGPT with a request, and watch the edits happen.

Your user's own AI agent, like Claude or ChatGPT, edits the photo open in your editor. The user copies a link from the editor, pastes it into their agent with a request ("blur the faces"), and watches each change land in the editor. The agent uses the editor's own commands, and the user's Undo takes any of them back.

MCP is in the Lite, the Full and the Trial. The Free doesn't have it.

## Add It to Your Editor

> [tab] Lite
>
> **1. Get Your Key**
>
> Buy a plan on [Pricing](https://embededitor.com/pricing). The e-mail after the purchase has your license key, and your account at `account.embededitor.com` always shows it: sign in with your e-mail (it sends a 6-digit code), and each license has a card with its key, hidden until you tap **Show**.
>
> **2. Point Your Project at the Registry**
>
> Point the `@embededitor` scope at the registry, and keep the key in an environment variable named `EMBED_EDITOR_KEY`, out of git.
>
> For npm, pnpm, bun and Yarn 1, add this to the `.npmrc` of your project:
>
> ```ini .npmrc theme={"dark"}
> @embededitor:registry=https://get.embededitor.com/
> //get.embededitor.com/:_authToken=${EMBED_EDITOR_KEY}
> ```
>
> Yarn 2 and newer ignore `.npmrc`. Add this to `.yarnrc.yml` instead:
>
> ```yaml .yarnrc.yml theme={"dark"}
> npmScopes:
>   embededitor:
>     npmRegistryServer: "https://get.embededitor.com"
>     npmAuthToken: "${EMBED_EDITOR_KEY}"
> ```
>
> Set the key where your install runs, your shell or your CI's secrets, never in git:
>
> ```bash Terminal theme={"dark"}
> export EMBED_EDITOR_KEY=<your-key>
> ```
>
> The key stays out of `package.json` and your lockfile, so `npm ci` keeps working when you replace it.
>
> **3. Install**
>
> ```bash npm theme={"dark"}
> npm install @embededitor/lite
> ```
>
> ```bash yarn theme={"dark"}
> yarn add @embededitor/lite
> ```
>
> ```bash pnpm theme={"dark"}
> pnpm add @embededitor/lite
> ```
>
> ```bash bun theme={"dark"}
> bun add @embededitor/lite
> ```
>
> **4. Copy Your Public Key**
>
> MCP runs on our cloud, so the editor needs your license's **public key**, `ee_pk_…`. It's one key for every Embed Editor cloud service: today MCP, and whatever we add later, with no new key for each.
>
> 1. Open your account at `account.embededitor.com`. On your license's card, **Cloud Services** shows the public key, with **Copy**. The e-mail with your license key has it too.
> 2. In **Domains**, add the sites that may use it: each origin, like `https://shop.example.com`, or every subdomain of one, like `https://*.shop.example.com`. Until you add one, it works on any site.
>
> ![Cloud Services on a license's card in your account: what the public key is for, the Public Key row with the key and Copy, Rotate and Remove, and Domains listing https://shop.example.com with its Remove, above the field to add another and Add](https://mintcdn.com/feliperohde/AfjjkfPM_42cL5VY/images/agent-link-public-key.webp?fit=max\&auto=format\&n=AfjjkfPM_42cL5VY\&q=85\&s=920e18514d06d7d23ce65a9dc38bb78d)
>
> Your license has two keys. Each goes in one place only:
>
> | | License key | Public key |
> | - | - | - |
> | Looks like | `ee_…` | `ee_pk_…` |
> | For | Installing the package | Our cloud services, today MCP |
> | Goes in | `.npmrc`, through `EMBED_EDITOR_KEY`, out of git | Your page, in the editor's `publicKey` |
> | Who sees it | You and your CI | Anyone who opens your page: restrict it to your domains |
> | Needed | Always, to install | Only with a cloud service |
>
> > [!WARNING]
> >
> > Never put the license key in your page: anyone who opens it could install the package with it. The public key is the one made for the page.
>
> On the card, **Rotate** gives the public key a new code and keeps its domains, and **Remove** takes it away, its domains with it (**Create Key** then makes a new one). Either way, the old code cannot make new links: put the new one in your page. Links already made last until they end.
>
> ![Cloud Services on a license's card with no public key: a cloud, No Public Key, Create one, then put it in your page, and Create Key](https://mintcdn.com/feliperohde/AfjjkfPM_42cL5VY/images/agent-link-public-key-empty.webp?fit=max\&auto=format\&n=AfjjkfPM_42cL5VY\&q=85\&s=a776297537373646266d6cb9bbeecb42)
>
> **5. Turn On the Agent**
>
> Give the editor `enableAgent` and, in `publicKey`, the key you copied. The editor links through our relay, at `https://agent.embededitor.com`, with nothing for you to run.
>
> ```tsx React theme={"dark"}
> import { EmbedEditor } from '@embededitor/lite/react';
>
> const PhotoEditor = ({ src }: { src: string }) => (
>   <div style={{ height: 600 }}>
>     <EmbedEditor enableAgent publicKey='ee_pk_…' src={src} />
>   </div>
> );
>
> export default PhotoEditor;
> ```
>
> ```js JavaScript theme={"dark"}
> import { mountEditor } from '@embededitor/lite/standalone';
>
> mountEditor(document.getElementById('editor'), {
>   enableAgent: true,
>   publicKey: 'ee_pk_…',
>   src: '/photos/sunset.jpg'
> });
> ```
>
> The toolbar now has **Agent**. With Copy or Share on too, the three share one menu, **Copy, Share, or Agent**. Without `publicKey`, the toolbar shows no Agent, and the browser's console says why. If our relay refuses the key (rotated or removed, of a license that no longer stands, or on a site its domains don't list), the Agent card says the agent isn't set up for this site, and the console says which.
>
> **6. Try It**
>
> 1. Open your page and tap **Agent**. A card under the toolbar shows a link.
>
> 2. Connect your AI agent to `https://agent.embededitor.com/mcp`, once: the card's first step shows this address, and its **How to Connect** the steps for each agent. In Claude Code, for example:
>
>    ```bash theme={"dark"}
>    claude mcp add --transport http photo-editor https://agent.embededitor.com/mcp
>    ```
>
> 3. Copy the link and paste it into your agent with a request: "Blur the faces in this photo: `https://agent.embededitor.com/link#…`".
>
> 4. Watch the edits land in the editor. Tap **Disconnect** when you're done.

> [tab] Full
>
> **1. Get Your Key**
>
> Buy a plan on [Pricing](https://embededitor.com/pricing). The e-mail after the purchase has your license key, and your account at `account.embededitor.com` always shows it: sign in with your e-mail (it sends a 6-digit code), and each license has a card with its key, hidden until you tap **Show**.
>
> **2. Point Your Project at the Registry**
>
> Point the `@embededitor` scope at the registry, and keep the key in an environment variable named `EMBED_EDITOR_KEY`, out of git.
>
> For npm, pnpm, bun and Yarn 1, add this to the `.npmrc` of your project:
>
> ```ini .npmrc theme={"dark"}
> @embededitor:registry=https://get.embededitor.com/
> //get.embededitor.com/:_authToken=${EMBED_EDITOR_KEY}
> ```
>
> Yarn 2 and newer ignore `.npmrc`. Add this to `.yarnrc.yml` instead:
>
> ```yaml .yarnrc.yml theme={"dark"}
> npmScopes:
>   embededitor:
>     npmRegistryServer: "https://get.embededitor.com"
>     npmAuthToken: "${EMBED_EDITOR_KEY}"
> ```
>
> Set the key where your install runs, your shell or your CI's secrets, never in git:
>
> ```bash Terminal theme={"dark"}
> export EMBED_EDITOR_KEY=<your-key>
> ```
>
> The key stays out of `package.json` and your lockfile, so `npm ci` keeps working when you replace it.
>
> **3. Install**
>
> ```bash npm theme={"dark"}
> npm install @embededitor/full
> ```
>
> ```bash yarn theme={"dark"}
> yarn add @embededitor/full
> ```
>
> ```bash pnpm theme={"dark"}
> pnpm add @embededitor/full
> ```
>
> ```bash bun theme={"dark"}
> bun add @embededitor/full
> ```
>
> **4. Copy Your Public Key**
>
> MCP runs on our cloud, so the editor needs your license's **public key**, `ee_pk_…`. It's one key for every Embed Editor cloud service: today MCP, and whatever we add later, with no new key for each.
>
> 1. Open your account at `account.embededitor.com`. On your license's card, **Cloud Services** shows the public key, with **Copy**. The e-mail with your license key has it too.
> 2. In **Domains**, add the sites that may use it: each origin, like `https://shop.example.com`, or every subdomain of one, like `https://*.shop.example.com`. Until you add one, it works on any site.
>
> ![Cloud Services on a license's card in your account: what the public key is for, the Public Key row with the key and Copy, Rotate and Remove, and Domains listing https://shop.example.com with its Remove, above the field to add another and Add](https://mintcdn.com/feliperohde/AfjjkfPM_42cL5VY/images/agent-link-public-key.webp?fit=max\&auto=format\&n=AfjjkfPM_42cL5VY\&q=85\&s=920e18514d06d7d23ce65a9dc38bb78d)
>
> Your license has two keys. Each goes in one place only:
>
> | | License key | Public key |
> | - | - | - |
> | Looks like | `ee_…` | `ee_pk_…` |
> | For | Installing the package | Our cloud services, today MCP |
> | Goes in | `.npmrc`, through `EMBED_EDITOR_KEY`, out of git | Your page, in the editor's `publicKey` |
> | Who sees it | You and your CI | Anyone who opens your page: restrict it to your domains |
> | Needed | Always, to install | Only with a cloud service |
>
> > [!WARNING]
> >
> > Never put the license key in your page: anyone who opens it could install the package with it. The public key is the one made for the page.
>
> On the card, **Rotate** gives the public key a new code and keeps its domains, and **Remove** takes it away, its domains with it (**Create Key** then makes a new one). Either way, the old code cannot make new links: put the new one in your page. Links already made last until they end.
>
> ![Cloud Services on a license's card with no public key: a cloud, No Public Key, Create one, then put it in your page, and Create Key](https://mintcdn.com/feliperohde/AfjjkfPM_42cL5VY/images/agent-link-public-key-empty.webp?fit=max\&auto=format\&n=AfjjkfPM_42cL5VY\&q=85\&s=a776297537373646266d6cb9bbeecb42)
>
> **5. Turn On the Agent**
>
> Give the editor `enableAgent` and, in `publicKey`, the key you copied. The editor links through our relay, at `https://agent.embededitor.com`, with nothing for you to run.
>
> ```tsx React theme={"dark"}
> import { EmbedEditor } from '@embededitor/full/react';
>
> const PhotoEditor = ({ src }: { src: string }) => (
>   <div style={{ height: 600 }}>
>     <EmbedEditor enableAgent publicKey='ee_pk_…' src={src} />
>   </div>
> );
>
> export default PhotoEditor;
> ```
>
> ```js JavaScript theme={"dark"}
> import { mountEditor } from '@embededitor/full/standalone';
>
> mountEditor(document.getElementById('editor'), {
>   enableAgent: true,
>   publicKey: 'ee_pk_…',
>   src: '/photos/sunset.jpg'
> });
> ```
>
> The toolbar now has **Agent**. With Copy or Share on too, the three share one menu, **Copy, Share, or Agent**. Without `publicKey`, the toolbar shows no Agent, and the browser's console says why. If our relay refuses the key (rotated or removed, of a license that no longer stands, or on a site its domains don't list), the Agent card says the agent isn't set up for this site, and the console says which.
>
> **6. Try It**
>
> 1. Open your page and tap **Agent**. A card under the toolbar shows a link.
>
> 2. Connect your AI agent to `https://agent.embededitor.com/mcp`, once: the card's first step shows this address, and its **How to Connect** the steps for each agent. In Claude Code, for example:
>
>    ```bash theme={"dark"}
>    claude mcp add --transport http photo-editor https://agent.embededitor.com/mcp
>    ```
>
> 3. Copy the link and paste it into your agent with a request: "Blur the faces in this photo: `https://agent.embededitor.com/link#…`".
>
> 4. Watch the edits land in the editor. Tap **Disconnect** when you're done.

The editor links through our relay, the small server between the editor and the agent. Our hosted relay is currently free with a paid license while its paid period is current, with no usage charge. It stops making new links when the paid period ends or the license is revoked. We may introduce usage limits or charges in the future. You can also run your own relay at your own hosting cost; see [Your Own Relay](https://docs.embededitor.com/mcp/relay.md).

<video autoPlay muted loop playsInline src="https://mintcdn.com/feliperohde/B_gWuWtMdvjYu-Oc/images/agent-link.mp4?fit=max&auto=format&n=B_gWuWtMdvjYu-Oc&q=85&s=44a198cc84e9a191b81baff2bf98c710" />

Set up, the user taps **Agent** and copies the link, and their agent (here a script making the real MCP calls, through a relay at an integrator's own address) does one request in their editor while they watch: "Make this our tour page's hero: hide our guests' faces, take out the power poles, crop the empty gravel and give it more punch. Title it Desert Loop, a half-day buggy tour; mark the sunset stop, km 18, 20 min; the ridge road is 2 km up; show the next group coming down it; and number the rides, the quad for one rider, the buggy for two." It finds the faces with **Detect** and covers the ones it missed, removes the poles with **Remove Object**, crops, lifts the light, then titles the tour in caption letters, marks the stop on a card, measures the climb with a ruler, shows the next group in a magnifier and numbers the rides in a list, each edit landing as it is made, the photo's edge glowing while it works.

## What the User Sees

Tapping **Agent** opens a card with the link and connection instructions. The user copies the link into their agent, then can disconnect from the card. Closing the card hides it without ending the link.

The card reports when the agent connects, when the editor reconnects or when the link ends. If the relay cannot create a link, it offers **Try Again**; see [Troubleshooting](https://docs.embededitor.com/mcp/relay.md#troubleshooting).

The link ends when the user taps **Disconnect**, closes the tab, two hours after it was made, or two minutes after the tab went away. **Disconnect** and **Cancel** remain available while the editor's AI works. **Examples** offers requests the user can copy with the link.

> [!TIP]
>
> Anyone with the link drives the editor until the link ends. The user pastes it only into their own agent.

### Connecting Their Agent

Each user connects their agent to the relay once, at `https://agent.embededitor.com/mcp`. Until an agent has connected in their browser, the card shows this address as its first step. **How to Connect**, in the card, shows them how, with a copy button for each address and command.

![The editor's Agent card on How to Connect, beside a photo of Mount Fuji and a pagoda in cherry blossom: Add this MCP address to your agent once, the address https://agent.shop.example.com/mcp with its copy button, the tabs Claude, Claude Code, ChatGPT, Codex, Cursor and VS Code with Claude chosen, Claude's two steps, and Then copy the link and paste it into the agent with a request](https://mintcdn.com/feliperohde/AfjjkfPM_42cL5VY/images/agent-link-how-to-connect.webp?fit=max\&auto=format\&n=AfjjkfPM_42cL5VY\&q=85\&s=daf680e8f8172e0862a0d6400173da06)

How to Connect, here for an editor linking through a relay of the integrator's own, whose address shows in place of ours. The same steps:

> [tab] Claude
>
> In the Claude app or on claude.ai, on any plan (the Free holds one custom connector):
>
> 1. Open **Customize** → **Connectors**, then **Add** → **Add custom connector**. On Team and Enterprise, an owner adds it for everyone in **Organization settings** → **Connectors** (**Add** → **Custom** → **Web**), and each member then chooses **Connect** on it in **Customize** → **Connectors**.
> 2. Enter any name and the address `https://agent.embededitor.com/mcp`, then **Continue**. For **Authentication**, choose **No sign in**, then **Add**.
>
> Checked on 2026-11-28 against [Get started with custom connectors using remote MCP](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp).

> [tab] Claude Code
>
> ```bash theme={"dark"}
> claude mcp add --transport http photo-editor https://agent.embededitor.com/mcp
> ```
>
> Then start a new session.

> [tab] ChatGPT
>
> On chatgpt.com, with Plus or a paid plan: Plugins, then a custom plugin with no authentication. On Business, Enterprise and Edu, an admin may have to add it.
>
> 1. In **Settings**, open **Plugins**, choose **Browse directory**, then **Add custom MCP server**.
> 2. Enter any name and the address `https://agent.embededitor.com/mcp`. For **Authentication**, choose **No authentication**, check **I understand and want to continue**, then choose **Create as a plugin**.
> 3. Install the plugin. In a chat, type `@` and choose it, then paste the link with the request.
>
> ChatGPT asks to approve each command, and can remember the answer for the rest of the conversation.
>
> Checked on 2026-11-28 against [Connecting custom MCP servers in ChatGPT](https://help.openai.com/en/articles/12584461) and [Add custom MCP server](https://developers.openai.com/api/docs/guides/custom-mcp-server).

> [tab] Codex
>
> ```bash theme={"dark"}
> codex mcp add photo-editor --url https://agent.embededitor.com/mcp
> ```
>
> Then start a new session.

> [tab] Cursor
>
> Add this to `~/.cursor/mcp.json`, then use it from the chat in Agent mode:
>
> ```json ~/.cursor/mcp.json theme={"dark"}
> { "mcpServers": { "photo-editor": { "url": "https://agent.embededitor.com/mcp" } } }
> ```

> [tab] VS Code
>
> Add this to `.vscode/mcp.json` in the project, then use it from Copilot Chat in Agent mode:
>
> ```json .vscode/mcp.json theme={"dark"}
> { "servers": { "photo-editor": { "type": "http", "url": "https://agent.embededitor.com/mcp" } } }
> ```

> [tab] Grok
>
> On grok.com. On Grok Business and Enterprise, a team admin first adds it at console.x.ai, in **Connectors** (**+ Add Connector** → **Other**).
>
> 1. Open **Connectors**, at grok.com/connectors, and add a custom connector: **Add a custom connector**, at the bottom of the list, or **New Connector** → **Custom**.
> 2. Enter any name and the address `https://agent.embededitor.com/mcp`, then add it. Grok finds that it needs no sign-in.
>
> Checked on 2026-11-28 against [Connectors](https://docs.x.ai/grok/connectors) and [Connector management](https://docs.x.ai/grok/connector-management).

> [tab] Perplexity
>
> On perplexity.ai. In an organization, an admin first turns on **Allow members to add custom connectors**.
>
> 1. Open **Plugins**, then **Add custom** → **Add MCP connector** → **Remote**.
> 2. Enter any name and the address `https://agent.embededitor.com/mcp`. Under **Advanced**, set **Authentication** to **None**. Check the box, choose **Add**, then select the connector's card to turn it on.
>
> Perplexity asks to approve the edits before they run.
>
> Checked on 2026-11-28 against [Adding Custom Remote Connectors](https://www.perplexity.ai/help-center/en/articles/13915507-adding-custom-remote-connectors) and [Troubleshooting connectors](https://www.perplexity.ai/help-center/en/articles/2026091802-troubleshooting-connectors).

The address takes no password: the link is the key, the part after its `#`, so the user pastes it whole in the chat. It's 256 random bits, it expires, and it ends with the tab.

## What the Agent Can Do

The agent gets the [commands](https://docs.embededitor.com/api-reference/commands/overview.md) your editor can run, the list the editor's own AI is offered (its Annotate mode's, with Annotate's tools), with the rules it works by: use the editor's tools before its pixels, look at the photo before marking it, say plainly what the editor can't do, offering what it can do instead and asking first, undo, save or close only when asked, write texts on the photo in the request's language, else in the editor's, and a fill's words in English.

* **Annotate**: add, change, duplicate and remove arrows, texts, numbers, shapes and drawings. In the Full and the Trial the agent also gets the art director's text the editor's own AI composes with: the bar a composition must meet, how to tell the photo's story, a plan before the first piece and a review after. Each command that places or moves an annotation answers with where it landed, so the agent checks overlaps and margins without measuring by eye.
* **Obfuscate**: hide parts of the photo, and change or remove those areas. Each command that places or moves an area answers with where it landed, as the watermark's and the signature's do, so the agent checks what an area covers.
* **Adjust, Auto, Filter and Frame**, the crop (its window, ratio, straightening, turn and mirror), the size Save writes, and the watermark and signature.
* **Undo, Redo and Reset.**
* **Look**: the image's size, the edit's state, and screenshots, of the whole photo or a zoom on an area; and, in the Full and the Trial where the AI's brush is (your `onAiEditImage` or `onAiChooseCommands`), the boxes of the areas the user marked with it, so "remove this" or "point here" lands where they mean.
* **Save**, which calls your `onProcess` as the user's Save does. The agent saves only when the user asks.
* **Close**, where the editor has a close.
* **The AI's pixel work**, in the Full and the Trial, each only where you gave its function: fill an area and expand the photo with your [`onAiEditImage`](https://docs.embededitor.com/ai/on-ai-edit-image), Detect with your [`onAiDetectObjects`](https://docs.embededitor.com/ai/on-ai-detect-objects), and Remove Background with your [`onAiRemoveBackground`](https://docs.embededitor.com/ai/on-ai-remove-background). Each call runs your function, as the user's tap does.

It doesn't get the user's own controls (what's selected, the next piece's style, the zoom, making the AI's mark and asking a Generate or an Expand again), the editor's own AI (its modes, Annotate's among them: an agent from outside never starts the conversation of another model), the commands of a tool you turned off with an `enable*` prop, or anything outside the editor: no part of your page, no other tab, none of the user's files.

The user sees its work as they see the editor's own AI's: nothing it makes is selected, their own selection stays, and an Undo or a Redo of its step selects nothing it made. The photo's edge glows in the AI's colors while the agent works, in the Lite too, as it does while the editor's own AI works: from the start of its first call, through the calls after it with no blink between them, until 7 seconds after its last one, and it goes at once when the link ends. The user keeps the editor meanwhile, all but Undo, Redo, Reset, Save, Copy and Share, which are off while the edge glows, as while the editor's own AI works: the photo is only half done. **Agent** stays live, so the user can always disconnect. Each call is one undo step, as MCP gives no edge to the agent's request; the editor's own AI makes a request of its own one step.

It sees the photo as screenshots of at most 1024 px, each with a note that maps its pixels to the photo's, so it places boxes, arrows and hidden areas where it means to. In our trials, Claude placed them on target in 3000 px photos, zooming in to check and correcting itself, in about 20 s to a minute a request.

## The Props

| Prop | What it does |
| - | - |
| [`publicKey`](https://docs.embededitor.com/api-reference/props#mcp) | Your license's public key, for our cloud services: our relay asks for it before it makes a link: `ee_pk_` plus 32 letters and digits, and a text of another form is refused. Your account shows it under **Cloud Services**. If our relay can't check the key, the card says "Couldn’t Create the Link" until it can. A page whose address (an IPv6 one counted by its /64) makes too many connection requests or asks about too many new keys in a minute gets the same card until the minute is past. |
| [`enableAgent`](https://docs.embededitor.com/api-reference/props#mcp) | Shows **Agent** in the toolbar. Off by default. |
| [`agentRelay`](https://docs.embededitor.com/api-reference/props#mcp) | The relay the editor links through. Ours, `https://agent.embededitor.com`, unless you run your own. |
| [`onAgentLink`](https://docs.embededitor.com/api-reference/props#mcp) | On your own relay, lets your backend make the link, so only your signed-in users make one. |

Most editors need only `enableAgent` and `publicKey`. The other two are for [Your Own Relay](https://docs.embededitor.com/mcp/relay.md), which needs no public key.

## Privacy

* **In transit**: the agent's calls and their results, screenshots included, pass through the relay between the agent and the tab. On ours, the [Data Processing Agreement](https://embededitor.com/dpa) covers your users' data: you are its controller, Embed Editor the processor.
* **Stored on the relay**: for each link, its times, its status, and the editor's list of commands with the guide text it sends beside them, deleted an hour after the link ends. The screenshots and the calls are never stored. Ours keeps no logs.
* **The agent's model** runs on the user's own account with their agent's provider, never on yours.

> [card] [Your Own Relay](https://docs.embededitor.com/mcp/relay.md)
>
> Run the MCP relay at your own address, step by step.

> [card] [Protocol](https://docs.embededitor.com/mcp/protocol.md)
>
> How the editor, the relay and the agent talk, to build a relay in any stack.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.