Back to Blog
Developer ResourcesMarch 28, 20265 min read

How to Use AgentCall MCP Server with OpenAI Codex in VS Code

Connect AgentCall's 19 phone tools to OpenAI Codex CLI via MCP. Provision numbers, send SMS, extract OTP codes, and make AI voice calls from your terminal.

OpenAI Codex is a coding agent that runs in your terminal with full MCP support. By connecting AgentCall's MCP server, you can give Codex the ability to provision phone numbers, send SMS, extract OTP verification codes, and make AI-powered 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 phone number, 10 SMS/month, 5 call minutes, and 5 OTP extractions. No credit card required.

Step 2: Configure AgentCall MCP in Codex

Codex reads MCP server configuration from ~/.codex/config.json. Add AgentCall to the mcpServers section:

{
  "mcpServers": {
    "agentcall": {
      "command": "npx",
      "args": ["-y", "@agentcall/mcp-server"],
      "env": {
        "AGENTCALL_API_KEY": "ac_live_your_key_here"
      }
    }
  }
}

Save the file and restart Codex. It will automatically discover all 19 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 19 AgentCall tools available:
- provision_number — Provision a new phone number
- send_sms — Send an SMS message
- get_otp_code — Wait for and extract OTP verification codes
- initiate_ai_call — Start an AI voice conversation
... and more

Step 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 get_otp_code — waiting 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: Hosted MCP Server

Instead of running npx locally, you can point Codex to AgentCall's hosted HTTP endpoint. Update your config:

{
  "mcpServers": {
    "agentcall": {
      "type": "url",
      "url": "https://agentcall-mcp-production.up.railway.app/mcp?apiKey=ac_live_your_key_here"
    }
  }
}

Alternative: Via Smithery

AgentCall is listed on Smithery, the largest MCP server registry. Connect via the Smithery gateway:

{
  "mcpServers": {
    "agentcall": {
      "type": "url",
      "url": "https://agentcall--agentcall.run.tools"
    }
  }
}

All 19 Tools

Once connected, Codex has access to the full AgentCall toolkit:

  • Phone Numbers: provision_number, list_numbers, get_number, release_number
  • SMS: send_sms, get_sms_inbox, get_otp_code
  • Voice: initiate_call, initiate_ai_call, get_call_status, get_call_transcript, list_calls
  • Webhooks: create_webhook, list_webhooks, delete_webhook
  • Account: get_usage, get_plan, list_invoices, get_account

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
  • 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

AgentCall's free plan is enough to get started. No credit card, no trial period.

  • Free: 1 number, 10 SMS/mo, 5 call min/mo, 5 OTP extractions/mo
  • Pro ($29/mo): Unlimited everything + SIM numbers, call recording, AI voice calls

Next Steps

Questions? Email us at support@agentcall.co.

Ready to get started?

Give your AI agents their own phone numbers in minutes.

Start Building