MCP (Model Context Protocol)
Use Dial x402 as an MCP server for any AI agent framework.
MCP Integration
One-click setup — review the prompt in your editor, then confirm. Manual config snippets are on each page.
Dial can be used as an MCP server, giving any MCP-compatible agent (Claude Desktop, Cursor, Codex, OpenClaw, etc.) access to telephony and OSINT primitives.
One-click install: Connect MCP — black Add to Cursor / Claude / Codex buttons with deeplinks plus copy-paste config.
MCP Tools
| Tool | Description | x402 Price |
|---|---|---|
dial_send_sms | Send SMS to a phone number | $0.10 |
dial_lookup_phone | Reverse phone number lookup | $0.05 |
dial_breach_search | Search breach data | $0.05 |
dial_buy_credits | Buy prepaid credits | $0.10 |
dial_check_balance | Check credit balance | Free |
Remote server (Streamable HTTP)
Hosted MCP at https://payphone.wtf/mcp — POST only (do not open in a browser).
OAuth (Cursor / Claude Desktop)
Dial implements MCP OAuth (RFC 8414 + PKCE + dynamic client registration) so IDEs can show a Login → browser → Logout flow like Vercel and PostHog:
| Endpoint | Purpose |
|---|---|
GET /.well-known/oauth-authorization-server | OAuth metadata |
GET /.well-known/oauth-protected-resource | MCP resource metadata |
POST /oauth/register | Dynamic client registration (Cursor DCR) |
GET /oauth/authorize | Start login → /connect/mcp/oauth (Privy) |
POST /oauth/token | Exchange code / refresh token |
After login, MCP requests include Authorization: Bearer …. Paid tools debit Payphone credits when you are logged in and have balance; otherwise they prompt for x402 USDC on Base (same as headless agents without OAuth).
Set DIAL_MCP_OAUTH_REQUIRED=true in production only after verifying Cursor login and x402-only MCP clients in staging. Default false keeps headless x402 clients working when the OAuth secret is configured.
Configuration by client
| Client | Guide | Connect |
|---|---|---|
| Cursor | Cursor integration | Add MCP → Cursor |
| Claude Code / Desktop | Claude Code | Add MCP → Claude |
| Codex | Codex integration | Add MCP → Codex |
Cursor (.cursor/mcp.json + OAuth)
Add to .cursor/mcp.json, reload MCP, then click Login on the dial server for OAuth (Payphone/Privy). A Cursor marketplace plugin is coming soon.
See Cursor integration and Connect MCP → Cursor.
{
"mcpServers": {
"dial": {
"url": "https://payphone.wtf/mcp"
}
}
}Paid tools without OAuth use x402 payment on Base (withPayment() from x402-mcp). With OAuth login, credits are used automatically when your Payphone balance is sufficient.
Deploy requirement: run migration scripts/sql/0036_mcp_oauth.sql.
Local stdio server
Claude Desktop
Add to ~/.claude/mcp.json:
{
"mcpServers": {
"dial": {
"command": "npx",
"args": ["@dial/mcp"],
"env": {
"DIAL_API_URL": "https://payphone.wtf",
"DIAL_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY"
}
}
}
}Cursor (stdio)
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"dial": {
"command": "npx",
"args": ["@dial/mcp"],
"env": {
"DIAL_API_URL": "https://payphone.wtf",
"DIAL_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY"
}
}
}
}x402 Payment Flow in MCP
When an MCP tool requires payment:
- The MCP server calls the Dial API
- If the response is
402, it automatically signs an x402 payment - Payment settles on Base in ~1 second
- The result is returned to the agent
The agent never needs to handle payment logic — it's all transparent.
Deprecated alias → /api/v1/numbers/buy POST
**Deprecated.** Rewrites to `/api/v1/numbers/buy`. Reason: renamed numbers/buy. This alias stays in place by default — we keep aliases around indefinitely. See the [stability policy](https://payphone.wtf/docs/api-reference/stability) and [`GET /api/v1/deprecations`](/api/v1/deprecations) for the live rolling sunset.
Claude Code
Use Dial x402 telephony primitives directly from Claude Code.