Remote MCP is available at
https://migma.ai/mcp over Streamable HTTP. Add this URL. Your client opens Migma so you can sign in, approve access, and complete credential exchange through OAuth.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.
OAuth and CLI keys appear in Settings → Developers → API Keys, where you can revoke them.
Choose connection type
Remote MCP
Recommended: OAuth connector setup
Use this path for clients that support OAuth connection, such as claude.ai custom connectors.- Add Migma as a custom connector with
https://migma.ai/mcp. - Follow the client sign-in flow. It opens Migma so you can review and approve access.
- On
migma.ai/connect/authorize, check the app name, return host, and requested scopes.email:sendpermits test/direct sends.campaign:writepermits campaign creation, send, and schedule. Migma marks both as delivery access. - Approve the connection. Migma gives the client a scoped API key automatically, so there is no key to copy or paste.
Claim-code fallback
If a direct client cannot complete an OAuth redirect/callback, fetchhttps://api.migma.ai/auth.md. The agent shows a claim link, you review and approve scopes in Migma, and the agent polls for its credential.
Use claim-code only when the direct client can keep claim_token and the returned credential out of chat, logs, shell history, and shared files. It does not repair a hosted connector whose OAuth callback failed.
Do not send an interactive user to Settings to copy a key.
CI and server automation
Manual bearer configuration remains available for CI, cron, or server automation:Local MCP
Local MCP is available withnpx -y @migma/mcp. Use it only when the client requires a command-based server. Run migma login first (the package reads ~/.migma/config.json), or set MIGMA_API_KEY for CI.
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 discover brands with 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.ai, Claude Code, or Claude Desktop. Visual setup: Claude tutorial.
ChatGPT
Use the public Migma plugin. Visual setup: ChatGPT tutorial.
Grok
Ask Grok Bot to add Migma Remote MCP, or connect Grok web and Grok Build directly.
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.
Verify the connection
Ask your client to show your Migma context.migma_get_context returns your workspaces, brands, plan and credits, sending domains, and suggested next actions in one call — pass a workspace id as organizationId to migma_list_projects to work in another workspace.
Agents can still use migma_get_capabilities on their own when they need the tool catalog, write/read rules, or guided workflows.
Common workflows
Design emails (show drafts first)
- List brands and choose
projectId. - For researched work, build an exact source-backed fact checklist. Pass required facts in the prompt and up to five public HTTPS source-image URLs through structured
images; prompt-only URLs are not image inputs. - Create or design with one
migma_generate_emailcall (load that tool by exact name). For several emails passcount(max 12) and name each email’s job in the prompt. Do not call generate once per email. Then pollmigma_get_generation_status. Existing HTML or.emlusesmigma_import_htmlinstead of generate. - Show returned preview images and each canvas link immediately.
- After first show, verify every required fact and source image before claiming success. If a preview cannot be attached, show its canvas link and say visual verification is incomplete.
- Only then offer edits, inbox checks, or a campaign. Do not run validate or edit tools before that first show. Text-only edit cannot add structured source images; that requires replacement generation.
- Run
migma_validate_*when the user asks for checks, or as a last step before send.
Convert existing HTML
- List brands and choose
projectId. - Call
migma_import_htmlonce with the HTML or.emlsource (orhtmlsfor several files). Optional instruction: keep it as-is, or apply the brand. - Poll
migma_get_generation_status, then show preview images and each canvas link. - Each result is one canvas slot with its own
emailId. Edit, send, and export use that id.
Save brand facts
- Call
migma_add_knowledge_basewhen the user shares lasting facts (tone, products, offers, policies). Do not list first.
Import a CSV audience
- Call
migma_create_contact_importonce with the full CSV text and an optional list tag. - Leave column mapping empty when headers look like email, first name, or last name.
- Prefer this over converting CSV rows into a JSON bulk import.
- The import can wait and return final counts in the same turn.
Out of credits
- On an out-of-credits error, call
migma_get_creditsto show the plan and remaining credits. - Call
migma_get_upgrade_linkand show the returned URL. The user opens it and pays in the browser. The tool call itself charges nothing.
Buy a domain
- Search availability and yearly prices with
migma_search_buyable_domains. - Call
migma_buy_domainand show the returned checkout URL. The user pays in the browser. Buying needs a paid Migma plan, so offer an upgrade link if the account does not have one. - Poll
migma_get_domain_purchasesuntil the domain is active. - Set it up for sending with
migma_setup_domain.
Other
- Open the email in Migma from the returned canvas link
- Fetch exact
emailIdvalues - Send a test email (ask before any live send)
- Create a campaign draft
- Export approved email to HTML, PNG, PDF, Klaviyo, Mailchimp, or HubSpot
- Read campaign metrics and logs
- Manage contacts, lists, segments, and sending domains
- Check the plan and remaining credits, and get an upgrade link (
migma_get_credits,migma_get_upgrade_link) - Search, buy, and track domains (
migma_search_buyable_domains,migma_buy_domain,migma_get_domain_purchases); payment happens in the user’s browser - Manage DNS records on domains bought in Migma (
migma_list_dns_records,migma_add_dns_record,migma_remove_dns_record): add A, AAAA, CNAME, MX, TXT, or NS records like Google Workspace MX or a site-verification TXT, and remove user-added records. Migma’s email sending records are protected, and the root and www names are reserved for domain forwarding
Security
IT and security reviewers: Review Migma MCP covers what the hosted server can do, how OAuth works, permissions includingemail:send, and how to revoke access.
- Prefer OAuth connection for clients that support it.
- Use scoped API keys.
- Review scopes before approval.
email:sendallows test/direct sends.campaign:writeallows campaign creation, send, and schedule. Only allow either when you trust the connector to deliver mail. - Revoke OAuth-created and manually created keys from Settings → Developers → API Keys.
- Keep human approval enabled before sends, exports, audience changes, and campaign changes.
- Send API keys through the documented authorization header.
- Treat MCP like direct API access. Tool calls use the same Migma permissions as SDK, CLI, and REST API requests.
Troubleshooting
Resources
MCP for IT admins
What the hosted server can do, permissions, and how to revoke access.
npm Package
Local MCP package.
Agent Registration
Let agents request scoped access.








