> ## 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.

# Cursor

> Connect Migma MCP to Cursor.

Use Migma MCP in Cursor when you want an agent to prepare emails, review campaigns, manage contacts, or export approved work without leaving your editor.

## Option 1: Remote MCP

Use Remote MCP when Cursor supports Streamable HTTP servers with headers.

```json theme={null}
{
  "mcpServers": {
    "migma": {
      "url": "https://migma.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${env:MIGMA_API_KEY}"
      }
    }
  }
}
```

Add this to project-level `.cursor/mcp.json` or global Cursor MCP settings.

## Option 2: Local MCP

Use Local MCP when your Cursor setup cannot send remote headers.

```json theme={null}
{
  "mcpServers": {
    "migma": {
      "command": "npx",
      "args": ["-y", "@migma/mcp"],
      "env": {
        "MIGMA_API_KEY": "your_migma_api_key"
      }
    }
  }
}
```

## Verify

Restart Cursor, then ask:

```text theme={null}
Use Migma to list my brands, then tell me which brand IDs are available.
```

If Cursor returns `projectId is required`, ask it to call `migma_list_projects` first and pass `projectId` to the next tool call.

## Next

<CardGroup cols={2}>
  <Card title="MCP Server" icon="server" href="/mcp-server">
    Remote and local MCP details.
  </Card>

  <Card title="Agent Registration" icon="key" href="/agent-registration">
    Let Cursor request a scoped key without copy-paste.
  </Card>
</CardGroup>
