country

Pack: iso-codes · Endpoint: https://gateway.pipeworx.io/iso-codes/mcp

“Country code for [country]” / “what’s the ISO code for [X]” / “alpha-2 / alpha-3 for [country]” / “look up country [DE / FR / JP]” — ISO 3166-1 country record by name, alpha-2 (“US”), alpha-3 (“USA”), or numeric (“840”) code. Returns full record with all code forms + official name. Use whenever you need a canonical country identifier.

Parameters

NameTypeRequiredDescription
querystringyes

Example call

Arguments

{
  "query": "United States"
}

curl

curl -X POST https://gateway.pipeworx.io/iso-codes/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"country","arguments":{"query":"United States"}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('country', {
  "query": "United States"
});

More examples

{
  "query": "US"
}
{
  "query": "840"
}

Response shape

FieldTypeDescription
alpha_2stringISO 3166-1 alpha-2 code
alpha_3stringISO 3166-1 alpha-3 code
numericstringISO 3166-1 numeric code
namestringOfficial country name
common_namestringCommon country name
official_namestringOfficial formal country name
Full JSON Schema
{
  "type": [
    "object",
    "null"
  ],
  "properties": {
    "alpha_2": {
      "type": "string",
      "description": "ISO 3166-1 alpha-2 code"
    },
    "alpha_3": {
      "type": "string",
      "description": "ISO 3166-1 alpha-3 code"
    },
    "numeric": {
      "type": "string",
      "description": "ISO 3166-1 numeric code"
    },
    "name": {
      "type": "string",
      "description": "Official country name"
    },
    "common_name": {
      "type": "string",
      "description": "Common country name"
    },
    "official_name": {
      "type": "string",
      "description": "Official formal country name"
    }
  }
}

Connect

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

{
  "mcpServers": {
    "iso-codes": {
      "url": "https://gateway.pipeworx.io/iso-codes/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build July 6, 2026