Skip to main content
Glama
Migadu MCP Server

Migadu MCP Server

by Michaelzag

Migadu MCP Server

PyPI version Python 3.13+ License: MIT

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-mcp

MIGADU_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.example as an alias to both Alice and Bob"

  • "Configure an autoresponder on vacation@acme.example until 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 account

  • domain://{name} — one domain's full config

  • domain-records://{name} — required DNS records for setup

  • domain-usage://{name} — message + storage metrics

  • mailboxes://{domain} — mailboxes for a domain

  • mailbox://{domain}/{local_part} — one mailbox

  • identities://{domain}/{mailbox} — identities on a mailbox

  • forwardings://{domain}/{mailbox} — forwardings on a mailbox

  • aliases://{domain} — aliases for a domain

  • rewrites://{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.AsyncClient per 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 tools
activate_domainA
Idempotent

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_aliasA
DestructiveIdempotent

Delete alias(es). DESTRUCTIVE. List of dicts with: target, domain (optional).

Inputs: items (required).

delete_forwardingA
DestructiveIdempotent

Delete forwarding(s). DESTRUCTIVE. List of dicts with: mailbox, address, domain (optional).

Inputs: items (required).

delete_identityB
DestructiveIdempotent

Delete identit(ies). DESTRUCTIVE. List of dicts with: target, mailbox, domain (optional).

Inputs: items (required).

delete_mailboxA
DestructiveIdempotent

Delete mailbox(es). DESTRUCTIVE. List of dicts with: target.

Inputs: items (required).

delete_rewriteA
DestructiveIdempotent

Delete rewrite rule(s). DESTRUCTIVE. List of dicts with: name, domain (optional).

Inputs: items (required).

get_aliasB
Read-onlyIdempotent

Get alias details by local part.

Inputs: target (required), domain.

get_domainB
Read-onlyIdempotent

Get full details for a specific domain.

Inputs: name (required).

get_domain_diagnosticsA
Read-onlyIdempotent

Run DNS validation diagnostics on a domain. Use after configuring records externally.

Inputs: name (required).

get_domain_recordsA
Read-onlyIdempotent

Get the DNS records (MX, SPF, DKIM, DMARC, verification) required for domain setup.

Inputs: name (required).

get_domain_usageB
Read-onlyIdempotent

Get message and storage usage metrics for a domain.

Inputs: name (required).

get_forwardingA
Read-onlyIdempotent

Get details for a specific forwarding (confirmation status, expiry, active state).

Inputs: mailbox (required), address (required), domain.

get_identityC
Read-onlyIdempotent

Get full details for a specific identity.

Inputs: mailbox (required), identity (required), domain.

get_mailboxA
Read-onlyIdempotent

Get full mailbox details by email or local part.

Inputs: target (required).

get_rewriteB
Read-onlyIdempotent

Get rewrite rule details by slug/name.

Inputs: name (required), domain.

list_aliasesB
Read-onlyIdempotent

List aliases for a domain.

Inputs: domain.

list_domainsA
Read-onlyIdempotent

List all domains for the authenticated account.

Inputs: no named parameters.

list_forwardingsA
Read-onlyIdempotent

List external forwardings configured on a mailbox.

Inputs: mailbox (required), domain.

list_identitiesB
Read-onlyIdempotent

List identities (send-as addresses) for a mailbox.

Inputs: mailbox (required), domain.

list_mailboxesC
Read-onlyIdempotent

List email mailboxes for a domain.

Inputs: domain.

list_rewritesC
Read-onlyIdempotent

List rewrite rules for a domain.

Inputs: domain.

reset_mailbox_passwordC
Idempotent

Reset mailbox password(s). List of dicts with: target, new_password.

Inputs: items (required).

set_autoresponderB
Idempotent

Configure autoresponder(s). List of dicts with: target, active, subject (optional), body (optional), expires_on (optional, YYYY-MM-DD).

Inputs: items (required).

update_aliasB
Idempotent

Update alias destinations. List of dicts with: target, destinations (list or CSV), domain (optional).

Inputs: items (required).

update_domainA
Idempotent

Update domain field(s). List of dicts with: name (required), description (optional), tags (optional).

Inputs: items (required).

update_forwardingA
Idempotent

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_identityA
Idempotent

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_mailboxA
Idempotent

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_rewriteB
Idempotent

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

    A3.5/5.0

    Scored across 35 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count3/5

    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.

    Completeness3/5

    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

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      C
      maintenance
      Provides AI assistants with access to PurelyMail's email management API, enabling user, domain, routing, and billing management through natural language.
      19
      106 npm
      14
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables 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 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables 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 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables 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 npm
      MIT