mailsocket
Official# mailsocket SDKs & MCP server
[](https://pypi.org/project/mailsocket/)
[](https://pypi.org/project/mailsocket-mcp/)
[](https://www.npmjs.com/package/mailsocket-sdk)
[](LICENSE)
[mailsocket](https://mailsocket.app) is an email-testing API: test inboxes for
your app's signup, login and password-reset emails. 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 E2E tests, CI, QA, and AI
agents testing your app.
For testing apps you own or are authorized to test. Not for creating accounts
on services you don't control.
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
Scored across 8 tools
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.
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.
Eight tools is well-scoped for a throwaway-inbox/OTP-waiting service, covering setup, waiting, inspection, testing, and cleanup without filler.
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.