subdivisions

Pack: iso-codes · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/subdivisions for the schema, then POST the same URL with its arguments for the data.

“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 — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the iso-codes pack
{
  "mcpServers": {
    "iso-codes": {
      "url": "https://gateway.pipeworx.io/iso-codes/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build October 5, 2026