Перейти к содержимому
MCP ServerProtocol 2025-03-26
Streamable HTTP / SSE • Operational • Multi-Client Ready

Connect AI Agents directly to
real physical non-VoIP telephony.

Equip Cursor, Claude Code, Windsurf, Copilot, and custom autonomous AI coding assistants with high-fidelity Model Context Protocol tools to provision phone lines, check carrier routing, and read OTP verification codes hands-free during development and QA testing.

MCP STREAMABLE ENDPOINTStreamable HTTP
https://www.temphonenumber.com/api/mcp
Protocol: Streamable HTTP (JSON-RPC 2.0)Auth: API Key / Bearer
Overview
•

What is the temphonenumber MCP Server?

The Model Context Protocol (MCP) is an open specification that enables LLMs and autonomous developer agents (like Cursor, Claude Code, VS Code Copilot, and Windsurf) to securely access external tools and data sources.

By adding temphonenumber's MCP server configuration to your AI editor, your agent can autonomously provision non-VoIP numbers, query pricing rates across 150+ countries, receive incoming SMS verification codes in real-time, and report failed activations without you having to manually leave your editor.

Zero Manual Context Switching

Tell your agent "Create a test WhatsApp account and fetch the OTP code" and watch it execute directly in your terminal.

Real Non-VoIP SIM Lines

Bypasses virtual number anti-fraud filters with genuine tier-1 cellular lines on AT&T, Verizon, and Vodafone networks.

Streamable HTTP Transport

High-speed SSE serverless streaming protocol compliant with official 2025-03-26 MCP specifications.

Connection

Server Endpoint & Authentication

The MCP server is hosted at a high-availability streaming endpoint. Authentication can be performed via custom HTTP request headers or Bearer JWT token exchange.

Connection Details

URL:https://www.temphonenumber.com/api/mcp
Transport:Streamable HTTP / SSE
Protocol Version:2025-03-26
Content-Type:application/json

Required Auth Headers

x-client-idRequired

Your public developer Client ID from the developer settings portal.

x-client-secretRequired

Your private developer Client Secret key.

Client Setup

Supported AI Clients & IDE Setup

Choose your AI coding environment below for ready-to-copy JSON configuration files and one-command CLI setup:

Cursor Integration

Configure Cursor IDE to communicate directly with remote MCP servers.

Installation Steps:
  1. 1Open Cursor settings and find MCP servers, or edit ~/.cursor/mcp.json directly.
  2. 2Under the "mcpServers" key, attach the temphonenumber server block.
  3. 3Insert your developer x-client-id and x-client-secret headers.
  4. 4Save the file and verify the green status dot appears next to temphonenumber.
  5. 5Ask Cursor Composer to rent a phone number or check messages.
~/.cursor/mcp.json
{
  "mcpServers": {
    "temphonenumber": {
      "type": "streamableHttp",
      "url": "https://www.temphonenumber.com/api/mcp",
      "headers": {
        "x-client-id": "YOUR_CLIENT_ID",
        "x-client-secret": "YOUR_CLIENT_SECRET",
        "Mcp-Protocol-Version": "2025-03-26"
      }
    }
  }
}
Tools Reference

Available MCP Tools Catalog

The MCP server exposes 7 core actions that allow agents to query balances, list pricing catalogs, provision phone numbers, and stream SMS messages:

get_balanceRead

Returns account credit balance, currency, and subscription status.

Example Agent Prompt:

"Check my current account balance."

search_countriesRead

Lists available countries, carriers, and non-VoIP stock pricing.

Example Agent Prompt:

"Find available phone numbers for Telegram in the US."

order_numberWrite

Leases a short-term or long-term non-VoIP phone number for a specified service.

Example Agent Prompt:

"Rent a US phone number for WhatsApp verification."

get_messagesRead

Polls incoming SMS verification codes and OTP text messages.

Example Agent Prompt:

"Check incoming SMS messages for my active rental."

flag_numberWrite

Flags an invalid or non-receiving number for immediate refund.

Example Agent Prompt:

"Flag the number +14155552671 because no code arrived."

get_active_numbersRead

Lists all currently active rented lines, expiration timers, and history.

Example Agent Prompt:

"List all my active rented phone numbers."

Interactive MCP Tool Tester
Protocol 2025-03-26
Simulated JSON-RPC Response:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "status": "Ready to execute. Click Execute button on the left."
  }
}
Agent Prompts

AI Agent Prompt Templates

Drop these pre-tested prompt instructions into your cursor rules (.cursorrules) or project instructions to train your agent on automated telephony workflows:

Check Account Balance & Active Leases

Instructs the agent to fetch your live balance and list active phone lines.

"Use the get_balance and get_active_numbers tools to check my current wallet balance and show all currently leased phone numbers with their expiration times."
Rent WhatsApp Number & Wait for OTP

Automates leasing a phone number and polling for the verification code.

"Use order_number to rent a US phone number for WhatsApp. Then poll get_messages every 5 seconds until the 6-digit OTP code arrives and print it clearly."
Flag Stale Number & Auto-Refund

Instructs the agent to flag a non-responsive number and trigger an instant refund.

"If no SMS arrives within 3 minutes for my leased line, use the flag_number tool to flag it and request an immediate refund to my account balance."
CLI Inspection

Testing Server Health & Tools via cURL

You can directly invoke the MCP JSON-RPC 2.0 interface using raw cURL commands in your terminal:

Terminal cURL Call
curl -sS "https://www.temphonenumber.com/api/mcp" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "x-client-id: YOUR_CLIENT_ID" \
  -H "x-client-secret: YOUR_CLIENT_SECRET" \
  -H "Mcp-Protocol-Version: 2025-03-26" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_balance","arguments":{}}}'
Troubleshooting

Troubleshooting & Common Issues

Quick diagnostic solutions for common connection and authentication edge cases:

Authentication Error (401 Unauthorized)

Ensure your x-client-id and x-client-secret headers are provided correctly in your client configuration file.

Server Connection Timeout

Verify that streamableHttp transport mode is enabled and your network firewall allows HTTPS POST requests to the MCP endpoint.

Tool Not Found (404)

Confirm that your AI client sends the Mcp-Protocol-Version: 2025-03-26 header during initialize handshake.

FAQ

Frequently Asked Questions

Is there any extra cost for using the MCP server compared to the REST API?

No. The MCP server is completely free to connect and query. Standard per-number pricing rates apply only when your agent successfully purchases a phone number.

How does the agent wait for incoming SMS verification codes?

When your agent calls check_messages, the server returns immediately with received messages or instructs the agent to retry within the 15-20 minute rental session window.

What happens if an SMS OTP verification code is not delivered?

Our automatic refund guarantee immediately returns credits to your wallet balance if no SMS is received within the rental session. The agent can also explicitly call flag_number to cancel immediately.

Was this MCP documentation helpful?

Help us improve our developer integrations.