Email inboxes for AI agents: create an inbox, then block until the OTP or magic link arrives.
mailsocket 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/ |
| TypeScript / Node | npm i mailsocket-sdk | typescript/ |
| MCP server (AI agents) | uvx mailsocket-mcp | mcp/ |
Full docs: mailsocket.app · dash.mailsocket.app/docs/
Point any MCP-compatible client (Claude Desktop, Cursor, Claude Code) at the
mailsocket-mcp server over stdio:
{
"mcpServers": {
"mailsocket": {
"command": "uvx",
"args": ["mailsocket-mcp"],
"env": {
"MAILSOCKET_API_KEY": "ms_live_..."
}
}
}
}
See mcp/README.md for per-client config file locations and the full tool list.
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.
MIT — see LICENSE.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
uvx mailsocket-mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"app-mailsocket-mailsocket-mcp": {
"command": "uvx",
"args": [
"mailsocket-mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencemailsocket-mcppypimailsocket works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.