Developers

Real API and MCP access

Run the public JSON API below, download its OpenAPI contract, inspect live service status, or connect an MCP client to the same country-calling-code lookup logic. No authentication is required for these read-only interfaces.

Live service endpoints

API statusLive health, version and dataset countsOpen endpoint
Search APIFilter by query, ISO code, calling code or regionOpen endpoint
Direct lookupLookup by ISO, slug, name or calling codeOpen endpoint
OpenAPI 3.1Machine-readable REST contractOpen endpoint
MCP endpointStreamable HTTP server and browser discovery responseOpen endpoint
MCP manifestOfficial MCP Registry server.json formatOpen endpoint

Try the REST API

The API accepts cross-origin GET requests and returns HTTP 400 with field-level details for invalid parameters. Responses include an API version header and links back to this documentation and the OpenAPI contract.

Live API explorer

This form calls the deployed JSON route directly. No sample response is hard-coded.

GET /api/calling-codes?code=GB&include=examples
Response
Select parameters and run the request.

cURL

curl --get 'https://countrycalling.codes/api/calling-codes' \
  --data-urlencode 'code=GB' \
  --data-urlencode 'include=examples'

JavaScript

const response = await fetch(
  'https://countrycalling.codes/api/calling-codes?code=GB'
)
if (!response.ok) throw new Error(await response.text())
const data = await response.json()

Connect the MCP server

The remote endpoint implements MCP over Streamable HTTP and exposes the read-onlylookup_country_calling_codetool. It returns both text content and schema-backed structured content.

{
  "mcpServers": {
    "country-calling-codes": {
      "type": "streamable-http",
      "url": "https://countrycalling.codes/api/mcp"
    }
  }
}
  • No API key or OAuth flow is required.
  • Tool calls use the same tested accessor as REST and country pages.
  • The server publishes an official Registry-format manifest.
  • Requests are read-only and do not validate live subscriber status.

Scope and reliability

These interfaces provide static calling-code and reviewed formatting guidance. They do not perform HLR, carrier, reachability, ownership or consent checks. Source dates and limitations travel with reviewed example records.