MyOTP.App

io.github.brntech由 GitHub 账号 brntech 发布v0.1.14更新于 Oct 24, 2026

Send and verify one-time passcodes over SMS, WhatsApp and Telegram.

发布方自己的服务:MobileValidate

已验证Streamable HTTP可网页运行金融沟通与协作安全与监控

概览

AI 生成的概览

MyOTP.App 服务器,让助手通过短信、WhatsApp 和 Telegram 发送、验证、延长并跟踪一次性验证码,并管理 OTP 账户。

可以做什么
通过短信、WhatsApp 或 Telegram 向手机号发送一次性验证码,并返回消息 ID 供后续调用。验证终端用户提交的验证码,查询验证码是否仍有效及其送达状态,并在不重发的情况下延长有效期。读取账户信息、邮箱验证状态、余额和套餐,并可重发验证邮件。按日期范围分页获取 OTP 交易记录,最长 31 天。无需密钥即可创建代理账户,查询充值报价,并通过支付挑战发起额度充值。
适用场景
适用于助手或其构建的应用需要手机验证的场景:发送登录或注册验证码、确认验证码是否送达,或给用户更多输入时间。也适合自行管理 MyOTP 账户和额度的代理。
运行要求
可使用托管端点,或通过 npx 在本地以 Node.js 运行 npm 包。多数工具需要 API 密钥:本地使用时通过环境变量 MYOTP_API_KEY 提供,托管服务器则通过 X-API-Key 请求头或 bearer 令牌提供;create_account 和 get_topup_quote 无需密钥。需要能访问 MyOTP API 的网络,且调用方 IP 须在该密钥的白名单中。
安装前请注意
发送验证码会消耗额度,top_up_credits 可能花费真实资金(USDC 或银行卡),最低 25 额度,银行卡每日上限 100 美元。API 密钥属于机密;托管服务器从固定地址访问 API,该地址须加入白名单。返回的 API 密钥只显示一次。以明文返回验证码仅供测试。向手机号发送消息和创建账户会写入数据并联系第三方。

安装

在 SourceWeft 中

  1. 打开 控制台中的 MyOTP.App,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.brntech%2Fmyotp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "myotp-app": {
      "type": "http",
      "url": "https://mcp.myotp.app/mcp"
    }
  }
}

README

@myotp/mcp — MyOTP.App MCP Server

[smithery badge]

A Model Context Protocol server that exposes MyOTP.App's OTP API to any MCP-compatible AI agent: Claude Desktop, Claude Code, Cursor, Windsurf, Codex, and anything else that speaks MCP.

Send and verify one-time passwords (SMS, WhatsApp, Telegram) directly from a chat with your agent, or from any app it builds.

What it does

Exposes 10 tools:

ToolPurpose
generate_otpSend an OTP via SMS, WhatsApp, or Telegram. Returns a message_id.
verify_otpVerify a code submitted by an end user.
check_otp_statusCheck delivery status / whether an OTP is still active.
extend_otpAdd more time to an active OTP without resending.
get_account_infoSanity-check the API key and IP whitelist (calls GET /me).
get_usage_reportPaginated transaction history for a date range.
create_accountCreate an agent account without an API key and return its one-time key.
get_account_statusCheck verification, balance, plan, and status; optionally resend verification.
get_topup_quoteQuote a credit purchase and return USDC and card payment commands.
top_up_creditsReturn an MPP payment challenge and retry details, or the credited result.

Every tool declares an outputSchema, so clients can type-check structuredContent; error results carry { error, status?, endpoint?, body? } with isError: true.

All tools call the public MyOTP REST API at https://api.myotp.app. Override with the MYOTP_BASE_URL env var for a mock server.

Install

You don't need to install anything globally — npx will fetch and run the latest version on demand:

bash
npx @myotp/mcp

Use the scoped name. myotp-mcp is the bin name inside the package, not a package on npm, so npx myotp-mcp does not resolve.

If you want to pin a version or install it locally:

bash
npm install --save-dev @myotp/mcp

Get an API key

Call create_account with an email address and optional name. It is the one account tool that needs no configured key. Save the returned API key immediately: it is shown once, and the new account starts with a zero balance. Configure that key as MYOTP_API_KEY for stdio or send it with hosted requests, then call get_topup_quote or top_up_credits to add credits.

The confirmation email requires a human click. Confirmation unlocks card top-ups; USDC top-ups work before confirmation. Human signup at myotp.app/sign-up/ remains available and follows the dashboard's email, phone, API-key, and IP-allowlist flow.

Use it with Claude Desktop

Edit your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

json
{  "mcpServers": {    "myotp": {      "command": "npx",      "args": ["-y", "@myotp/mcp"],      "env": {        "MYOTP_API_KEY": "your-32-character-api-key"      }    }  }}

Restart Claude Desktop. Ask the agent: "Send a test OTP to my phone +1 415 555 0123." It will call generate_otp and report the message_id.

Use it with Claude Code

Add it to your project's .mcp.json:

json
{  "mcpServers": {    "myotp": {      "command": "npx",      "args": ["-y", "@myotp/mcp"],      "env": {        "MYOTP_API_KEY": "your-32-character-api-key"      }    }  }}

Or register it globally with the Claude Code CLI:

bash
claude mcp add myotp -- npx -y @myotp/mcp# Set the env var separately, then restart claude.

Use it with Cursor

Cursor reads the same .mcp.json format. Add to your workspace settings or .cursor/mcp.json:

json
{  "mcpServers": {    "myotp": {      "command": "npx",      "args": ["-y", "@myotp/mcp"],      "env": {        "MYOTP_API_KEY": "your-32-character-api-key"      }    }  }}

Gateways that pass config in the URL

Some MCP gateways deliver per-user settings as query parameters rather than headers. The hosted server accepts ?apiKey=<key> (also ?api_key=, or a base64url ?config= JSON blob with an apiKey field) as a fallback. A key in the X-API-Key or Authorization: Bearer header always wins over one in the URL. On Smithery, the config schema maps the key to the x-api-key header, so no URL parameter is needed there.

Use it with Codex CLI

Codex reads TOML, not JSON. Add to ~/.codex/config.toml:

toml
[mcp_servers.myotp]command = "npx"args = ["-y", "@myotp/mcp"]
[mcp_servers.myotp.env]MYOTP_API_KEY = "your-32-character-api-key"

Codex can also talk to the hosted server over HTTP instead of launching anything locally. It attaches the token as Authorization: Bearer, which the hosted endpoint accepts as an alias for X-API-Key:

toml
[mcp_servers.myotp]url = "https://mcp.myotp.app/mcp"bearer_token_env_var = "MYOTP_API_KEY"

On older Codex builds that only pick up stdio servers, add experimental_use_rmcp_client = true above the entry.

If you use the hosted URL, add 108.61.176.199 to your API key's IP allowlist. Hosted calls reach the MyOTP API from that address rather than from your machine, and every call returns 403 until it is allowed. The stdio option above has no such requirement because the request leaves your own machine.

Use it with anything else

Any client that speaks MCP works. The stdio block is the same shape everywhere (command: npx, args: ["-y", "@myotp/mcp"], MYOTP_API_KEY in the environment), so Windsurf, Zed, Continue, OpenClaw, Hermes and Grokbot all take the JSON or TOML equivalent of the blocks above.

For a hosted client, point it at https://mcp.myotp.app/mcp and send your key as either X-API-Key or Authorization: Bearer. Use whichever one your client can actually set.

Transport modes

stdio (default — for local agent installs)

The server reads JSON-RPC messages from stdin and writes them to stdout. The API key comes from the MYOTP_API_KEY env var, set when the agent launches the server. This is the right mode for desktop apps like Claude Desktop, Claude Code, and Cursor.

bash
MYOTP_API_KEY=sk_... npx @myotp/mcp# or explicitlyMYOTP_API_KEY=sk_... npx @myotp/mcp --stdio

Streamable HTTP (for hosted servers)

Run an HTTP server that any MCP-compatible agent can point at. Authenticated tools receive the API key per request via X-API-Key, so one hosted instance can serve many tenants; anonymous tools do not require the header.

bash
npx @myotp/mcp --http --port 3000# or with the env switchMYOTP_MCP_TRANSPORT=http PORT=3000 npx @myotp/mcp

The MCP endpoint is POST /mcp (also accepts GET and DELETE per the spec). Health check at GET /healthz.

This is what we host at https://mcp.myotp.app/mcp. Point your client at that URL and send X-API-Key: <your-key> on authenticated tool requests.

Configuration

Env varDefaultDescription
MYOTP_API_KEY—Your MyOTP.App API key. Required for authenticated tools; create_account and get_topup_quote work without it.
MYOTP_BASE_URLhttps://api.myotp.appAPI base URL. Override for a mock server.
MYOTP_MCP_TRANSPORTstdioSet to http to start in HTTP mode.
PORT3000HTTP listen port.
HOST0.0.0.0HTTP bind address.
MCP_PATH/mcpHTTP route for MCP traffic.
MCP_SESSION_IDLE_MS1800000HTTP mode: close a session after this long with no requests. The client gets 404 and re-initializes.
MCP_SESSION_BUSY_MS3600000HTTP mode: close a session whose open request (such as an SSE stream) started longer ago than this.
MCP_MAX_SESSIONS1000HTTP mode: most sessions held at once; a new session closes the least recently used one, idle sessions first.

Example tool calls

Once the server is wired up, you can ask the agent things like:

  • "Send an OTP via WhatsApp to 14155550123."
  • "Use MyOTP to verify code 482913 for that phone number."
  • "Did the last OTP get delivered? Check status for message_id a1b2…."
  • "Show me my OTP usage for the last 7 days."
  • "How much credit do I have on this MyOTP account?"
  • "Create a MyOTP agent account for [email protected]."
  • "Check whether my agent account email is verified, and resend the email if needed."
  • "Quote 500 more MyOTP credits."
  • "That send failed with NoBalance. Top up 100 credits."

Under the hood the agent will pick the right tool, validate inputs against the JSON Schema we publish, and call the MyOTP API.

Buying credits as an agent

Agents can buy MyOTP credits by themselves: one 402, one payment, no checkout page, no card form. Credits cost $0.02 each, with a 25-credit ($0.50) minimum and a 50,000-credit maximum per call. Card top-ups are capped at $100 per account per rolling 24 hours; USDC is uncapped. A trial account moves to the Starter pay-as-you-go pricing table on its first top-up, without creating a subscription.

When an OTP send returns HTTP 403 insufficient balance or NoBalance, call get_topup_quote to inspect the price or call top_up_credits to start the purchase. top_up_credits fetches the quote first, then posts to /v1/topup with the configured API key and no payment credential. The expected 402 response contains MPP offers for USDC on Tempo and, while the card cap permits, card or Link through Stripe. The tool returns the decoded offers, challenge ID, exact retry URL and body, and headers with credential placeholders.

The MCP server cannot hold the agent's wallet. Run one of the returned commands with your MyOTP API key replaced locally; the MPP client pays and retries the same request with its payment credential. That retry credits the account. If the runtime already wraps fetch with an MPP credential provider, the tool can receive and return the successful credited response directly.

USDC wallet (creating an mppx account makes a wallet, and testnet auto-funds):

bash
npx -y [email protected] https://api.myotp.app/v1/topup -X POST -H "x-api-key: your MyOTP API key" -H "content-type: application/json" -d "{\"credits\":100}"

Card or Link wallet (run npx @stripe/link-cli auth login once first):

bash
npx -y @stripe/link-cli mpp pay https://api.myotp.app/v1/topup -X POST -d "{\"credits\":100}" -H "x-api-key: your MyOTP API key" --context "Buying MyOTP.App credits to send one-time passcodes over SMS, WhatsApp and Telegram for phone verification in my app."

Account creation

The create_account tool calls the live unauthenticated POST /v1/agent/register endpoint with an email and optional name. The response contains the full account record and a 32-character API key that is shown once. Save it immediately and set MYOTP_API_KEY (or configure the hosted client to send it). Agent accounts have an open IP allowlist, need no phone verification, and start with balance 0 and the Starter pay-as-you-go plan.

A confirmation email is sent to the supplied address. A human must click the link within 24 hours to unlock card top-ups; USDC top-ups work immediately. Use get_account_status to check email_verified, balance, plan, and account status, or call it with resend_verification: true to send another email. Then use get_topup_quote or top_up_credits to fund the account before sending an OTP.

Develop

bash
git clone https://github.com/brntech/myotp-agentkitcd myotp-agentkit/mcp-servernpm installnpm run buildnpm run start:stdio   # or start:http

Security notes

  • This server never logs your API key.
  • In HTTP mode, the API key is only read from X-API-Key per request — there is no global key configured at startup.
  • The MyOTP API additionally enforces an IP whitelist; make sure the host running this server (or your end users' IPs in HTTP mode) are on the allow-list for the key in use.
  • Returning the OTP code in plain text (return_otp: true) is intended for testing only — never enable it in production user flows.

License

MIT — see LICENSE.

Built by BroadNet Technologies. Questions? [email protected].

来源:mcp-server/README.md,提交 1842171

工具

10

generate_otp

Send OTP

Send a one-time password (OTP) to a phone number via SMS, WhatsApp, or Telegram. MyOTP.App generates the code, formats the message, picks the best carrier route, and delivers it. Returns a `message_id` (UUID) — keep it; you'll pass it to `verify_otp`, `check_otp_status`, or `extend_otp` later. Each call deducts credits from the account balance; the per-message cost varies by destination country and channel and is returned in the `cost` field. Use this whenever an app needs to verify someone's phone — signup, login 2FA, password reset, transaction confirmation, etc.

输入参数brandchannelotp_codeforce_sendotp_lengthreturn_otpotp_validityphone_number必填template_order

verify_otp

Verify OTP

Verify a code submitted by an end user against the OTP MyOTP delivered. Returns `{status: 'success'}` if the code matches and the OTP hasn't expired — at that point the OTP is consumed and cannot be reused. Returns `{status: 'failed', reason: 'invalid' | 'expired' | 'not found'}` otherwise. You MUST pass either `phone_number` or `message_id` to identify which OTP you're verifying against. Call this after collecting the code from the user (login form, signup screen, etc.).

输入参数otp必填message_idphone_number

check_otp_status

Check OTP delivery status

Check whether a previously sent OTP is still active and (with DLR_ACCESS entitlement on Enterprise plan) get its delivery status. Returns `is_active` (bool) and `expires_at` (ISO timestamp) on every plan. On Enterprise plans, also returns `DLR`: 'delivered', 'sent', 'read', 'pending', or a failure as `failed.<reason>` (on WhatsApp, `failed.Undeliverable` means the number cannot receive WhatsApp and `failed.Provider` means a retry is worth it). Useful when an end user reports they didn't receive the code — you can confirm whether MyOTP delivered it before deciding to resend. Does NOT verify a code; use `verify_otp` for that.

输入参数message_id必填

extend_otp

Extend OTP expiry

Extend the expiry time of an active OTP without sending a new one. Useful when the end user is taking longer than expected to enter the code (e.g., switched apps, dealing with carrier delivery delay). Adds `duration` seconds (60-14400) to the current `expires_at`. Requires the EXTEND_OTP entitlement (Business or Enterprise plan). Some destination countries don't allow extensions — the API will return 403 in that case. Cheaper and less spammy than calling `generate_otp` again.

输入参数duration必填message_id必填

get_account_info

Get account info

Return account details for the API key in use. Always returns at least the account `email`; depending on plan and platform version may also return balance/credit/plan info. Use this as a sanity check when wiring up MyOTP for the first time — if this call succeeds, your API key and IP whitelist are configured correctly.

无需输入参数。

get_usage_report

Get usage report

Fetch a paginated list of OTP transactions for a date range. Each transaction includes message_id, timestamp, phone_number, channel, country, cost, status, and the originating client IP. Date range cannot exceed 31 days. Defaults: last 7 days, page 1, 10 per page. Requires the API_REPORTING entitlement (Business or Enterprise plan). Use this to: audit recent activity, build internal dashboards, reconcile billing, or debug delivery issues across many recipients.

输入参数pageend_dateper_pagestart_date

create_account

Create a MyOTP agent account

Create a MyOTP.App agent account and return its one-time API key. No API key is required for this tool. The new account starts with zero balance; USDC top-ups work immediately, while card top-ups unlock after a human confirms the email address.

输入参数nameemail必填

get_account_status

Get agent account status

Return email verification, balance, plan, and status for the configured MyOTP agent account. Set resend_verification to request another confirmation email first. Unverified accounts can top up with USDC, but cards stay locked.

输入参数resend_verification

get_topup_quote

Get a MyOTP credit top-up quote

Get the live price and payment options for buying MyOTP credits, without making a purchase. Use this when generate_otp or another send fails with HTTP 403 insufficient balance / NoBalance, or before calling `top_up_credits` to show the cost. Returns USDC and card client commands and never exposes the configured API key.

输入参数credits

top_up_credits

Buy MyOTP credits

Prepare or complete an autonomous MyOTP credit purchase with USDC or card through Machine Payments Protocol (MPP). Use this when generate_otp or another send fails with HTTP 403 insufficient balance / NoBalance. The tool quotes first, then returns a structured 402 challenge and exact retry details for the agent's own MPP client; if fetch is already wrapped by a credential-carrying MPP runtime, it returns the credited response directly.

输入参数credits必填dry_run

版本历史

3
  1. v0.1.14最新Oct 13, 2026
  2. v0.1.13Sep 21, 2026
  3. v0.1.12Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Mobilevalidate 集成