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.1.2.tar.gz (6.6 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.1.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: postaldatapi_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 6.6 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.1.2.tar.gz
Algorithm Hash digest
SHA256 07dc38a1042a0ee0d7c1a605f90c421c1cdaa7d2f073995e21687904ceb24200
MD5 eb21831bbfb4b99465d8c35fef23677c
BLAKE2b-256 9370a1d21504f5f9e9a25b698868c55753f19c10e342465421f60d0ef8d6bd33

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for postaldatapi_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ee22811d82c1289d5c9c06b6aa7ed5059ac86967f22e450c119fa3e70dc23410
MD5 09790e79029642d9f80988ef8b9b0b97
BLAKE2b-256 65b6c5f6c7277c4ff475fc4a7201fb0fb26748fd8edf0f504b2f06a10a2485bb

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