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

# Connect Migma to Claude Code and Desktop

> Connect Migma to Claude Code or Claude Desktop, approve browser access, verify the connection, and revoke it when needed.

<Frame caption="Migma connects to Claude Code and Claude Desktop through Remote MCP">
  <img src="https://mintcdn.com/migmaai/p4dbS7rCjfcn3aLf/images/tutorials/claude-code/hero.webp?fit=max&auto=format&n=p4dbS7rCjfcn3aLf&q=85&s=d35f6a23b92a514f3e3604553e70e2f9" alt="Illustration showing Migma connected to Claude Code and Claude Desktop" width="1672" height="941" data-path="images/tutorials/claude-code/hero.webp" />
</Frame>

Connect Migma once, then use it from Claude Code or Claude Desktop to prepare branded emails, inspect campaigns, manage opted-in contacts, and open work in Migma. Browser OAuth handles access, so you do not paste an API key into Claude.

<Info>
  Both setup paths use Migma Remote MCP at `https://migma.ai/mcp`. Choose the section for the Claude app you use.
</Info>

## Before you start

You need:

* A Migma account.
* Claude Code installed and signed in, or access to custom connectors in Claude Desktop.
* A browser on the same computer for Migma approval.

For Claude Code, check the installation:

```bash theme={null}
claude --version
```

## Connect with Claude Code

<Steps>
  <Step title="Add Migma">
    Run this command in your terminal:

    ```bash theme={null}
    claude mcp add --scope user --transport http migma https://migma.ai/mcp
    ```

    `--scope user` makes Migma available in every local Claude Code project for your user account. Use `--scope local` instead when you want it only in the current project.

    Confirm the saved configuration:

    ```bash theme={null}
    claude mcp get migma
    ```

    <Frame caption="Illustration of the Claude Code MCP setup command">
      <img src="https://mintcdn.com/migmaai/p4dbS7rCjfcn3aLf/images/tutorials/claude-code/add-migma.webp?fit=max&auto=format&n=p4dbS7rCjfcn3aLf&q=85&s=44bc346b8a0fea6c38f85c03b9da9715" alt="Illustration showing the Claude Code command that adds Migma as a user-scoped HTTP MCP server" width="1672" height="941" data-path="images/tutorials/claude-code/add-migma.webp" />
    </Frame>
  </Step>

  <Step title="Approve the connection">
    Start Claude Code, then enter:

    ```text theme={null}
    /mcp
    ```

    Choose **Migma**, select the authentication action, and follow the browser link. Sign in to Migma if needed.

    Review every requested permission before approving. `email:send` allows test and live sends. Keep Claude Code's confirmation controls enabled and approve only when you trust the session to act for you.

    <Frame caption="Illustration of the Migma connection review step">
      <img src="https://mintcdn.com/migmaai/p4dbS7rCjfcn3aLf/images/tutorials/claude-code/approve-connection.webp?fit=max&auto=format&n=p4dbS7rCjfcn3aLf&q=85&s=0f76c3ef233af5d200a300679c781724" alt="Illustration showing Migma permission groups and the Approve connection button for Claude Code" width="1672" height="941" data-path="images/tutorials/claude-code/approve-connection.webp" />
    </Frame>

    Migma creates the scoped connection key automatically. No key needs to be copied into a command or chat.
  </Step>

  <Step title="Verify with a read-only request">
    Run `/mcp` again and confirm **Migma** shows as connected. Then ask:

    ```text theme={null}
    Use Migma to list my brands. Do not send or export anything.
    ```

    Claude Code should use Migma and return the brands you can access.

    <Frame caption="Illustration of a connected Migma server and read-only verification request">
      <img src="https://mintcdn.com/migmaai/p4dbS7rCjfcn3aLf/images/tutorials/claude-code/verify-connection.webp?fit=max&auto=format&n=p4dbS7rCjfcn3aLf&q=85&s=e875d118ca7740f331313e20c6755a86" alt="Illustration showing Migma connected in Claude Code and a request to list brands without sending or exporting" width="1672" height="941" data-path="images/tutorials/claude-code/verify-connection.webp" />
    </Frame>
  </Step>
</Steps>

## Connect with Claude Desktop

<Steps>
  <Step title="Open the connector menu">
    In a Claude conversation, click **+**, then choose **Connectors → Add connector → Add custom connector**.

    You can also open **Customize → Connectors**, click **+**, then choose **Add custom connector**.

    <Frame caption="Open Add custom connector in Claude Desktop">
      <img src="https://mintcdn.com/migmaai/p4dbS7rCjfcn3aLf/images/tutorials/claude-code/desktop-open-connectors.webp?fit=max&auto=format&n=p4dbS7rCjfcn3aLf&q=85&s=e5f3167b69c661ab9496f89b92157b05" alt="Illustration showing the Claude Desktop menus for Connectors, Add connector, and Add custom connector" width="1672" height="941" data-path="images/tutorials/claude-code/desktop-open-connectors.webp" />
    </Frame>
  </Step>

  <Step title="Add Migma">
    Enter:

    * **Name:** `Migma`
    * **Remote MCP server URL:** `https://migma.ai/mcp`

    Leave OAuth Client ID and OAuth Client Secret empty. Keep individual sign-in enabled, then click **Add**.

    <Frame caption="Add Migma as a custom connector">
      <img src="https://mintcdn.com/migmaai/p4dbS7rCjfcn3aLf/images/tutorials/claude-code/desktop-add-connector.webp?fit=max&auto=format&n=p4dbS7rCjfcn3aLf&q=85&s=5e98cda7cf3500a3ab85ecd6b0a85ceb" alt="Illustration showing Migma and its Remote MCP URL in Claude Desktop's Add custom connector dialog" width="1672" height="941" data-path="images/tutorials/claude-code/desktop-add-connector.webp" />
    </Frame>
  </Step>

  <Step title="Approve Migma access">
    Select **Migma**, click **Connect**, and follow the browser window. Sign in to Migma if needed.

    Review every requested permission before approving. `email:send` allows test and live sends. Approve only when you trust the Claude session to act for you.

    <Frame caption="Review and approve the Migma connection">
      <img src="https://mintcdn.com/migmaai/p4dbS7rCjfcn3aLf/images/tutorials/claude-code/desktop-approve-connection.webp?fit=max&auto=format&n=p4dbS7rCjfcn3aLf&q=85&s=40555bdf7e774b7ba8f6891d3c0aff54" alt="Illustration showing Migma permissions and the Approve connection button for Claude Desktop" width="1672" height="941" data-path="images/tutorials/claude-code/desktop-approve-connection.webp" />
    </Frame>
  </Step>

  <Step title="Enable Migma in the conversation">
    Click **+ → Connectors**, then turn on **Migma**. The connector should show as enabled in the current conversation.

    <Frame caption="Migma enabled in Claude Desktop">
      <img src="https://mintcdn.com/migmaai/p4dbS7rCjfcn3aLf/images/tutorials/claude-code/desktop-verify-connection.webp?fit=max&auto=format&n=p4dbS7rCjfcn3aLf&q=85&s=8012335d36037797671f060ba801a9ae" alt="Illustration based on the Claude Desktop connector menu showing the Migma connector enabled" width="1672" height="941" data-path="images/tutorials/claude-code/desktop-verify-connection.webp" />
    </Frame>
  </Step>

  <Step title="Send a first request">
    Start with a request that creates drafts but does not send anything:

    ```text theme={null}
    Create 3 email designs for our Shopify store Allbirds using Migma.
    Do not send, schedule, or export anything.
    ```

    <Frame caption="Ask Claude to create email drafts with Migma">
      <img src="https://mintcdn.com/migmaai/p4dbS7rCjfcn3aLf/images/tutorials/claude-code/desktop-first-prompt.webp?fit=max&auto=format&n=p4dbS7rCjfcn3aLf&q=85&s=b6a229f984c6694143dfefb25247b75f" alt="Illustration showing a Claude Desktop prompt asking Migma to create three Allbirds email designs" width="1672" height="941" data-path="images/tutorials/claude-code/desktop-first-prompt.webp" />
    </Frame>
  </Step>
</Steps>

<Info>
  On Claude Team or Enterprise, an organization owner may need to add the custom connector first. Each member then connects their own Migma account.
</Info>

## Try a safe first workflow

Ask Claude Code or Claude Desktop to prepare work without sending it:

```text theme={null}
Use Migma for brand [name].
Prepare one editable launch email for [audience].
Show the preview image and canvas link when ready.
Do not send, schedule, or export anything.
```

Open the returned canvas link when you want visual control in Migma. Ask before any test send, live send, export, audience change, or campaign change.

## Optional: install Migma skills

Migma skills add guided workflows and setup instructions to Claude Code:

```bash theme={null}
claude plugin marketplace add MigmaAI/migma-skills
claude plugin install migma@migma-plugins
```

Run `/reload-plugins` inside Claude Code after installation. The plugin can also provide Migma MCP; Claude Code de-duplicates servers that point to the same endpoint.

## Disconnect or revoke access

For Claude Code, remove the saved server:

```bash theme={null}
claude mcp remove --scope user migma
```

For Claude Desktop, open **Customize → Connectors**, find **Migma**, and disconnect it.

Removing the connector does not replace revocation. In Migma, open **Settings → Developers → API Keys** and revoke the Claude connection key. You can also clear authentication from Claude Code's `/mcp` menu.

## Troubleshooting

| Problem                                              | Fix                                                                                                                    |
| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| Migma does not appear in `/mcp`                      | Run `claude mcp list`, then run the add command again from a normal terminal.                                          |
| Claude Desktop does not show Add custom connector    | Check whether your plan or organization allows custom connectors. Team and Enterprise owners may need to add it first. |
| Migma is connected but unavailable in a Desktop chat | Click **+ → Connectors** and turn on Migma for that conversation.                                                      |
| Migma says authentication is required                | Open `/mcp`, choose Migma, and complete browser approval.                                                              |
| Browser does not open                                | Copy the authorization URL shown by Claude Code and open it manually.                                                  |
| Browser callback shows a connection error            | Copy the full callback URL from the browser address bar and paste it into Claude Code when prompted.                   |
| Tools look stale after approval                      | Start a new Claude Code session, then check `/mcp` again.                                                              |
| Claude asks for `projectId`                          | Ask Migma to list your brands, then use the selected brand's project ID.                                               |

For product-specific behavior, see [Anthropic's Claude Code MCP guide](https://code.claude.com/docs/en/mcp) and [Claude custom connector guide](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp).

## Next

<CardGroup cols={2}>
  <Card title="Email marketing with Claude" icon="route" href="/tutorials/create-emails-with-claude">
    Continue from connection to design, audience, campaigns, and results.
  </Card>

  <Card title="Claude setup reference" icon="terminal" href="/agents/mcp-claude">
    Compare Claude Code, Claude.ai, and Claude Desktop setup.
  </Card>

  <Card title="MCP permissions" icon="shield-check" href="/security/mcp">
    Review access, approval, and revocation before connecting.
  </Card>

  <Card title="Migma MCP server" icon="server" href="/mcp-server">
    See available workflows, security guidance, and troubleshooting.
  </Card>
</CardGroup>
