TempMail OTP MCP
Pricing
from $0.01 / 1,000 results
TempMail OTP MCP
TempMail & OTP Extractor MCP server for AI Agents. Instantly generate temporary emails, auto-poll inboxes, and extract verification codes or activation links. Perfect for registration automation.
Pricing
from $0.01 / 1,000 results
Rating
5.0
(5)
Developer
REXREUS D.O
Maintained by CommunityActor stats
2
Bookmarked
6
Total users
4
Monthly active users
21 days ago
Last modified
Categories
Share
๐ง TempMail OTP MCP - Apify Actor
Automate account registrations seamlessly. This Actor provides a high-performance temporary email service and automatic OTP extraction via the Model Context Protocol (MCP).
๐ Overview
AI Agents struggle with checking emails during sign-up workflows. This MCP server simplifies the process into a few direct tool calls.
- On-Demand & Cost-Efficient: Connect only when you need an OTP. Each
wait_for_otpcall returns within ~45 s (under the typical 60 s MCP request timeout) โ if no mail arrived yet it returnsstatus: "pending", and the agent simply calls again. An idle connection auto-shuts down (default 5 min) so it never keeps burning compute in the background. - No More Timeouts: Because a single call is time-boxed, you never hit the dreaded
-32001 Request timed out. Long waits are handled by re-calling, not by holding one long request open. - Fast Startup: The heavy Apify SDK is loaded lazily, so the MCP handshake completes in ~2 s.
- Smart Extraction: Built-in multi-strategy logic identifies verification codes and links (numeric, keyword-proximity, verification URL, custom regex, with a full-text fallback for the agent).
- Customizable: Optional tool prefixing supported via Actor configuration.
๐ก Recommended Usage Pattern (important)
Do NOT keep the MCP server connected the whole time. Connect โ create an email โ do your registration โ wait for the OTP โ disconnect. Staying connected idle is expensive and increases failure rate. This Actor is designed for short, on-demand sessions and will auto-exit when idle.
๐ ๏ธ MCP Tools
| Tool Name | Description | Key Inputs |
|---|---|---|
create_email | Generates a new temporary email | provider (optional), username (optional) |
list_inbox | Lists messages in the inbox | token, provider (optional) |
wait_for_otp | Magic Tool: Waits up to ~45 s then extracts the code. Returns status: "pending" if nothing arrived yet โ just call again. | token, pollingTimeoutSecs (optional, capped at 45), pollingIntervalSecs (optional), customRegex (optional), provider (optional) |
๐ Integration Guide & Agent Skills
๐ค Configuration for AI Agents (Roo Code, Claude, etc.)
Add this to your MCP settings. This command runs the Actor on Apify's infrastructure and tunnels the MCP protocol through Stdio.
{"mcpServers": {"tempmail-otp": {"command": "npx","args": ["-y","apify-cli","actor:run","rexreus/tempmail-otp-mcp","--pipe","-i","{\"toolPrefix\": \"\", \"defaultProvider\": \"mail.tm\"}"],"env": {"APIFY_TOKEN": "YOUR_APIFY_TOKEN"}}}}
Note: The --pipe flag is essential for MCP to ensure stdio communication works correctly.
๐ง Agent Instructions: How to perform "OTP Flow"
If you are an AI Agent, read this carefully to understand your mission:
1. Identify available tools
Upon connection, you will see create_email, list_inbox, and wait_for_otp.
2. Execution Workflow
- Action: Call
create_email. - Analysis: Extract the
addressandtokenfrom the response.- Example Response:
{"address": "xyz@mail.tm", "token": "SECRET_TOKEN"}
- Example Response:
- External Task: Use the
addressto register on the website you are currently browsing. - Action: Immediately call
wait_for_otpwith thetokenyou saved.- Each call waits up to ~45 s (this stays safely under the MCP client's request timeout).
- Logic:
- If the tool returns an
otp, submit it on the website. - If the tool returns
status: "pending"(no mail yet), callwait_for_otpagain with the sametoken. Repeat until you get the code or you decide to give up. - If the tool returns
otp: nullbut gives youfull_text, read the body and find the verification code yourself.
- If the tool returns an
- Finish: Once you have the OTP, disconnect. Do not keep the session open โ it costs money and the server will auto-exit when idle anyway.
3. Creating multiple accounts
You can call create_email multiple times in a single session. Each call generates a unique identity. Always keep track of which token belongs to which address.
๐ Step-by-Step Example: Registering on Facebook
Here is a practical simulation of how an AI Agent handles a registration flow on Facebook using this MCP:
-
Initialize Session: The agent calls
create_emailto generate a temporary inbox:// Tool Call: create_email{}Response:
{"address": "john.doe.7f3a@wshu.net","token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9..."} -
Navigate & Fill Form: The agent navigates to the registration page (e.g.,
https://www.facebook.com/r.php) and inputs the registration details:- First name:
John - Last name:
Doe - Mobile number or email:
john.doe.7f3a@wshu.net - Password:
SecurePassword123! - Date of Birth & Gender The agent clicks the Sign Up button.
- First name:
-
Await Verification Code: Facebook prompts for a 5-digit security code sent to the email. The agent immediately triggers
wait_for_otp:// Tool Call: wait_for_otp{"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9..."}Response:
{"subject": "12345 is your Facebook confirmation code","otp": "12345","strategy": "numeric"} -
Complete Registration: The agent extracts the OTP code
12345from the response, inputs it into the Facebook confirmation form, and submits it to successfully create the account. (If the firstwait_for_otphad returnedstatus: "pending", the agent would simply call it again with the same token until the code arrived, then disconnect.)
๐ Example Prompts for Users to Trigger the Agent
If you are a user, you can copy-paste these prompts directly into your AI Agent (equipped with this MCP) to execute automated sign-up tasks:
- General Sign-Up:
"Register a new account on [WEBSITE_URL] using the tempmail-otp MCP server. Generate a temporary email, sign up on the page, poll the inbox for the OTP, submit it, and tell me the login credentials."
- Specific Provider Sign-Up:
"Create a new profile on [WEBSITE_URL]. Call the create_email tool using the 'tempmail.lol' provider, then fill out the sign-up form, wait for the verification code using wait_for_otp, and complete the registration."
- Verification Link Flow (e.g., GitHub/Discord):
"Go to [WEBSITE_URL] and start the registration process. Create a temp email address, use it to register, and wait for the verification email. If the server extracts a confirmation URL instead of a numeric code, follow that link to verify the account."
- Multiple Registrations:
"Create 3 mock user accounts on [WEBSITE_URL] using different temporary email addresses. Track the generated email addresses and tokens, perform registration for each, and output a table containing the created emails and their registration status."
๐ ๏ธ Detailed Tool Reference
create_email
- Goal: Create a new session.
- Inputs:
provider(mail.tm/tempmail.lol),username(optional). - Output: Returns
addressandtoken.
wait_for_otp
- Goal: Poll (time-boxed) and parse the newest email.
- Inputs:
token(required),pollingTimeoutSecs(optional, capped at 45 s),pollingIntervalSecs(optional),customRegex(optional). - Output:
- On success:
{ otp, subject, strategy }. - When no mail arrived within the window:
{ status: "pending", otp: null, message }โ call again with the same token. - When mail arrived but the code could not be auto-detected:
{ otp: null, subject, full_text }โ let the agent readfull_text.
- On success:
โ๏ธ Actor Configuration
Input Parameters (INPUT_SCHEMA.json)
toolPrefix: Optional string to prepend to tool names (e.g.,tm_->tm_create_email).defaultProvider: Default email provider to use (mail.tmortempmail.lol).pollingTimeoutSecs: How long a singlewait_for_otpcall waits (default:45). Capped at 45 s so it never exceeds the ~60 s MCP client request timeout; the agent re-calls whilestatusispending.idleTimeoutSecs: Auto-shutdown after this many seconds without any tool call, so an idle connection stops burning compute (default:300, set0to disable).
Output Schema (Dataset)
For platform auditing, tool calls push a record to the Apify dataset (fire-and-forget, so it never slows down a tool call):
{"event": "otp_extracted","provider": "mail.tm","subject": "Your verification code","otp": "185655","strategy": "numeric","success": "true"}
Note on irregular OTPs: If the extraction logic cannot identify the OTP structure, the tool will return otp: null along with the full email body (full_text). AI Agents will easily extract it semantically from the text.
๐ก๏ธ Privacy
- Email accounts are ephemeral and provided by third-party temp mail services.
- Always use for temporary registrations only.
Built for the next generation of full AI automation.
