mailsocket
What it does
Test inboxes for AI agents testing your app: block until the OTP or magic link arrives.
- Connects 电脑或云端
- Account or key Cloud: Needs Authorization · Local: Needs MAILSOCKET_API_KEY
- Category 开发者工具
安装
选择你使用的 AI 应用,然后复制设置。
通过 5/5 项检查 · 你的提问会经过开发者的服务器(mcp.mailsocket.app)
第一步:你用哪个 AI?
选择你用的应用,步骤会显示在下方。
可连接 Claude · 约 5 分钟
需要 mailsocket 的密钥(在开发者网站创建) · 在 claude.ai 或桌面应用设置一次,即可在聊天中使用 · 免费账户可添加 1 个 · Team/Enterprise 方案由所有者(Owner)添加
打开 Claude 的 Connectors 页面
CustomizeConnectors
点击“+ Add” → “Add custom connector”,填写这 2 项
把这里的内容复制到 Claude 中同名的输入框,然后点击 Continue
Name · 名称mailsocketRemote MCP server URL · 地址https://mcp.mailsocket.app/mcp在 Request headers 下添加这个名称和值
Header 名称Authorization值Bearer <在这里粘贴你的密钥>只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人
Authentication 保持 Claude 检测到的设置,然后点击 Add
在聊天中开启
+Connectorsmailsocket
试一试
用 mailsocket 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude 说正在使用 mailsocket,或回答中出现 mailsocket 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
ChatGPT 暂时无法连接 mailsocket
mailsocket 连接时需要你自己的密钥,但 OpenAI 帮助页面只说明了 OAuth 登录,没有我们能核实的填密钥方式
你可以改用这些方式
A · 使用能连接 mailsocket 的应用
- 需要 mailsocket 的密钥(在开发者网站创建) · 在 claude.ai 或桌面应用设置一次,即可在聊天中使用 · 免费账户可添加 1 个 · Team/Enterprise 方案由所有者(Owner)添加
- 需要 mailsocket 的密钥(在开发者网站创建)
- 需要 mailsocket 的密钥(在开发者网站创建)
- 需要 mailsocket 的密钥(在开发者网站创建)
B · 开发者工具 类中能连接 ChatGPT 的其他服务器
从同类中使用较多的里挑选,仅限用地址即可连接、无需密钥的
- Sentry✓ ChatGPT
- Compiler Explorer✓ ChatGPT
- GitDiagram✓ ChatGPT
可连接 Claude Code · 约 5 分钟
需要 mailsocket 的密钥(在开发者网站创建)
打开终端
Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell
粘贴这条命令并按 Enter
claude mcp add --transport http --scope user mailsocket https://mcp.mailsocket.app/mcp --header 'Authorization: Bearer your-value'按 Enter 前,把“your-value”改成你的密钥
只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人
在 Claude Code 中输入 /mcp
应能看到 mailsocket 在列表中并显示已连接
试一试
用 mailsocket 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude Code 说正在使用 mailsocket,或回答中出现 mailsocket 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
可连接 Cursor · 约 5 分钟
需要 mailsocket 的密钥(在开发者网站创建)
填写你的密钥
在 mailsocket 的设置中,Authorization 还是空的,填入你的密钥并保存
只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人
在 Cursor 中以 Agent 模式打开 AI 聊天
试一试
用 mailsocket 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Cursor 说正在使用 mailsocket,或回答中出现 mailsocket 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同
可连接 VS Code · 约 5 分钟
需要 mailsocket 的密钥(在开发者网站创建)
填写你的密钥
在 mailsocket 的设置中,Authorization 还是空的,填入你的密钥并保存
只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人
在 VS Code 中以 Agent 模式打开 AI 聊天
试一试
用 mailsocket 告诉我你能帮我做什么,然后做一件给我看✓ 如果 VS Code 说正在使用 mailsocket,或回答中出现 mailsocket 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同
开发者专用:终端命令和 JSON 设置
通过网页连接
Claude Code
claude mcp add --transport http --scope user mailsocket https://mcp.mailsocket.app/mcp --header 'Authorization: Bearer your-value'Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"mailsocket": {
"url": "https://mcp.mailsocket.app/mcp",
"headers": {
"Authorization": "Bearer your-value"
}
}
}
}VS Code (mcp.json)
{
"servers": {
"mailsocket": {
"type": "http",
"url": "https://mcp.mailsocket.app/mcp",
"headers": {
"Authorization": "Bearer your-value"
}
}
}
}安装在电脑上
Claude Code
claude mcp add --scope user mailsocket --env MAILSOCKET_API_KEY=your-value --env MAILSOCKET_BASE_URL=your-value -- uvx mailsocket-mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"mailsocket": {
"command": "uvx",
"args": [
"mailsocket-mcp"
],
"env": {
"MAILSOCKET_API_KEY": "your-value",
"MAILSOCKET_BASE_URL": "your-value"
}
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"mailsocket": {
"command": "uvx",
"args": [
"mailsocket-mcp"
],
"env": {
"MAILSOCKET_API_KEY": "your-value",
"MAILSOCKET_BASE_URL": "your-value"
}
}
}
}VS Code (mcp.json)
{
"servers": {
"mailsocket": {
"type": "stdio",
"command": "uvx",
"args": [
"mailsocket-mcp"
],
"env": {
"MAILSOCKET_API_KEY": "your-value",
"MAILSOCKET_BASE_URL": "your-value"
}
}
}
}需要你填写的值
MAILSOCKET_API_KEY机密 必填 envmailsocket API key (ms_live_...). Create one in the dashboard or via POST /api/v1/agents/register.MAILSOCKET_BASE_URLenvOverride the API base URL. Defaults to https://dash.mailsocket.app/api/v1.- Bearer ms_live_... (create a key in the dashboard or via POST /api/v1/agents/register)
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
一览
哪些应用可以使用它
依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。
通过互联网连接,适用于
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatOpen WebUIRaycast
在你的电脑上运行,适用于
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
它能做什么
服务器要求先登录,才会列出它的工具。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月12日
- ✓ 通过
作者与仓库一致
注册名称已通过域名 mailsocket.app 验证(注册中心会核实域名所有权)
- ✓ 通过
仍在维护
代码最后更新于11天前
- ✓ 通过
有许可证
使用 MIT
- ✓ 通过
端点有响应
在 140 毫秒内响应(HTTP 401)
- ✓ 通过
使用 OAuth 登录
声明支持 OAuth 登录,你的 AI 应用可以带你去登录
- … 尚未检查
工具描述中没有隐藏指令
尚未检查;我们会在检查端点时读取工具列表
讨论
提问、分享技巧或报告无法使用。按“有帮助”数量排序。
用户评价
还没有评价
与“开发者工具”中的其他服务器比较i
- 星标数多于此分类中其他 5802 个服务器的 0%
- 发布到注册中心的时间比此分类中其他 5802 个服务器的 67% 更新
- 基础检查结果等于或优于此分类中其他 5802 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
mailsocket 安全吗?
它在 5 项适用的基础检查中通过了 5 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
你需要填写:Authorization, MAILSOCKET_API_KEY
它在我的电脑上运行还是在云端?
两种方式都可以:安装在你的电脑上,或者连接云端版本。
它还在维护吗?
GitHub 仓库最后更新于11天前,最新版本(0.4.2)于11天前进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。它通过 URL 连接,因此也能用于支持远程 MCP 的应用,例如 ChatGPT Business 及以上方案。
有什么可以替代它?
同一分类中有:REA, GitHub, Serena MCP: the IDE for your agent
同类别的其他选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Serena MCP: the IDE for your agent
A powerful toolkit for coding, providing semantic retrieval and editing capabilities.
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
mailsocket — MCP server
An MCP server that exposes mailsocket to AI coding agents as native tools, so an agent can create a per-test inbox and block on the OTP or magic link without writing any polling code. For testing apps you own or are authorized to test. Not for creating accounts on services you don't control.
It wraps the Python SDK — no second HTTP client, no re-implemented polling.
What it does
| Tool | What the agent gets |
|---|---|
create_inbox(label?) | a fresh inbox id + address |
wait_for_otp(inbox_id, timeout?=60, min_confidence?=0, since?) | the headline — blocks (bounded: requested deadline clamped to 120s locally, 55s on the remote server) and returns the OTP string + confidence + subject/from/id/received_at. Default since omitted: only messages arriving after this call are matched. |
wait_for_link(inbox_id, timeout?=60, since?) | the extracted magic link (returned, *not* followed) + subject/from/id/received_at. Default since omitted: only messages arriving after this call are matched. |
list_inboxes(limit?, cursor?) | one page of inboxes owned by the key (server default page size 25) + next_cursor/has_more |
list_messages(inbox_id, has_otp?, subject_contains?, sender?, limit?, cursor?) | one page of messages, optionally filtered (server default page size 25) + next_cursor/has_more |
get_latest(inbox_id) | the newest message, without blocking |
send_test_code(inbox_id) | puts one sample OTP email straight into the inbox (no mail server) and returns its message_id + sent_at, so you can check the wait loop without real email. 5 per inbox / 20 per account per hour. |
delete_inbox(inbox_id) | remove an inbox when done |
Errors from the SDK (AuthError / NotFound / RateLimited / WaitTimeout) are turned into clean MCP tool errors — no stack traces, and the API key is never echoed back.
Reusing an inbox
create_inbox needs no since — a fresh inbox only ever has new messages. By default, wait_for_otp/wait_for_link omit since entirely, so the server matches only messages arriving AFTER the call (the request start time). But if you reuse an existing inbox (e.g. to request a second OTP/link), pass since explicitly: otherwise a call with no since will correctly ignore anything already sitting in the inbox, which is right for most reuse, but if you actually WANT to catch a code that already arrived before you called the tool, pass either the time right before you triggered the new email (ISO8601 or unix seconds), or the id of the last message you saw (msg_..., meaning "only messages after that one") — both tools return id/received_at on the matched message so you can chain since= into the next call on that same inbox.
Trying the loop without real email
send_test_code does not go through the mail server, so the code is already in the inbox when the tool returns. Take a cutoff first: the id from get_latest (or since=0 if the inbox is empty), or the current time. Then call send_test_code(inbox_id), then wait_for_otp(inbox_id, since= ). Without since the wait only sees mail that arrives during the wait, so it would miss the test code.
Requirements
- Python 3.10+
- A mailsocket API key — from the dashboard or
POST /api/v1/agents/register.
Install
No install needed with uv:
uvx mailsocket-mcp
Or install with pip:
pip install mailsocket-mcp
mailsocket-mcp
Either way, it reads MAILSOCKET_API_KEY (and optional MAILSOCKET_BASE_URL) from the environment. If the key is missing it exits with a clear message and status 2; the key is never logged.
Register with an MCP client
Claude Desktop / Cursor
Add this to your client's MCP config file — claude_desktop_config.json for Claude Desktop, ~/.cursor/mcp.json for Cursor:
{
"mcpServers": { "mailsocket": { "command": "uvx", "args": ["mailsocket-mcp"], "env": { "MAILSOCKET_API_KEY": "ms_live_..." } } } }
Claude Code CLI
claude mcp add mailsocket -e MAILSOCKET_API_KEY=ms_live_... -- uvx mailsocket-mcp
Any other MCP-compatible client works the same way: point it at the mailsocket-mcp executable (or uvx mailsocket-mcp) over stdio and pass the key through the environment.
Remote server (no install)
The same tools are hosted at `https://mcp.mailsocket.app/mcp` over Streamable HTTP. Send your key on every request as a header: Authorization: Bearer ms_live_.... Never put the key in the URL; a ?api_key= request is rejected.
Claude Code CLI
claude mcp add --transport http mailsocket https://mcp.mailsocket.app/mcp \
--header "Authorization: Bearer ms_live_..."
Cursor (~/.cursor/mcp.json)
{
"mcpServers": { "mailsocket": { "url": "https://mcp.mailsocket.app/mcp", "headers": { "Authorization": "Bearer ms_live_..." } } } }
VS Code (.vscode/mcp.json)
{
"servers": { "mailsocket": { "type": "http", "url": "https://mcp.mailsocket.app/mcp", "headers": { "Authorization": "Bearer ms_live_..." } } } }
Any client that can set a custom HTTP header works the same way (OpenAI Agents SDK, the n8n MCP Client node, your own code).
Things to know:
- Claude.ai, Claude Desktop connectors and Smithery need OAuth, which is planned but not available yet. Until then, use the local stdio server above in those clients (Claude Desktop), or use a header-capable client.
- On the remote server,
wait_for_otp/wait_for_linkwait at most 55s per call, which keeps each response under proxy timeouts. On a timeout, call the tool again. - The server is stateless: no session to keep, and every request is authenticated on its own. It has no key of its own and only acts with yours, under your normal API rate limits.
- Self-hosting:
mailsocket-mcp-httpruns the same server (seemailsocket_mcp/remote.pyfor its env vars).
Env vars
| Variable | Required | Description |
|---|---|---|
MAILSOCKET_API_KEY | yes (secret) | Your mailsocket API key (ms_live_...). |
MAILSOCKET_BASE_URL | no | Override the API base URL. Defaults to https://dash.mailsocket.app/api/v1. |
Develop
pip install -e ".[dev]"
pytest
Tests make no external or live-API requests. The SDK client is faked, and the remote-transport tests talk to a local fake upstream on 127.0.0.1.
Changelog
- 0.4.2 — wording only: server and tool descriptions and README say "test inbox for apps you own or are authorized to test". Tool names and behaviour unchanged.
- 0.4.1 — requires
mailsocket>=0.3.1:wait_for_otp/wait_for_linkcalled withoutsinceno longer miss a message that lands between the SDK's internal long-poll calls (each follow-up call sends the cutoff the server reported inMailsocket-Wait-Since). No tool signature changes. - 0.4.0 — new
send_test_code(inbox_id)tool (stdio and the hosted remote server, under the same per-key caps as the other non-wait tools): puts one sample OTP email into your own inbox without going through the mail server. Requiresmailsocket>=0.3.0(Client.send_test_code). - 0.3.0 — BEHAVIOUR CHANGE (via
mailsocket>=0.2.0):wait_for_otp/wait_for_linknow omitsinceby default instead of forwarding0("any message already in the inbox"). The old default could return a STALE OTP/link already sitting in a reused inbox; the new default matches only messages arriving after the call. Passsince=0explicitly to keep the old behaviour. Hosted server (mcp.mailsocket.app, deployed from the repo, no new PyPI release): per-key concurrent waits raised 3 → 10 (= the Pro plan cap; the API still enforces each plan's own cap) and the shared wait pool 16 → 32, following the backend's raised wait capacity (global 64). - 0.2.3 —
wait_for_otp/wait_for_linkaccept an optionalsince(ISO8601, unix seconds or a message id) so a reused inbox returns the NEW code; results include the messageidandreceived_at. - 0.2.2 — depends on
mailsocket>=0.1.3(stricter_segid validation in the underlying Python SDK).