Migadu MCP Server
The Migadu MCP Server lets you fully manage your Migadu email hosting account through AI assistants, covering the complete Migadu API surface.
Domains — Create, update, activate, list, view DNS records, run diagnostics, and check usage statistics.
Mailboxes — List, get, create, update, and delete mailboxes; reset passwords; configure autoresponders (subject, body, expiry).
Aliases — Create, update, delete, and list email forwarding aliases.
Identities — Create, update, delete, and list send-as addresses on a mailbox.
Forwardings — Manage external delivery copies with a confirmation flow.
Rewrites — Create, update, delete, and list pattern-based routing rules.
Bulk Operations — All mutation tools (create_*, update_*, delete_*, activate_*, set_autoresponder, reset_mailbox_password) accept a list of items, enabling bulk operations with per-item success/failure reporting.
Read-only Resource Views — Access resources via URI (e.g., domains://, domain://{name}, mailboxes://{domain}) for quick read-only lookups.
Intelligent Summarization — list_* tools automatically summarize large result sets (exceeding ~2000 tokens) to avoid context flooding.
Enables management of Migadu email hosting services, including creating and deleting mailboxes, setting up email aliases and forwarding rules, configuring autoresponders, managing multiple email identities, and handling bulk operations efficiently.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Migadu MCP Server create a new mailbox for support@ourcompany.com with the name Customer Support"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Migadu MCP Server
Control your Migadu email hosting from AI assistants via the Model Context Protocol.
What is Migadu?
Migadu is a Swiss email host that prices on actual usage instead of mailbox count, with standard SMTP/IMAP/POP3 and no lock-in.
Related MCP server: IMAP MCP Server
What this does
Covers the full Migadu API surface as MCP tools:
Domains — create, update, activate, DNS records, diagnostics, usage
Mailboxes — CRUD, autoresponders, password resets
Aliases — forwarding rules without a mailbox behind them
Identities — send-as addresses on a mailbox
Forwardings — external delivery copies with confirmation flow
Rewrites — pattern-based routing rules
Setup
Get an API key at Migadu Admin → My Account → API Keys.
Add to your MCP client config (e.g. Claude Desktop, ~/.claude.json, etc.):
{
"mcpServers": {
"migadu": {
"command": "uvx",
"args": ["migadu-mcp"],
"env": {
"MIGADU_EMAIL": "you@example.com",
"MIGADU_API_KEY": "your-api-key",
"MIGADU_DOMAIN": "example.com"
}
}
}
}Or via the Claude Code CLI:
claude mcp add migadu \
--env MIGADU_EMAIL=you@example.com \
--env MIGADU_API_KEY=your-api-key \
--env MIGADU_DOMAIN=example.com \
-- uvx migadu-mcpMIGADU_DOMAIN is optional. It's the default domain used by tools like list_mailboxes when you don't pass one explicitly. Skip it if you manage multiple domains and prefer to pass domain on every call.
Example usage
Once configured, ask your AI assistant things like:
"Onboard a new domain
acme.example— walk me through DNS setup and activation""Create mailboxes for alice@acme.example and bob@acme.example"
"Set up
support@acme.exampleas an alias to both Alice and Bob""Configure an autoresponder on
vacation@acme.exampleuntil January 15th""Delete the mailboxes for everyone who left: list of addresses..."
Three built-in prompts are registered to scaffold common workflows: mailbox_creation_wizard, bulk_operation_planner, domain_onboarding.
Tools
Domain
list_domains, get_domain, create_domain, update_domain, get_domain_records, get_domain_diagnostics, activate_domain, get_domain_usage
Mailbox
list_mailboxes, get_mailbox, create_mailbox, update_mailbox, delete_mailbox, reset_mailbox_password, set_autoresponder
Alias
list_aliases, get_alias, create_alias, update_alias, delete_alias
Identity
list_identities, get_identity, create_identity, update_identity, delete_identity
Forwarding
list_forwardings, get_forwarding, create_forwarding, update_forwarding, delete_forwarding
Rewrite
list_rewrites, get_rewrite, create_rewrite, update_rewrite, delete_rewrite
All mutation tools (create_*, update_*, delete_*, activate_*, set_autoresponder, reset_mailbox_password) accept a list[dict] of items and return a bulk-result envelope with per-item success/failure. A single-item list works too.
Resources
Read-only views addressable by URI:
domains://— all domains on the accountdomain://{name}— one domain's full configdomain-records://{name}— required DNS records for setupdomain-usage://{name}— message + storage metricsmailboxes://{domain}— mailboxes for a domainmailbox://{domain}/{local_part}— one mailboxidentities://{domain}/{mailbox}— identities on a mailboxforwardings://{domain}/{mailbox}— forwardings on a mailboxaliases://{domain}— aliases for a domainrewrites://{domain}— rewrite rules for a domain
Notes
Migadu's API returns HTTP 500 on successful DELETE (known quirk). The client treats 200/204/404/500 as success on DELETE; other codes raise.
One long-lived
httpx.AsyncClientper server process, closed on shutdown via FastMCP lifespan hook.list_*tools pass responses through a static summarizer when they exceed ~2000 tokens, returning a count plus a sample instead of flooding context.
Development
git clone https://github.com/Michaelzag/migadu-mcp.git
cd migadu-mcp
uv sync --group dev
# Quality gates (same as CI)
uv run ruff format --check .
uv run ruff check migadu_mcp/ tests/
uv run ty check migadu_mcp/
uv run pytest
uv run bandit -r migadu_mcp/Tests use respx to mock the Migadu API — no credentials needed. Integration tests (behind @pytest.mark.integration) hit the real API and are skipped by default.
License
MIT — see LICENSE.
Available Tools
35 toolsactivate_domainAIdempotent
Activate domain(s) once DNS records are configured. Fails with 422 if DNS validation fails. List of dicts with: name.
Inputs: items (required).
create_aliasA
Create alias(es). List of dicts with: target, destinations (list or CSV), domain (optional), is_internal (optional).
Inputs: items (required).
create_domainA
Create domain(s). Migadu recommends hosted_dns=False (use external DNS). List of dicts with: name, hosted_dns (optional, default false), create_default_addresses (optional, default true).
Inputs: items (required).
create_forwardingB
Create forwarding(s). Forwardings require external-user confirmation. List of dicts with: mailbox, address, domain (optional), expires_on (optional, YYYY-MM-DD), remove_upon_expiry (optional).
Inputs: items (required).
create_identityC
Create identit(ies). List of dicts with: target, mailbox, name, password, domain (optional).
Inputs: items (required).
create_mailboxA
Create mailbox(es). List of dicts with: target, name, password or password_recovery_email, is_internal (optional), forwarding_to (optional).
Inputs: items (required).
create_rewriteB
Create rewrite rule(s). List of dicts with: name, local_part_rule (pattern), destinations, domain (optional), order_num (optional).
Inputs: items (required).
delete_aliasADestructiveIdempotent
Delete alias(es). DESTRUCTIVE. List of dicts with: target, domain (optional).
Inputs: items (required).
delete_forwardingADestructiveIdempotent
Delete forwarding(s). DESTRUCTIVE. List of dicts with: mailbox, address, domain (optional).
Inputs: items (required).
delete_identityBDestructiveIdempotent
Delete identit(ies). DESTRUCTIVE. List of dicts with: target, mailbox, domain (optional).
Inputs: items (required).
delete_mailboxADestructiveIdempotent
Delete mailbox(es). DESTRUCTIVE. List of dicts with: target.
Inputs: items (required).
delete_rewriteADestructiveIdempotent
Delete rewrite rule(s). DESTRUCTIVE. List of dicts with: name, domain (optional).
Inputs: items (required).
get_aliasBRead-onlyIdempotent
Get alias details by local part.
Inputs: target (required), domain.
get_domainBRead-onlyIdempotent
Get full details for a specific domain.
Inputs: name (required).
get_domain_diagnosticsARead-onlyIdempotent
Run DNS validation diagnostics on a domain. Use after configuring records externally.
Inputs: name (required).
get_domain_recordsARead-onlyIdempotent
Get the DNS records (MX, SPF, DKIM, DMARC, verification) required for domain setup.
Inputs: name (required).
get_domain_usageBRead-onlyIdempotent
Get message and storage usage metrics for a domain.
Inputs: name (required).
get_forwardingARead-onlyIdempotent
Get details for a specific forwarding (confirmation status, expiry, active state).
Inputs: mailbox (required), address (required), domain.
get_identityCRead-onlyIdempotent
Get full details for a specific identity.
Inputs: mailbox (required), identity (required), domain.
get_mailboxARead-onlyIdempotent
Get full mailbox details by email or local part.
Inputs: target (required).
get_rewriteBRead-onlyIdempotent
Get rewrite rule details by slug/name.
Inputs: name (required), domain.
list_aliasesBRead-onlyIdempotent
List aliases for a domain.
Inputs: domain.
list_domainsARead-onlyIdempotent
List all domains for the authenticated account.
Inputs: no named parameters.
list_forwardingsARead-onlyIdempotent
List external forwardings configured on a mailbox.
Inputs: mailbox (required), domain.
list_identitiesBRead-onlyIdempotent
List identities (send-as addresses) for a mailbox.
Inputs: mailbox (required), domain.
list_mailboxesCRead-onlyIdempotent
List email mailboxes for a domain.
Inputs: domain.
list_rewritesCRead-onlyIdempotent
List rewrite rules for a domain.
Inputs: domain.
reset_mailbox_passwordCIdempotent
Reset mailbox password(s). List of dicts with: target, new_password.
Inputs: items (required).
set_autoresponderBIdempotent
Configure autoresponder(s). List of dicts with: target, active, subject (optional), body (optional), expires_on (optional, YYYY-MM-DD).
Inputs: items (required).
update_aliasBIdempotent
Update alias destinations. List of dicts with: target, destinations (list or CSV), domain (optional).
Inputs: items (required).
update_domainAIdempotent
Update domain field(s). List of dicts with: name (required), description (optional), tags (optional).
Inputs: items (required).
update_forwardingAIdempotent
Update forwarding(s). List of dicts with: mailbox, address (required), and any of: is_active, expires_on, remove_upon_expiry, domain.
Inputs: items (required).
update_identityAIdempotent
Update identity settings. List of dicts with: target, mailbox (required) and any of: domain, name, may_send, may_receive, may_access_imap, may_access_pop3, may_access_managesieve, footer_active, footer_plain_body, footer_html_body.
Inputs: items (required).
update_mailboxAIdempotent
Update mailbox settings. List of dicts with: target (required) and any of: name, may_send, may_receive, may_access_imap, may_access_pop3, may_access_managesieve, spam_action, spam_aggressiveness, sender_denylist, sender_allowlist, recipient_denylist.
Inputs: items (required).
update_rewriteBIdempotent
Update rewrite rule(s). List of dicts with: name (required), and any of: new_name, local_part_rule, destinations, order_num, domain.
Inputs: items (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 35 tools
Each tool pairs a distinct Migadu resource with a clear action, and list/get/create/update/delete operations are cleanly separated. DNS records, diagnostics, and usage are also distinct from each other. Aliases, rewrites, and forwardings are conceptually close but are clearly described as separate resources with different behaviors.
The tools consistently use lower_snake_case verb_noun naming throughout, with list/get/create/update/delete applied consistently across resource types. Action-specific tools such as reset_mailbox_password, set_autoresponder, and activate_domain still follow the same general verb_noun pattern.
35 tools is noticeably heavy and may slow agent tool selection, exceeding the ideal MCP surface size. However, the count is defensible because it reflects full CRUD coverage across several distinct email-management resources.
Mailboxes, identities, aliases, rewrites, and forwardings have full CRUD coverage, and domain setup includes records, diagnostics, and activation. The main gap is the absence of a delete_domain tool, and autoresponders are settable but not independently listable/readable.
Maintenance
Related MCP Connectors
Email on your own domains for AI agents: read, search, draft, reply and send from real mailboxes.
Email hosting from your AI: read and send mail, add domains, check DNS and manage mailboxes.
Send email, manage domains, templates, webhooks and broadcasts from your AI agent.
Send email, manage domains, templates, webhooks and broadcasts from your AI agent.
Related MCP Servers
- AlicenseCqualityCmaintenanceProvides AI assistants with access to PurelyMail's email management API, enabling user, domain, routing, and billing management through natural language.19106 npm14MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to manage multiple email accounts over IMAP and SMTP: searching, reading, sending, replying, forwarding, organizing, and bulk-deleting messages across folders. Credentials are stored with AES-256 encryption plus connection pooling, and setup is handled through a web wizard with presets for 15+ providers.1,009 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to securely manage multiple email accounts via IMAP and SMTP, including searching, reading, sending, replying, forwarding, organizing folders, marking, and bulk deleting messages.1,009 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to manage multiple email accounts, including searching, reading, sending, organizing, and deleting messages, with secure encrypted credential storage and connection pooling.1,009 npmMIT