Skip to main content

MCP server for MailPal -- free email for AI agents with hardware attestation

Project description

mailpal-mcp

Free email for AI agents -- MCP server for mailpal.com

uvx mailpal-mcp

or

pip install mailpal-mcp

PyPI License


Why MailPal?

  • Free forever -- every AI agent gets a real @mailpal.com email address at no cost
  • Hardware attestation -- emails are cryptographically signed by your TPM, proving they came from real hardware (via 1id.com). Attestation is ON by default.
  • Full protocols -- SMTP, IMAP, JMAP, CalDAV, CardDAV. Not a toy API -- a real mail server powered by Stalwart

Tools

Tool Description
mailpal_activate_account Create your @mailpal.com email address (two-phase Proof-of-Intelligence challenge)
mailpal_send_email Send email with hardware attestation ON by default (mode 2 = SD-JWT, mode 1 = direct TPM CMS, mode 0 = none)
mailpal_check_inbox Check inbox for messages -- returns summaries with sender, subject, date, preview
mailpal_read_message Read full message content including text body, HTML body, and all metadata
mailpal_subscribe_to_inbox Subscribe to real-time "You've Got Mail!" notifications when new email arrives
mailpal_wait_for_email Block until new email arrives or timeout (requires subscribe first)
mailpal_register_email_callback Register a webhook URL to POST when new email arrives
mailpal_unregister_email_callback Remove a previously registered webhook callback
mailpal_jmap Raw JMAP passthrough -- delete, move, flag, search, folders, contacts, calendars, sieve filters, blob upload, anything JMAP supports
oneid_get_or_create_identity Get or create a hardware-anchored 1id identity for this agent
oneid_status Full picture of identity, devices, connected services
oneid_get_bearer_token Get an OAuth2 Bearer token for the current identity
oneid_sign_challenge Sign a verifier-provided nonce to prove hardware identity
oneid_verify_peer_identity Verify another agent's identity proof bundle
oneid_list_credential_pointers List credential pointers for an identity

The mailpal_jmap tool gives your agent access to the full JMAP specification (RFC 8620/8621) and all Stalwart extensions. If a convenience tool doesn't exist for what you need, use this.

Quick Start

1. Get a 1id.com identity

pip install oneid
oneid enroll

This creates a hardware-anchored identity and gives you a JWT token.

2. Add to your MCP client

Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "mailpal": {
      "command": "uvx",
      "args": ["mailpal-mcp"],
      "env": {
        "MAILPAL_TOKEN": "<your-1id-jwt>"
      }
    }
  }
}

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "mailpal": {
      "command": "uvx",
      "args": ["mailpal-mcp"],
      "env": {
        "MAILPAL_TOKEN": "<your-1id-jwt>"
      }
    }
  }
}

Windsurf (~/.windsurf/mcp.json):

{
  "mcpServers": {
    "mailpal": {
      "command": "uvx",
      "args": ["mailpal-mcp"],
      "env": {
        "MAILPAL_TOKEN": "<your-1id-jwt>"
      }
    }
  }
}

3. Or use the hosted endpoint (zero install)

{
  "mcpServers": {
    "mailpal": {
      "type": "streamable-http",
      "url": "https://mailpal.com/mcp",
      "headers": {
        "Authorization": "Bearer <your-1id-jwt>"
      }
    }
  }
}

The hosted endpoint also supports real-time "You've Got Mail!" notifications via MCP resource subscriptions and SSE.

Environment Variables

Variable Required Description
MAILPAL_TOKEN Yes 1id.com JWT token for authentication
MAILPAL_API_URL No Override API base URL (default: https://mailpal.com/api/v1)

Also Available As

  • TypeScript: mailpal-mcp-server on npm -- npx mailpal-mcp-server
  • Hosted endpoint: https://mailpal.com/mcp (Streamable HTTP, supports real-time notifications)
  • REST API: https://mailpal.com/api/v1/ (docs)
  • Direct IMAP/SMTP: imap.mailpal.com:993 / smtp.mailpal.com:587 (standard email clients)

Comparison

Feature MailPal AgentMail Robotomail Nylas
Free tier Unlimited 100 msgs Limited Paid
Real SMTP/IMAP Yes API only API only Yes
Hardware attestation Yes (ON by default) No No No
CalDAV/CardDAV Yes No No Yes
MCP server Yes Yes No No
JMAP passthrough Yes No No No
Real-time inbox push Yes No No No
Self-hostable Yes (Stalwart) No No No

Development

git clone https://github.com/mailpal-com/mcp-python.git
cd mcp-python
pip install -e .
mailpal-mcp

Test with MCP Inspector:

npx -y @modelcontextprotocol/inspector

License

Apache-2.0 -- see LICENSE.

Built by Crypt Inc. -- the team behind 1id.com and mailpal.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mailpal_mcp-1.0.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mailpal_mcp-1.0.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file mailpal_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: mailpal_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mailpal_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 273a18f5d4a164877e1ed498dd26fc56ce45595e2d239f9fd4c49f7f9b337290
MD5 6778cc8a2c31261395ba723cdd0d8dd5
BLAKE2b-256 2dc10b45d05fc5534d1aac66c863fa198ed2e2108d0f033d45264704db90a7d6

See more details on using hashes here.

File details

Details for the file mailpal_mcp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: mailpal_mcp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mailpal_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4313b6e3c8a988e8d8cda4ecd986155e951609a750c5ce596c97154de9946cd3
MD5 c65bb4b63d2dac8bfa59d696b6bdec15
BLAKE2b-256 8b254ee1636618f37dadc5b7b7463c3470560f5517afd9a08b915ca4d8b4372f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page