list_countries

Pack: country-state-city · Endpoint: https://gateway.pipeworx.io/country-state-city/mcp

List all countries with ISO codes, capitals, phone codes, currencies, and regions. Returns ~250 countries. Useful for building dropdowns or validating country data.

Parameters

NameTypeRequiredDescription
_apiKeystringyesCountryStateCity API key

Example call

Arguments

{
  "_apiKey": "your-country-state-city-api-key"
}

curl

curl -X POST https://gateway.pipeworx.io/country-state-city/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_countries","arguments":{"_apiKey":"your-country-state-city-api-key"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('list_countries', {
  "_apiKey": "your-country-state-city-api-key"
});

Response shape

Always returns: count, countries

FieldTypeDescription
countnumberTotal number of countries returned
countriesarray
Full JSON Schema
{
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Total number of countries returned"
    },
    "countries": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Country name"
          },
          "iso2": {
            "type": "string",
            "description": "ISO2 country code"
          },
          "iso3": {
            "type": "string",
            "description": "ISO3 country code"
          },
          "capital": {
            "type": [
              "string",
              "null"
            ],
            "description": "Capital city name"
          },
          "phone_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "International phone code"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code"
          },
          "currency_symbol": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency symbol"
          },
          "region": {
            "type": [
              "string",
              "null"
            ],
            "description": "Geographical region"
          },
          "subregion": {
            "type": [
              "string",
              "null"
            ],
            "description": "Geographical subregion"
          }
        },
        "required": [
          "name",
          "iso2",
          "iso3",
          "capital",
          "phone_code",
          "currency",
          "currency_symbol",
          "region",
          "subregion"
        ]
      }
    }
  },
  "required": [
    "count",
    "countries"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "country-state-city": {
      "url": "https://gateway.pipeworx.io/country-state-city/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026