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 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.1.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.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: postaldatapi_mcp-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 fb04ab053959e7405b88c909ae44256a9fec3004574be83f036498bb8565782d
MD5 42f7ce799d2ada04417e434eab22fa01
BLAKE2b-256 23a3655d489f16bf8c4a397684a31678f459ada29bd89d262d8c8f541af7e3cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for postaldatapi_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39538e326bf20511cb4402ded8e1d508c2077cc76841c3efdf23ae517c79be0f
MD5 7d1753e35b09a09becd73295180c4689
BLAKE2b-256 c3799e22baafdc273daf2dcc0ec66aeb30150fc30f283836c478bad44e3ac9a5

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