> For the complete documentation index, see [llms.txt](https://docs.moleculedata.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.moleculedata.com/mcp/connect-your-ai-app.md).

# Connect your AI app

Steps for Claude Code, Claude.ai, ChatGPT, Cursor and VS Code, what Molecule asks when your app signs in, and when to choose Another machine.

Every app connects to the same address:

```
https://app.moleculedata.com/mcp
```

The **MCP** page in Molecule shows the exact step for each app, with a copy button. You never paste a key: your app opens Molecule in your browser and you approve it there.

## Claude Code

Add Molecule:

```bash
claude mcp add-json --scope user molecule '{"type":"http","url":"https://app.moleculedata.com/mcp","oauth":{"scopes":"mcp:read mcp:write mcp:spend"}}'
```

Then sign in:

```bash
claude mcp login molecule
```

Or type `/mcp` in Claude Code, pick **molecule** and choose **Authenticate**.

The first command asks for all three levels: read, make changes and change ad spend. Molecule gives your app only what your role and plan allow.

{% hint style="info" %}
Added Molecule earlier with `claude mcp add`? That connection can only read. Remove it with `claude mcp remove molecule --scope user`, disconnect it on the MCP page, then run the two steps above.
{% endhint %}

## Claude.ai

In Claude, open **Settings → Connectors → Add custom connector**. Paste `https://app.moleculedata.com/mcp`, then click **Connect**.

## ChatGPT

In ChatGPT, turn on developer mode and add an MCP server. Paste `https://app.moleculedata.com/mcp`.

ChatGPT can only read your data for now.

## Cursor

Add this to `~/.cursor/mcp.json`, then click **Needs login** next to molecule in Cursor's MCP settings:

```json
{"mcpServers":{"molecule":{"url":"https://app.moleculedata.com/mcp"}}}
```

## VS Code

Add this to your `mcp.json`. VS Code asks you to sign in when it starts the server:

```json
{"servers":{"molecule":{"type":"http","url":"https://app.moleculedata.com/mcp"}}}
```

## Other apps

Any AI app that connects to MCP servers over HTTP and supports sign-in (OAuth) can use the same address. Apps Molecule doesn't recognise are listed as **Unverified app** on the MCP page.

## What happens when your app signs in

Your app opens a Molecule page in your browser. If you are signed out, Molecule asks you to sign in first.

1. **Who is asking.** The page says *"{app} wants to use Molecule as you"* and where its access goes: this computer, another machine you're connected to over SSH, or a website.
2. **Company.** Pick the company this connection is for. It can only ever see that company.
3. **It will be able to / It won't be able to.** Each permission, and why your app can't have the others (your role or your plan).
4. **Where is this app running?** For apps on a computer, choose **This computer** or **Another machine I'm connected to (SSH)**. See below for which one.
5. **Approve** or **Deny**. Your browser then takes you back to your app.

The connection lasts until you disconnect it, or 90 days. Molecule emails you about every new connection, with a link to disconnect it.

### This computer or another machine

For an app that runs on a computer, such as Claude Code or VS Code, the page asks where it runs:

* **This computer**: the app runs on the computer you are approving from. Molecule checks that the app finishing the sign-in is on the same network as your browser.
* **Another machine I'm connected to (SSH)**: choose this when the app runs on a machine you are connected to over SSH, **or when your browser uses a VPN, a proxy or iCloud Private Relay**. These hide your browser's network, so the check for **This computer** can't pass and the sign-in fails.

If Molecule recognises iCloud Private Relay, the page asks you to choose **Another machine** before you can approve. The connection is then listed as approved through iCloud Private Relay.

### A recent sign-in for changes and ad spend

If your app asks to make changes or change ad spend, Molecule needs to know it's really you. You need either a sign-in to Molecule with your email and password in the last 8 hours, or a code Molecule emails you.

* Click **Sign in again** to sign in with your password, or **Email me a code**.
* If you sign in to Molecule with Google, Facebook or Shopify, use **Email me a code**.
* The code has 6 digits and works for 10 minutes. You have 5 tries.

{% hint style="warning" %}
Type the code yourself. **Never give it to an AI app** or anyone else. And never paste the address you land on after signing in into a website, chat or support form. Molecule will never ask you to.
{% endhint %}

## If something goes wrong

| You see                                                                                   | What to do                                                                                                                                                                                           |
| ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *"This sign-in link is broken. Start again from your app."*                               | Start the connection again from your app. Sign-in links last 10 minutes.                                                                                                                             |
| *"Open this sign-in in its own window"*                                                   | Molecule doesn't connect apps from inside another page. Open the link in its own browser window.                                                                                                     |
| *"You're using a VPN or iCloud Private Relay. Please choose "Another machine"."*          | Choose **Another machine I'm connected to (SSH)**, then click **Approve** again.                                                                                                                     |
| Your app says `invalid_grant`, or that the sign-in can't be finished from another network | You chose **This computer**, but the app finished the sign-in from another network than your browser's, for example behind a VPN or proxy. Start again from your app and choose **Another machine**. |
| No **MCP** in the menu                                                                    | Your plan doesn't include MCP (Starter and above), or an admin has turned AI connections off for the company.                                                                                        |
| The company you want isn't listed                                                         | You're not an active member of it, or your role doesn't allow what the app asks for.                                                                                                                 |
| *"Molecule MCP is part of the Starter plan and above."*                                   | An admin can upgrade the plan.                                                                                                                                                                       |
| *"AI connections are turned off for this company."*                                       | An admin can turn **Allow AI connections** back on. See [Managing connections](/mcp/managing-connections.md).                                                                                        |
