PostalDataPI MCP Server
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
Metadata
Release files for postaldatapi-mcp 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| postaldatapi_mcp-0.3.0.tar.gz | 7.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| postaldatapi_mcp-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.7 kB
Release files / postaldatapi_mcp-0.3.0.tar.gz
| Download URL | postaldatapi_mcp-0.3.0.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2b30cd380e9575791c0d3f1590916c802f204a273f121527aed1445eba9a563
|
|
BLAKE2b-256 checksum How to use checksums |
38f09b859f1a47736138c24d106c7d7024511171643c3d6990c07cc61cc9b64f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / postaldatapi_mcp-0.3.0-py3-none-any.whl
| Download URL | postaldatapi_mcp-0.3.0-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa024e8ee6fa345a08d0e3f90e95d18a6e6499215d39fec7bf199321f643e230
|
|
BLAKE2b-256 checksum How to use checksums |
495cd734c77886ddc16292d715b55d1eb6ada4d32c89bdd8bc3d25c06bfb8310
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for postaldatapi-mcp 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.