Skip to main content
Glama
README.md
# mailsocket SDKs & MCP server

[![PyPI - mailsocket](https://img.shields.io/pypi/v/mailsocket?label=PyPI%3A%20mailsocket)](https://pypi.org/project/mailsocket/)
[![PyPI - mailsocket-mcp](https://img.shields.io/pypi/v/mailsocket-mcp?label=PyPI%3A%20mailsocket-mcp)](https://pypi.org/project/mailsocket-mcp/)
[![npm - mailsocket-sdk](https://img.shields.io/npm/v/mailsocket-sdk?label=npm%3A%20mailsocket-sdk)](https://www.npmjs.com/package/mailsocket-sdk)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

[mailsocket](https://mailsocket.app) is an inbox API for OTP and magic-link
signup automation: email in, JSON out. `GET
/inboxes/{id}/messages/wait?require=otp` blocks and returns the OTP the
instant it arrives — no polling, no IMAP. Built for signup automation, E2E
tests, and AI agents.

This repo holds the official client packages.

| Package | Install | Docs |
| --- | --- | --- |
| Python | `pip install mailsocket` | [python/](python/) |
| TypeScript / Node | `npm i mailsocket-sdk` | [typescript/](typescript/) |
| MCP server (AI agents) | `uvx mailsocket-mcp` | [mcp/](mcp/) |

Full docs: [mailsocket.app](https://mailsocket.app) ·
[dash.mailsocket.app/docs/](https://dash.mailsocket.app/docs/)

## MCP config

Point any MCP-compatible client (Claude Desktop, Cursor, Claude Code) at the
`mailsocket-mcp` server over stdio:

```json
{
  "mcpServers": {
    "mailsocket": {
      "command": "uvx",
      "args": ["mailsocket-mcp"],
      "env": {
        "MAILSOCKET_API_KEY": "ms_live_..."
      }
    }
  }
}
```

See [mcp/README.md](mcp/README.md) for per-client config file locations and
the full tool list.

## Examples

[examples/playwright/](examples/playwright/) — a reference Playwright test
that fills a signup form with a mailsocket inbox address and blocks on the
wait endpoint until the OTP arrives.

## License

MIT — see [LICENSE](LICENSE).

TDQS

A4.4/5.0

Scored across 8 tools

Disambiguation4/5

The two wait tools are cleanly split by target (numeric OTP vs clickable link), and get_latest vs list_messages is clarified as peek-newest vs paged browse. Minor overlap remains since get_latest is effectively a slice of list_messages, but descriptions steer selection well.

Naming Consistency5/5

All eight tools use a consistent snake_case verb_noun pattern (create_inbox, list_inboxes, list_messages, wait_for_otp, wait_for_link, send_test_code, delete_inbox), with get_latest the only mild stylistic variation and still readable.

Tool Count5/5

Eight tools is well-scoped for a throwaway-inbox/OTP-waiting service, covering setup, waiting, inspection, testing, and cleanup without filler.

Completeness4/5

The inbox lifecycle (create, list, delete) and the core wait/inspect flow are fully covered, including a test-code injector for offline validation. Minor gaps: no fetch-single-message-by-id or get-inbox-by-id, though list_messages/list_inboxes largely work around these.

Maintenance

ActivityMaintained
ResponsivenessNo issues