The hosted MCP server uses HTTP transport (streamable-HTTP). Every request must include your API key in an
x-api-key header. An env entry only supplies credentials to a local server process.Codex CLI
Add this table to~/.codex/config.toml. If an agentsim table already exists, update it instead of adding a duplicate:
x-api-key header. The 150-second tool limit leaves time for a 120-second SMS wait. This setup is for Codex CLI; an already-running desktop app does not automatically receive this terminal’s environment. See Codex MCP configuration for other setup options.
Give Codex browser access
AgentSIM receives the SMS. Codex also needs a browser tool to enter the phone number and submit the code on your app. If it already has browser access, keep that setup. Otherwise, install the Playwright MCP server using its documented prerequisites, then add it:Claude Desktop
Install uv souvx is available. In Claude Desktop, open Settings → Developer → Edit Config and add the local AgentSIM server:
asm_live_... with your API key. On macOS, this configuration is at ~/Library/Application Support/Claude/claude_desktop_config.json. Restart Claude Desktop after saving.
Claude Code
Cursor
Add to~/.cursor/mcp.json for your own use, or .cursor/mcp.json for a project:
Other MCP clients
Any MCP-compatible client that supports HTTP transport can connect using the same configuration shape:- Transport: HTTP (streamable-HTTP)
- URL:
https://mcp.agentsim.dev/mcp - Request header:
x-api-key: YOUR_API_KEY
mcp-session-id header. The session_id returned by AgentSIM tools identifies your challenge across tool calls.
Verify your connection
Once connected, open a new chat and ask:“List my active AgentSIM challenge sessions.”The assistant should call
list_numbers and return your active sessions, or confirm that there are none. This checks the connection without opening a live session.
If the tools are missing, check the configuration path and restart your client. If the server returns 401, check that your key is active and that the hosted configuration sends the x-api-key header.
When you’re ready for real SMS, check your remaining free allowance. No card is required. Use open_challenge with the public HTTPS service_url of an app you own. Have that app send the code to the returned number, then call wait_for_verdict. Submit the received code in your app and confirm that sign-in succeeded before calling release_number. Always release the session on failure too.
Each successful number assignment or extension uses one session from your live allowance; the console demonstration remains free.