MCP Integration Guide

Phone-Check.app MCP Server: Phone Validation for AI Agents

Give Claude, Cursor, or any Model Context Protocol client direct access to phone validation, carrier detection, and NPA-NXX enrichment — one endpoint, one API key, no glue code.

3
Tools exposed
1 credit
Per tool call
Free
account_whoami probe
HTTP
Streamable JSON-RPC 2.0

The Model Context Protocol lets AI assistants call external tools through one standard interface — the client discovers the tools on its own, no hand-written HTTP client needed. The server speaks Streamable HTTP: every request is a POST of a JSON-RPC 2.0 message to https://api.phone-check.app/mcp with Accept: application/json, text/event-stream, and every request authenticates with your API key in the x-api-key header.

Connect Your Client

Pick the card that matches your client. Every configuration points at the same endpoint and uses the same host-scoped API key.

Claude Code

One command registers the server for your terminal sessions. Replace YOUR_API_KEY with a key from Account → API keys.
claude mcp add --transport http phone-check https://api.phone-check.app/mcp --header "x-api-key: YOUR_API_KEY"

Claude (claude.ai + Desktop)

Go to Customize → Connectors → Add custom connector and paste the URL below. If your plan supports request headers, add x-api-key: YOUR_API_KEY.
https://api.phone-check.app/mcp

Cursor / VS Code

Open the API reference and click the MCP button — it pre-fills the server URL and authentication for you.

Any MCP Client

Generic Streamable HTTP configuration that works in any client config file.
{
  "mcpServers": {
    "phone-check": {
      "type": "http",
      "url": "https://api.phone-check.app/mcp",
      "headers": { "x-api-key": "YOUR_API_KEY" }
    }
  }
}

Create an API Key

1

Open API keys

Sign in and open Account → API keys.

2

Generate the key

Create a key with phone services enabled from API keys → New.

3

Paste into config

Copy the key and replace YOUR_API_KEY in whichever client configuration you picked above.

Keys are host-scoped: a Phone-Check key works only against the Phone-Check MCP server and API, and keys issued for other products are rejected with error A1003. For a quick evaluation without an account, the demo key demo-key combined with a valid TOTP code in the x-ct header unlocks rate-limited access.

Raw JSON-RPC Walkthrough

Every MCP client runs the same two steps under the hood. First send initialize — the server replies with its capabilities plus agent instructions covering authentication and billing, so the model learns the rules without extra prompting:

curl -X POST https://api.phone-check.app/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl-demo","version":"1.0.0"}}}'

Then call a tool — phone_validate with +14155552671 — and read the JSON-RPC response:

curl -X POST https://api.phone-check.app/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"phone_validate","arguments":{"phone":"+14155552671"}}}'

The server responds with the tool result as a JSON payload inside the MCP content block:

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"valid\":true,\"country\":\"US\",\"carrier\":\"AT&T\",\"type\":\"MOBILE\",\"disposable\":false}"
      }
    ]
  }
}

Tool Reference

ToolPurposeNotes
account_whoamiReturns the identity and credit balance behind the API keyFree — costs no credits; ideal health check after key rotation
phone_validateValidates format, country, line type, carrier, and disposable status1 credit per call — the core validation tool
phone_lookup_npa_nxxUS/CA NPA-NXX carrier and geographic enrichment1 credit per call — North American numbering plan data

Billing & Errors

Each tool call costs 1 credit, with one exception: account_whoami is free, so agents can verify their key and identity before spending anything. No per-tool tiers, no hidden multipliers — the REST API and the MCP server bill identically.

HTTP 402 — out of credits

The account ran out of credits. Top up at /pricing and retry the call — treat it as a billing signal, not a validation failure.

A1003 — cross-host key

The key was issued for a different product host. Keys never fall back across hosts; create a Phone-Check key instead.

Discovery Surfaces

  • /llms.txt — crawler- and agent-readable map of the site and API surfaces.
  • /.well-known/mcp/server-card.json — machine-readable MCP server card with the transport endpoint.
  • /open-api — Scalar API reference with an MCP panel; inspect the REST contract behind every tool and connect in one click.

Frequently Asked Questions

Which MCP clients are supported?

Any client that speaks the Streamable HTTP transport: Claude Code, Claude on claude.ai and Desktop, Cursor, VS Code, and SDKs that implement the http server type. The same JSON-RPC 2.0 flow also works over plain curl.

Can I try the MCP server without an account?

Yes, in a limited way: send the demo key demo-key in x-api-key with a valid TOTP in the x-ct header. It is rate-limited and meant for quick evaluation.

Do MCP tool calls cost the same as REST calls?

Yes. Every tool call maps to the same underlying endpoint and costs 1 credit. account_whoami is free on both surfaces.

Why was my API key rejected with error A1003?

Keys are host-scoped. A Phone-Check key only works against the Phone-Check MCP server and API; keys issued for other products are rejected with A1003 instead of falling back to another tenant.

Give Your Agents Phone Intelligence

One endpoint, one API key, three production-ready tools — connected in under a minute.