OpenAI Codex is a coding agent that runs in your terminal with MCP support. By connecting AgentCall's MCP server, you can give Codex the ability to provision phone numbers, send SMS, extract OTP verification codes, configure inbound AI receptionists, and place outbound AI voice calls, all without leaving your development environment.
This guide shows you how to set it up in under 2 minutes.
What You Need
- OpenAI Codex. Install via CLI (
npm install -g @openai/codex) or search "Codex" in the VS Code Extensions Marketplace and install the official OpenAI extension directly. - An AgentCall API key (free at agentcall.co/sign-up).
Step 1: Get Your AgentCall API Key
Sign up at agentcall.co/sign-up and grab your API key from the dashboard. It starts with ac_live_.
The Free plan includes 1 US or Canada local number with no card on file (subsequent numbers and non-US/CA countries require a card), 10 SMS/month, 5 call minutes, 5 OTP extractions, and a 5-minute monthly trial of inbound AI voice.
Step 2: Configure AgentCall MCP in Codex
Codex reads MCP server configuration from ~/.codex/config.toml (TOML, not JSON), and currently supports stdio (local subprocess) MCP servers only. Add this block:
[mcp_servers.agentcall]
command = "npx"
args = ["-y", "@agentcall/mcp-server"]
[mcp_servers.agentcall.env]
AGENTCALL_API_KEY = "ac_live_your_key_here"Save the file and restart Codex. It launches the npm package as a subprocess and auto-discovers all 23 AgentCall tools.
Step 3: Verify the Connection
Launch Codex and ask it about phone tools:
You: What phone tools do you have access to?
Codex: I have 23 AgentCall tools available:
- provision_number. Provision a new phone number.
- send_sms. Send an SMS message.
- wait_for_otp. Long-poll for OTP verification codes.
- initiate_ai_call. Start an AI voice conversation.
- configure_inbound_ai. Set up an inbound AI receptionist.
... and moreStep 4: Use Phone Tools in Your Workflow
Here are practical examples of what Codex can do with AgentCall:
Automated QA Testing
You: I need to test the signup flow on my staging app. Provision a number,
enter it in the form at staging.myapp.com, and verify the OTP.
Codex: I'll handle the full flow:
1. [Calls provision_number] Got +1 (312) 555-0198
2. [Enters number in signup form]
3. [Calls wait_for_otp, polling for SMS]
4. OTP received: 592741
5. [Enters code in verification field]
Signup verified successfully.Send Notifications
You: Send an SMS to +12125559876 saying "Deployment completed successfully"
Codex: [Calls send_sms]
Message sent from +1 (312) 555-0198.AI Voice Calls
You: Call +12125559876 and schedule a meeting for next Tuesday at 2pm
Codex: [Calls initiate_ai_call with scheduling prompt]
Call completed. Meeting confirmed for Tuesday at 2:00 PM.
Full transcript available.Alternative: Via Smithery
AgentCall is listed on Smithery, the largest MCP server registry. Install via the Smithery CLI, which writes the right config for your client:
npm install -g smithery
smithery mcp add agentcall/agentcall \
--headers '{"agentcallApiKey":"ac_live_your_key_here"}'Smithery also hosts its own MCP URL for the server at https://agentcall--agentcall1.run.tools. If a future Codex release adds remote HTTP MCP support, you can point Codex at that URL directly. For now, stick with the stdio config above.
What about a Hosted Endpoint?
AgentCall's native hosted MCP endpoint is https://api.agentcall.co/mcp, with Authorization: Bearer ac_live_.... It works in Claude Desktop, Claude Code, Cursor, and Windsurf. Codex doesn't support remote HTTP MCP servers yet, so for Codex specifically use the stdio config in Step 2 (or install via Smithery, which runs the same npm package as a subprocess).
All 23 Tools
Once connected, Codex has access to the full AgentCall toolkit, plus four built-in MCP prompts (setup-agent-phone, send-and-track-sms, ai-outbound-call, setup-inbound-ai-receptionist):
- Phone Numbers: provision_number, list_numbers, get_number, release_number, configure_inbound_ai, disable_inbound_ai
- SMS: send_sms, get_inbox, get_message, wait_for_otp
- Voice: initiate_call, initiate_ai_call, get_call, hangup_call, get_call_transcript, list_calls
- Webhooks: create_webhook, list_webhooks, rotate_webhook_secret, delete_webhook
- Usage: get_usage
AgentCall + Codex Use Cases
- Automated end-to-end testing of SMS verification flows in CI/CD
- AI-powered outbound calling for sales, scheduling, and surveys
- Inbound AI receptionist setup driven from your terminal
- Real-time SMS notifications from your development pipeline
- Phone number provisioning for multi-tenant SaaS apps
- OTP extraction for automated account creation in testing
Pricing
- Free: 1 US/CA local number (cardless), 10 SMS/mo, 5 call min/mo, 5 OTP extractions/mo, plus a 5-minute monthly trial of inbound AI voice. Subsequent numbers require a card.
- Pro ($19.99/mo): Unlimited numbers ($2/mo each), call recording at $0.01/min, AI voice at $0.40/min with 10 voice options including the natural-sounding marin and cedar. Post-call email summaries are included on any plan with inbound AI configured.
Next Steps
- Sign up for free
- API documentation
- AgentCall on Smithery announcement
- Using AgentCall with Claude Code
- MCP Server documentation
Questions? Email support@agentcall.co.