Skip to main content

MCP server for PostalDataPI — postal code lookups for AI agents

Project description

PostalDataPI MCP Server

License: MIT Python 3.10+ PyPI

MCP (Model Context Protocol) server for PostalDataPI — lets AI agents look up, validate, and search postal codes across 240+ countries and territories with rich metadata: timezone, administrative regions, elevation, and coordinates.

Tools

Tool Description
lookup_postal_code Get city, state/region, and abbreviation for a postal code (US ZIP, UK postcode, German PLZ, etc.)
validate_postal_code Check if a postal code exists in a country
search_by_city Find all postal codes for a city
get_postal_code_metadata Full metadata: coordinates, admin hierarchy, timezone, elevation, and more

Setup

1. Get an API Key

Sign up at postaldatapi.com/register — 1,000 free queries, no credit card required.

2. Install

pip install postaldatapi-mcp

3. Configure with Claude Code

claude mcp add --transport stdio postaldatapi -- \
  env POSTALDATAPI_KEY=your_api_key_here postaldatapi-mcp

4. Configure with Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "postaldatapi": {
      "command": "postaldatapi-mcp",
      "env": {
        "POSTALDATAPI_KEY": "your_api_key_here"
      }
    }
  }
}

Usage

Once configured, ask Claude naturally:

  • "What city is ZIP code 90210?"
  • "Look up UK postcode SW1A"
  • "Is 10115 a valid German postal code?"
  • "What are the postal codes for Beverly Hills, CA?"
  • "Get the coordinates for postal code 100-0001 in Japan"

Claude will automatically use the PostalDataPI tools to answer.

Supported Countries

240+ countries and territories including US, UK, Canada, Germany, France, Japan, Australia, Brazil, India, and many more. See the full list at postaldatapi.com/countries.

Rich Metadata

Beyond basic lookups, the get_postal_code_metadata tool returns up to 18 fields per postal code including:

  • Coordinates (latitude, longitude)
  • Timezone (e.g., America/Mexico_City, Europe/Berlin)
  • Administrative hierarchy (state/province, county, municipality)
  • Elevation (meters above sea level)
  • Place name and country information

Example response for Mexico City 06000:

{
  "postalCode": "06000",
  "country": "MX",
  "placeName": "Centro",
  "latitude": 19.4364,
  "longitude": -99.1553,
  "timezone": "America/Mexico_City",
  "adminLevel1": "Ciudad de México",
  "adminLevel2": "Cuauhtémoc",
  "elevation": 2239
}

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

postaldatapi_mcp-0.3.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

postaldatapi_mcp-0.3.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file postaldatapi_mcp-0.3.0.tar.gz.

File metadata

  • Download URL: postaldatapi_mcp-0.3.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for postaldatapi_mcp-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c2b30cd380e9575791c0d3f1590916c802f204a273f121527aed1445eba9a563
MD5 e15e34752ec58ca4c2d985fd70bc4652
BLAKE2b-256 38f09b859f1a47736138c24d106c7d7024511171643c3d6990c07cc61cc9b64f

See more details on using hashes here.

File details

Details for the file postaldatapi_mcp-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for postaldatapi_mcp-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa024e8ee6fa345a08d0e3f90e95d18a6e6499215d39fec7bf199321f643e230
MD5 5cb486c42c4db71f05903758ee399554
BLAKE2b-256 495cd734c77886ddc16292d715b55d1eb6ada4d32c89bdd8bc3d25c06bfb8310

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page