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

# Windsurf

> Connect Migma MCP to Windsurf Cascade.

Use Migma MCP in Windsurf when Cascade should prepare, validate, export, or send Migma email work from your editor.

## Remote MCP

Add Migma from Windsurf settings or edit `~/.codeium/windsurf/mcp_config.json`:

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

Restart Windsurf so Cascade reloads tools.

## Local MCP fallback

Use Local MCP if remote headers are not available:

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

## Verify

Ask Cascade:

```text theme={null}
Use Migma to list my brands and show what tools are available.
```

## 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 agents request scoped access.
  </Card>
</CardGroup>
