get_messages
List all SMS messages received in this session without consuming the OTP.
Use this to inspect raw messages or check if an SMS arrived before calling wait_for_otp. Does NOT mark the OTP as consumed.
Lease a temporary phone number, wait for the SMS code, and release it — SMS OTP flows an agent can complete on its own.
LABSCO SUMMARY
The blocking wait is the design that makes it usable — the agent asks for the code and gets it, instead of polling and reasoning about whether the message has landed. Sessions hold real allocations, so releasing them matters, and list_numbers exists precisely to find the ones a failed run left behind.
An MCP server for AgentSIM. It gives an agent a programmable phone number to receive SMS one-time codes, blocks until the code arrives, and returns it — so a signup or login flow that needs a text message can be finished without a human holding a handset.
An AgentSIM API key in AGENTSIM_API_KEY, from console.agentsim.dev. Clients run uvx agentsim-mcp over stdio, or connect to the hosted server at https://mcp.agentsim.dev/mcp over Streamable HTTP with the key in an x-api-key header. Numbers are US only.
One command plus a key — uvx agentsim-mcp, then supply credentials
USE CASES
Lease a number, use it in the form, wait for the code and release the number afterwards.
Read the raw messages that arrived without consuming the code, to check the wording and timing.
List the active sessions on the account and release the ones nothing is using.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
get_messagesList all SMS messages received in this session without consuming the OTP.
Use this to inspect raw messages or check if an SMS arrived before calling wait_for_otp. Does NOT mark the OTP as consumed.
list_numbersList active sessions, optionally filtered by agent_id.
Use this to check for leaked sessions or inspect what numbers are currently active in your account.
provision_numberLease a temporary programmable phone number for receiving SMS OTP codes.
Returns the phone number (e164 format) and a session_id needed for all subsequent calls. The number is reserved for your session for ttl_seconds.
Next step: use the returned number on your target service to trigger an SMS, then call wait_for_otp with the returned session_id.
release_numberRelease a provisioned number back to the pool.
Always call this when you are done with the session — even on error — to avoid consuming pool capacity unnecessarily.
wait_for_otpBlock until an SMS OTP arrives for this session, then return the code.
Polls the AgentSIM API for up to timeout_seconds. Returns the OTP code and the message it was extracted from.
If the OTP does not arrive in time, raises a ToolError with advice on retrying. Always call release_number after you have used the OTP.
BEFORE YOU INSTALL
5 tools when we connected; the project documents 7. The two missing are the primary tools, open_challenge and wait_for_verdict; provision_number and wait_for_otp are backward-compatibility aliases for them. open_challenge also covers email OTP, magic links and WebAuthn, not just SMS.
Both documented clients run the server on your machine.
INSTALLATION
uvx agentsim-mcphttps://mcp.agentsim.dev/mcpAdd this hosted endpoint to your MCP client using the credentials listed under Requirements.
claude mcp add agentsim -e AGENTSIM_API_KEY=<YOUR_AGENTSIM_API_KEY> -- uvx agentsim-mcp{
"mcpServers": {
"agentsim": {
"command": "uvx",
"args": [
"agentsim-mcp"
],
"env": {
"AGENTSIM_API_KEY": "<YOUR_AGENTSIM_API_KEY>"
}
}
}
}