lookup_city

Pack: zippopotam · 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/lookup_city for the schema, then POST the same URL with its arguments for the data.

Get all postal codes (ZIP codes) for a city, given its country and state or province. Country and state may be written as names or codes — “California” and “CA” both work, as do “United States” and “US”.

Parameters

NameTypeRequiredDescription
countrystringyesCountry name or ISO 3166-1 alpha-2 code — “United States”, “US”, “Germany”, “DE” all work.
statestringyesState, province or UK region, by name or abbreviation — “California” or “CA”, “Ontario” or “ON”, “England” or “eng”.
citystringyesCity name, e.g. “beverly hills”. Spaces are fine — pass the name as written.

Example call

Arguments

{
  "country": "us",
  "state": "ca",
  "city": "beverly hills"
}

curl

curl -X POST https://gateway.pipeworx.io/zippopotam/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"lookup_city","arguments":{"country":"us","state":"ca","city":"beverly hills"}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('lookup_city', {
  "country": "us",
  "state": "ca",
  "city": "beverly hills"
});

More examples

{
  "country": "gb",
  "state": "england",
  "city": "london"
}

Response shape

Full JSON Schema
{
  "type": "object",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "country": {
          "type": "string",
          "description": "Full country name"
        },
        "country_abbreviation": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 country code"
        },
        "state": {
          "type": "string",
          "description": "State or province name"
        },
        "state_abbreviation": {
          "type": "string",
          "description": "State or province abbreviation"
        },
        "places": {
          "type": "array",
          "description": "List of postal codes in the city",
          "items": {
            "type": "object",
            "properties": {
              "post_code": {
                "type": "string",
                "description": "ZIP or postal code"
              },
              "name": {
                "type": "string",
                "description": "Place name (city)"
              },
              "state": {
                "type": "string",
                "description": "State or province name"
              },
              "state_abbreviation": {
                "type": "string",
                "description": "State or province abbreviation"
              },
              "lat": {
                "type": "number",
                "description": "Latitude coordinate"
              },
              "lon": {
                "type": "number",
                "description": "Longitude coordinate"
              }
            },
            "required": [
              "post_code",
              "name",
              "lat",
              "lon"
            ]
          }
        },
        "found": {
          "type": "boolean",
          "enum": [
            true
          ],
          "description": "Present and true on an answer; a miss is the found:false branch."
        }
      },
      "required": [
        "country",
        "country_abbreviation",
        "state",
        "state_abbreviation",
        "places"
      ]
    },
    {
      "type": "object",
      "description": "A miss or an unavailable upstream: found:false with a reason and a hint (the shape check-found-false-schemas.mjs expects).",
      "properties": {
        "found": {
          "type": "boolean",
          "enum": [
            false
          ]
        }
      },
      "required": [
        "found"
      ]
    }
  ]
}

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 zippopotam pack
{
  "mcpServers": {
    "zippopotam": {
      "url": "https://gateway.pipeworx.io/zippopotam/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build November 15, 2026