<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet" /> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />

Country Data API for AI assistants

Our public MCP server lets Claude, ChatGPT, Cursor and any other MCP client look up countries, states, cities and postal codes directly, with no API key. Coverage is country / state / city / postal code; there is no street-level data.

The endpoint

Streamable HTTP transport, public, no authentication:

https://api.countrydataapi.com/mcp

Machine-readable description: server card.

What you can ask

  • "What is the capital of Portugal?"
  • "Validate the postal code 28013 in Spain."
  • "List the cities in France that start with Mar."
  • "Which states does Germany have?"

How to add it

Claude

Open Settings, go to Connectors, choose "Add custom connector", name it "Country Data API" and paste the endpoint URL. In Claude Code run:

claude mcp add --transport http country-data-api https://api.countrydataapi.com/mcp

ChatGPT

Enable Developer mode in Settings, Connectors, then create a connector with the endpoint URL and authentication set to "No authentication". Availability depends on your plan.

Cursor

Add this to .cursor/mcp.json (or Settings, MCP):

{
  "mcpServers": {
    "country-data-api": {
      "url": "https://api.countrydataapi.com/mcp"
    }
  }
}

Need the REST API instead?

Integrate it in your own code with an API key and a free tier.