Skip to main content
Migma MCP lets agents work with your Migma brands from an editor or agent client. Agents can prepare emails, fetch email IDs, validate output, create campaign drafts, send tests, export approved emails, manage contacts, and inspect results.
Remote MCP is available at https://migma.ai/mcp over Streamable HTTP. Use OAuth connection when your client supports it, or use a bearer API key manually.

Where this lives in Migma

Open My Brands, choose a brand, then open Tools. The app /mcp route redirects to the active brand’s Tools page. Create API keys from Settings → Developers → API Keys.

Choose connection type

Remote MCP

Use this path for clients that support OAuth connection, such as claude.ai custom connectors.
  1. Add Migma as a custom connector with https://migma.ai/mcp.
  2. Follow the client sign-in flow. It opens Migma so you can review and approve access.
  3. On migma.ai/connect/authorize, check the app name, return host, and requested scopes. email:send means the connector can send emails from your account.
  4. Approve the connection. Migma gives the client a scoped API key automatically, so there is no key to copy or paste.
OAuth-created keys appear in Settings → Developers → API Keys and can be revoked there.

Manual API key setup

Use this path when your client does not support OAuth connection or asks you to paste a bearer token.
Some clients ask for the bearer token separately. Use the same Migma API key. Do not put API keys in URLs.

Local MCP

Local MCP is available with npx -y @migma/mcp.
Optional environment variable:
Use MIGMA_PROJECT_ID only for Local MCP when one brand is the default. Remote MCP clients should call migma_list_projects and pass projectId. Remote MCP clients do not use MIGMA_PROJECT_ID. Call migma_list_projects, then pass projectId. For Claude CLI, add the local server with:

Client setup

Cursor

Add Migma MCP to Cursor.

Claude

Connect Claude Desktop or Claude Code.

ChatGPT

Add Migma as a custom ChatGPT MCP connector.

Copilot

Connect GitHub Copilot to Migma MCP.

Codex CLI

Add Migma MCP to Codex CLI.

Windsurf

Connect Migma MCP to Windsurf.

Antigravity

Add Migma MCP to Google Antigravity.

Raycast

Use Migma MCP from Raycast AI.

VS Code

Connect Migma MCP to VS Code.

First tool call

Ask your client to call:
It returns available tools, write/read behavior, idempotency rules, brand scoping, and guided workflows. Agents should call it before choosing tools.

Common workflows

  • List brands and choose projectId
  • Prepare one email or a multi-email series
  • Fetch exact emailId values
  • Validate compatibility, links, spelling, and deliverability
  • Send a test email
  • Create a campaign draft
  • Export approved email to HTML, MJML, Klaviyo, Mailchimp, HubSpot, or PDF
  • Read campaign metrics and logs
  • Manage contacts, lists, segments, and sending domains

Security

  • Prefer OAuth connection for clients that support it.
  • Use scoped API keys.
  • Review scopes before approval. email:send allows test and live sends.
  • Revoke OAuth-created and manually created keys from Settings → Developers → API Keys.
  • Keep human approval enabled before sends, exports, audience changes, and campaign changes.
  • Never place API keys in query parameters.
  • Treat MCP like direct API access. Tool calls use the same Migma permissions as SDK, CLI, and REST API requests.

Troubleshooting

Resources

npm Package

Local MCP package.

Agent Registration

Let agents request scoped access.