The Migma MCP server (@migma/mcp) exposes the full Migma API as MCP tools. Any MCP-compatible client — Claude Desktop, Claude Code, Cursor, and more — can generate, send, validate, and export emails through natural language.
Hosted MCP is available at https://migma.ai/mcp over Streamable HTTP. Use Authorization: Bearer <MIGMA_API_KEY>. Local stdio remains available with npx -y @migma/mcp.
30+ tools Generate, send, validate, export, and manage your audience
Any MCP client Works with Claude Desktop, Claude Code, Cursor, and more
SDK-powered Built on the official Migma Node.js SDK with retries and error handling
Installation
Hosted remote MCP
Use this when your MCP client supports remote Streamable HTTP servers:
{
"mcpServers" : {
"migma" : {
"url" : "https://migma.ai/mcp" ,
"headers" : {
"Authorization" : "Bearer your_migma_api_key"
}
}
}
}
Some clients ask for the bearer token separately instead of a headers object. Use the same Migma API key without putting it in the URL.
Hosted remote clients do not use MIGMA_PROJECT_ID. Call migma_list_projects, then pass projectId to project-scoped tools.
Local stdio MCP
Use local stdio when your MCP client only supports command-based servers.
Claude Desktop
Add to your Claude Desktop config file:
Edit ~/Library/Application Support/Claude/claude_desktop_config.json: {
"mcpServers" : {
"migma" : {
"command" : "npx" ,
"args" : [ "-y" , "@migma/mcp" ],
"env" : {
"MIGMA_API_KEY" : "your_migma_api_key"
}
}
}
}
Edit %APPDATA%\Claude\claude_desktop_config.json: {
"mcpServers" : {
"migma" : {
"command" : "npx" ,
"args" : [ "-y" , "@migma/mcp" ],
"env" : {
"MIGMA_API_KEY" : "your_migma_api_key"
}
}
}
}
Claude Code
claude mcp add migma -- npx -y @migma/mcp
To make it available across all Claude Code projects, add it with user scope:
claude mcp add --scope user migma -- npx -y @migma/mcp
Use these commands to inspect or remove the server:
claude mcp list
claude mcp get migma
claude mcp remove migma
Then set the API key:
export MIGMA_API_KEY = your_migma_api_key
Cursor
Add to your Cursor MCP settings (.cursor/mcp.json in your project or global config):
{
"mcpServers" : {
"migma" : {
"command" : "npx" ,
"args" : [ "-y" , "@migma/mcp" ],
"env" : {
"MIGMA_API_KEY" : "your_migma_api_key"
}
}
}
}
Other MCP clients
Use a local command-based MCP server configuration. The exact settings file depends on your client.
{
"mcpServers" : {
"migma" : {
"command" : "npx" ,
"args" : [ "-y" , "@migma/mcp" ],
"env" : {
"MIGMA_API_KEY" : "your_migma_api_key"
}
}
}
}
Global npm install
If you prefer installing globally instead of using npx:
npm install -g @migma/mcp
Then use migma-mcp as the command instead of npx -y @migma/mcp.
Configuration
Hosted remote MCP is configured in your MCP client:
Setting Required Description URL Yes https://migma.ai/mcpAuthorization header Yes Bearer <MIGMA_API_KEY>Project ID Per tool Call migma_list_projects, then pass projectId
Local stdio MCP is configured through environment variables:
Variable Required Description MIGMA_API_KEYYes Your Migma API key (sk_live_...) MIGMA_PROJECT_IDNo Default project ID (avoids specifying it per tool call) MIGMA_BASE_URLNo Custom API base URL
Get your API key from Settings → API Integration → API Keys .
Set MIGMA_PROJECT_ID if you primarily work with a single brand — most tools will use it automatically so you don’t need to provide it every time.
Email generation
Tool Description migma_generate_emailGenerate one email or a series from a text prompt. Polls until complete and returns result.emails[] with HTML, screenshots, and email IDs. migma_get_generation_statusCheck the status of an email generation and retrieve generated emails. migma_get_emailFetch one generated email by emailId, including production HTML and screenshot URLs. migma_edit_emailPrompt Migma to edit one generated email by emailId. migma_send_test_emailSend a test email for a generated conversation.
Campaigns
Tool Description migma_list_campaignsList campaigns for a project. migma_create_campaignCreate a campaign from a generated email. Use emailId for the exact email, especially series slots. migma_send_campaignSend a draft or scheduled campaign immediately. migma_schedule_campaignSchedule a campaign for future delivery. migma_cancel_campaignCancel a scheduled campaign. migma_archive_campaignArchive a campaign while keeping stats and history. migma_unarchive_campaignRestore an archived campaign.
Sending
Tool Description migma_send_emailSend an email to an individual, tag, or segment. Use emailId for series emails; conversationId works for single-email conversations. See providers .
Validation
Tool Description migma_validate_emailRun all validations (compatibility, links, spelling, deliverability). migma_validate_compatibilityCompatibility check for major email clients. migma_validate_deliverabilityAnalyze spam score and inbox placement.
Export
Tool Description migma_export_htmlExport as production-ready HTML. See export options . migma_export_mjmlExport as MJML markup. migma_export_pdfExport as PDF. migma_export_klaviyoExport for Klaviyo (html, hybrid, or code). migma_export_mailchimpExport for Mailchimp . migma_export_hubspotExport for HubSpot.
Projects
Tool Description migma_list_projectsList all projects/brands. migma_get_projectGet project details (colors, fonts, logos, tone). migma_import_brandImport brand from website URLs. migma_get_field_catalogGet the field catalog for project-aware personalization and custom fields.
Domains
Tool Description migma_list_domainsList sending domains . migma_create_managed_domainCreate an instant sending domain (no DNS). migma_verify_domainVerify DNS records for a custom domain . migma_provision_streamProvision a transactional or marketing stream identity on a domain you own.
Tool Description migma_list_contactsList contacts with filters. migma_add_contactCreate a new contact. migma_get_contactGet contact details. migma_remove_contactDelete a contact.
Tool Description migma_list_tagsList all tags. migma_create_tagCreate a tag. migma_delete_tagDelete a tag. migma_list_segmentsList all segments. migma_create_segmentCreate a segment. migma_delete_segmentDelete a segment.
Webhooks
Tool Description migma_list_webhooksList all webhooks . migma_create_webhookCreate a webhook for event notifications . migma_test_webhookSend a test event. migma_delete_webhookDelete a webhook.
Example usage
Once connected, ask your AI assistant things like:
“Generate a password reset email”
“Generate a three-email onboarding series”
“Fetch the second generated email and make its CTA copy shorter”
“Send that email to sarah@example.com ”
“Generate a welcome email and send it to the Newsletter segment”
“Validate this email for compatibility and spam issues”
“Create a managed sending domain called mycompany”
“List all my contacts tagged VIP”
“Import my brand from https://yourbrand.com ”
“Export the email for Klaviyo in hybrid format”
“Set up a webhook for email.generation.completed events”
Resources
Node.js SDK SDK documentation
API Reference Full endpoint docs
Discord Get help from the community