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

# Connect your AI

> Add your copy of OpenEmails to Claude, ChatGPT, Codex, Cursor or another MCP client, and allow it in the Shopify admin.

> [!NOTE]
>
> OpenEmails is in early access, so talk to us to install it.

Your AI connects to your copy of OpenEmails over MCP and signs in with OAuth. You don't create or paste an API key. A staff member allows each connection in the Shopify admin, and any staff member can revoke it later.

**1. Copy your MCP address**

* In the app in your Shopify admin, open **Settings > Agents**.
* Under **Add an agent**, **Address to give your agent** is your hostname followed by `/mcp`, for example `https://email.yourstore.com/mcp`. Click **Copy**.
* Pick your client in **Which agent do you use?**. The page shows that client's button or command, with your address filled in.

> [!TIP]
>
> **Checkpoint:** you have your MCP address, and the page shows the steps for your client.

**2. Add it to your AI**

If your client already has a server or connector for this address, use it. Don't add a second one.

> [tab] Claude
>
> For claude.ai and the Claude desktop app, which share the same connectors.
>
> * On **Settings > Agents**, choose **Claude (web and desktop)** and click **Open Claude**. Claude's custom connector form opens with the name **OpenEmails** and your address filled in.
> * Click **Continue**, **Add**, then **Connect**.
> * Or add a custom connector yourself in Claude's connector settings and paste your MCP address as its URL.

> [tab] Claude Code
>
> Run this in your terminal. It adds the server for every project and opens the sign-in.
>
> ```bash theme={"dark"}
> claude mcp add --transport http openemail https://email.yourstore.com/mcp --scope user
> claude mcp login openemail
> ```
>
> * Keep the name `openemail`. The app folder's permission list uses that name.
> * If the browser doesn't open, open the sign-in link Claude Code prints.

> [tab] ChatGPT
>
> > [!WARNING]
> >
> > **ChatGPT's connector settings change often.** Not every plan can add a custom connector. On a Business or Enterprise plan, an owner or admin may need to add it. Check your workspace's settings before you start.
>
> * On **Settings > Agents**, choose **ChatGPT on the web** and click **Copy address and open ChatGPT**.
> * In ChatGPT's **Plugins**, choose **Add**, then **Add custom MCP server**.
> * Name it **OpenEmails** and paste the copied address into the URL field.
> * Select **I understand and want to continue**, then **Create as a plugin** and **Connect**.

> [tab] Codex
>
> Run this in your terminal. In the app, this choice is **Codex or the ChatGPT desktop app**.
>
> ```bash theme={"dark"}
> codex mcp add openemail --url https://email.yourstore.com/mcp
> ```
>
> * Codex starts the sign-in. Open its sign-in link if the browser doesn't open.

> [tab] Cursor
>
> * On **Settings > Agents**, choose **Cursor** and click **Open in Cursor**. Cursor opens with the server filled in.
> * Open **Cursor Settings > Tools & MCP**, enable `openemail` and choose **Connect**.

> [tab] Other MCP clients
>
> Any client that supports remote MCP servers with OAuth sign-in can connect. In the app, this choice is **Another agent**.
>
> * In your client's MCP settings, add a remote server of type **HTTP**.
> * Use your MCP address as the server URL and `openemail` as its name.
> * Leave any API key or token field empty. The client signs in when it connects.
> * **VS Code:** on **Settings > Agents**, choose **VS Code** and click **Open in VS Code**, then choose **Install**, then **Start**, and sign in when asked.

> [!TIP]
>
> **Checkpoint:** your client opens a browser window to sign in.

**3. Allow it in the Shopify admin**

Every client ends on the **Connect an agent** screen in your Shopify admin. Sign in to Shopify if it asks. Check each part before you decide:

* **The agent:** the first line says where the access goes. Claude and ChatGPT show a **Recognized** badge. The domain shows **Domain confirmed** or **Not confirmed**. A name or a domain is easy to copy, so it does not prove who runs the agent.
* **An agent on your computer:** for Claude Code, Codex and similar agents, the screen says that it can't verify which program gets access. Allow it only if you started that sign-in yourself.
* **Return address:** your browser goes to this address after you decide. Continue only if you expect it.
* **Agent access:** read access is always included, and read access alone lets an agent export every contact. **Let this agent make changes** starts unticked. Tick it only to give write access.
* **Who is deciding:** the staff member who is signed in. Activity records your name with your decision. You can add a **Label** to tell connections apart.

If the screen warns that the agent claims to be a known agent, or that it couldn't confirm the agent, click **Deny** unless you set up that agent yourself.

Click **Allow**. Your browser goes back to the client by itself. If it doesn't, click **Return to your agent**.

> [!TIP]
>
> **Checkpoint:** the screen says **Access allowed**, and your client shows the server as connected.

**4. Check it works**

* In a new chat, ask your agent: "Call get\_status and tell me what you see."
* It should answer with your install state, any holds on sending, and any warnings.

> [!TIP]
>
> **Checkpoint:** your agent lists the OpenEmails tools, and `get_status` answers. The address alone is not a connection. This answer proves the connection.

> [!NOTE]
>
> A connection request stays open for 10 minutes. If it expires, or the screen says that it was already answered, ask your agent to connect again.

## Read or read and write

Each connection has one of two access levels. You choose the level on the **Connect an agent** screen.

| Access | What the agent can do |
| - | - |
| **Read only** | Read contacts, lists, emails, campaigns, flows, reports, status and Activity, and export contacts. It can't change anything. |
| **Read and write** | Everything above. It can also write emails, build campaigns and flows, edit lists and segments, and ask for approvals. |

Write access never includes approval. Anything that needs a staff member's yes still needs it, in the Shopify admin. See [What stays with you](https://docs.openemails.com/ai/what-stays-with-you.md).

To change a connection's access, connect it again and decide again on the **Connect an agent** screen. OpenEmails refuses a write tool call from a read-only agent.

## Revoke access

* Open **Settings > Agents**. The **Connected agents** list shows each connection, who allowed it and when, its access, and when it was last used. **Ended connections** lists the connections that ended or expired.
* Click **Revoke** beside a connection and confirm with **Revoke connection**.
* To end every connection at once, click **Revoke all connections** and confirm.
* Click **Edit label** to name a connection, such as "Alex, work laptop".

OpenEmails refuses the next call from a revoked agent. To use the agent again, connect it and allow it again.

![Settings > Agents: the MCP address with Copy address, the agent picker, and the Connected agents table with Revoke buttons.](https://mintcdn.com/openemails/_EEXRkFEoy5ouZ3V/images/setup/settings-agents.png?fit=max\&auto=format\&n=_EEXRkFEoy5ouZ3V\&q=85\&s=5479800543ea384ab266a4d1b84e9237)

> [!WARNING]
>
> **Removing a staff member from Shopify doesn't end the connections they allowed.** Those connections keep working until someone revokes them on **Settings > Agents** or they expire. A connection expires after 90 days without use, and 180 days after it was allowed even while it is in use.

> [card] [What your agent can do](https://docs.openemails.com/ai/what-your-agent-can-do.md)
>
> Every tool, grouped by job, and which need write access.

> [card] [Prompts that work](https://docs.openemails.com/ai/prompts-that-work.md)
>
> Copy-paste prompts for the daily check, campaigns, flows and more.


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