subdivisions

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

“States / provinces / regions of [country]” / “ISO 3166-2 codes for [DE / US / FR]” — list ISO 3166-2 subdivisions (states, provinces, regions, prefectures) for a country (pass alpha-2 like “US” or “DE”). Use for forms, validation, and admin-level data.

Parameters

NameTypeRequiredDescription
country_alpha2stringyes

Example call

Arguments

{
  "country_alpha2": "US"
}

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":"subdivisions","arguments":{"country_alpha2":"US"}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('subdivisions', {
  "country_alpha2": "US"
});

More examples

{
  "country_alpha2": "GB"
}

Response shape

Always returns: country_alpha2, count, subdivisions

FieldTypeDescription
country_alpha2stringISO 3166-1 alpha-2 code
countnumberNumber of subdivisions
subdivisionsarray
Full JSON Schema
{
  "type": "object",
  "properties": {
    "country_alpha2": {
      "type": "string",
      "description": "ISO 3166-1 alpha-2 code"
    },
    "count": {
      "type": "number",
      "description": "Number of subdivisions"
    },
    "subdivisions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "ISO 3166-2 subdivision code"
          },
          "name": {
            "type": "string",
            "description": "Subdivision name"
          },
          "type": {
            "type": "string",
            "description": "Subdivision type"
          },
          "parent": {
            "type": "string",
            "description": "Parent subdivision code"
          }
        }
      }
    }
  },
  "required": [
    "country_alpha2",
    "count",
    "subdivisions"
  ]
}

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