{"slug": "mcp-for-auth-in-5-minutes-phone-verification-through-your-ai-agent", "title": "MCP for auth in 5 minutes: phone verification through your AI agent", "summary": "MyOTP.App has introduced an MCP server that lets AI agents send and verify one-time codes via SMS, WhatsApp, or Telegram during development. The server exposes ten tools, including generate_otp, verify_otp, and account management functions, and can be added to clients like Claude Code or Cursor in about five minutes. The tool is designed to let agents handle phone verification without human intervention, including the ability to top up credits automatically.", "body_md": "Most AI coding tutorials stop at \"ask the agent to write code\". This one is about giving the agent a tool it can call, an MCP server, so it can send and verify one-time codes while you're still building. I work at MyOTP.App and this uses our server, so read it with that in mind.\n\nIf you're on Claude Code, Claude Desktop, Cursor, Codex or anything else that speaks MCP, this takes about five minutes.\n\nWhen you ask an agent to \"add phone verification\" with no tool attached, it writes code against an SDK it half remembers. Sometimes that SDK doesn't exist in the version it picked. You find out at runtime.\n\nWith the MCP server attached, \"send a code to my number\" is a tool call. The agent sends a real message, you get a real SMS, and only then do you ask it to write the integration. The code comes after the proof.\n\nThere's nothing to install. `npx`\n\nfetches it on demand.\n\n`*`\n\nwhile you're developing locally.\n\n```\nclaude mcp add myotp -e MYOTP_API_KEY=your-key -- npx -y @myotp/mcp\n```\n\nClaude Desktop, in `claude_desktop_config.json`\n\n:\n\n```\n{\n  \"mcpServers\": {\n    \"myotp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@myotp/mcp\"],\n      \"env\": { \"MYOTP_API_KEY\": \"your-key\" }\n    }\n  }\n}\n```\n\nIf your client can't launch local processes, point it at the hosted server instead: `https://mcp.myotp.app/mcp`\n\n, key in the `X-API-Key`\n\nheader or as `Authorization: Bearer`\n\n. Add `108.61.176.199`\n\nto your key's IP allowlist for that, since hosted calls reach our API from that address and not from your machine.\n\nTen tools. The four you'll use most:\n\n`generate_otp`\n\nsends a code over SMS, WhatsApp or Telegram and returns a transaction id.`verify_otp`\n\nchecks what the user typed.`check_otp_status`\n\ntells you whether the message was queued, sent, delivered or failed, which is where you look first when \"the code never arrived\".`extend_otp`\n\ngives a slow user more time without sending a new code.The rest cover the account: `get_account_info`\n\n, `get_account_status`\n\n, `get_usage_report`\n\n, and three that exist so an agent can run without a human in the loop. `create_account`\n\nregisters a new account and returns a key, `get_topup_quote`\n\nand `top_up_credits`\n\nbuy credits over HTTP 402 through Stripe, by card or USDC. An agent that runs out of credits can refill and carry on.\n\nThe MCP server is a tool for the agent, not a dependency for your app. Your application still calls the REST API from the server side with the key in the `X-API-Key`\n\nheader. The published examples for Next.js, Express, Flask, Django, Rails and Laravel are in the brntech/myotp-agentkit repo and are the copy-paste starting points.\n\nIP allowlisting. A key created from your laptop is allowlisted to your laptop's public IP. When the first call from a server or from the hosted MCP endpoint comes back with a 403 that says the IP isn't allowed, that's the cause, not the key.\n\nDisclosure again: I work at MyOTP.App. If something here is wrong, say so in the comments and I'll fix the post.", "url": "https://wpnews.pro/news/mcp-for-auth-in-5-minutes-phone-verification-through-your-ai-agent", "canonical_source": "https://dev.to/rayas/mcp-for-auth-in-5-minutes-phone-verification-through-your-ai-agent-48om", "published_at": "2026-09-03 22:14:48+00:00", "updated_at": "2026-09-03 22:24:29.737619+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "ai-tools"], "entities": ["MyOTP.App", "Claude Code", "Claude Desktop", "Cursor", "Codex", "Stripe", "npx"], "alternates": {"html": "https://wpnews.pro/news/mcp-for-auth-in-5-minutes-phone-verification-through-your-ai-agent", "markdown": "https://wpnews.pro/news/mcp-for-auth-in-5-minutes-phone-verification-through-your-ai-agent.md", "text": "https://wpnews.pro/news/mcp-for-auth-in-5-minutes-phone-verification-through-your-ai-agent.txt", "jsonld": "https://wpnews.pro/news/mcp-for-auth-in-5-minutes-phone-verification-through-your-ai-agent.jsonld"}}