Skip to main content
Glama
PostalDataPI

PostalDataPI MCP Server

by PostalDataPI

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

Related MCP server: Postio

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
}

Available Tools

4 tools
get_postal_code_metadataA

Get full metadata for a postal code including coordinates.

Returns latitude, longitude, county/municipality, and all available country-specific fields. Use this when someone needs geographic coordinates, timezone, or detailed location data for a postal code.

Args: postal_code: The postal code to look up country: ISO 3166-1 alpha-2 country code. Defaults to "US".

Returns: Full metadata including coordinates, region, and country-specific fields.

ParametersJSON Schema
NameRequiredDescriptionDefault
postal_codeYes
countryNoUS

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It describes what the tool returns (metadata including coordinates, region, fields) and implies it's a read-only lookup operation. However, it lacks details on error handling, rate limits, authentication needs, or data freshness. The description adds basic behavioral context but misses deeper operational traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and concise. It starts with the core purpose, lists key returns, provides usage guidelines, and details parameters and returns in labeled sections. Every sentence adds value without redundancy, making it easy to scan and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no annotations, but has output schema), the description is fairly complete. It explains purpose, usage, parameters, and returns. The output schema exists, so the description doesn't need to detail return values extensively. It could improve by addressing potential errors or sibling differentiation, but it covers the essentials for agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains both parameters: 'postal_code: The postal code to look up' and 'country: ISO 3166-1 alpha-2 country code. Defaults to "US".' This adds meaning beyond the bare schema, clarifying the country code format and default value. It doesn't detail validation rules or examples, but covers the essentials.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get full metadata for a postal code including coordinates.' It specifies the verb 'Get' and resource 'postal code metadata' with key components like coordinates, county/municipality, and country-specific fields. However, it doesn't explicitly distinguish this from sibling tools like 'lookup_postal_code' or 'validate_postal_code', which likely have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage guidance: 'Use this when someone needs geographic coordinates, timezone, or detailed location data for a postal code.' This gives context for when to select this tool. It doesn't explicitly state when not to use it or name alternatives among the siblings, but the guidance is sufficient for typical agent decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lookup_postal_codeA

Look up a postal code and get city, state, and region information.

Works for ZIP codes (US), postcodes (UK), PLZ (Germany), and postal codes in 70+ countries. Use this when someone asks about a postal code, wants to know what city a ZIP code belongs to, or needs address information.

Args: postal_code: The postal code to look up (e.g., "90210", "SW1A", "10115", "100-0001") country: ISO 3166-1 alpha-2 country code (e.g., "US", "GB", "DE", "JP"). Defaults to "US".

Returns: City, state/region, and abbreviation for the postal code.

ParametersJSON Schema
NameRequiredDescriptionDefault
postal_codeYes
countryNoUS

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses behavioral traits such as the tool's international scope (works for 70+ countries) and default behavior (country defaults to 'US'), which are useful beyond basic functionality. However, it doesn't mention error handling, rate limits, or authentication needs, leaving some gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the purpose, followed by scope, usage guidelines, and parameter details. Every sentence adds value, with no wasted words, making it efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity, no annotations, and an output schema (which handles return values), the description is complete enough. It covers purpose, usage, parameters, and scope, providing all necessary context for an agent to use the tool effectively without redundancy.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds significant meaning beyond the input schema by explaining what 'postal_code' and 'country' represent, providing examples (e.g., '90210', 'US'), and noting the default for country. This fully documents the parameters in a helpful way.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'look up' and resource 'postal code', specifying it retrieves city, state, and region information. It distinguishes from siblings by focusing on lookup rather than metadata retrieval, validation, or city-based search, making it specific and differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool: 'when someone asks about a postal code, wants to know what city a ZIP code belongs to, or needs address information.' It also implies alternatives by listing sibling tools like get_postal_code_metadata, search_by_city, and validate_postal_code, though it doesn't name them directly, the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_by_cityA

Find all postal codes for a given city.

Use this when someone has a city name and needs the postal codes that serve it. For US cities, provide the state name or 2-letter abbreviation.

Args: city: City name (e.g., "Beverly Hills", "Berlin", "Tokyo") state: State or region name/abbreviation. Required for US cities (e.g., "CA" or "California"). country: ISO 3166-1 alpha-2 country code. Defaults to "US".

Returns: List of postal codes for the city.

ParametersJSON Schema
NameRequiredDescriptionDefault
cityYes
stateNo
countryNoUS

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the tool's core function and US-specific requirements but doesn't mention error handling, rate limits, authentication needs, or what happens with invalid inputs. The description adds basic context but lacks comprehensive behavioral details needed for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly structured and front-loaded: purpose statement first, usage guidelines second, parameter explanations third, and return value last. Every sentence earns its place with no wasted words. The formatting with clear sections (Args, Returns) enhances readability without adding unnecessary length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity, 0% schema coverage, no annotations, but the presence of an output schema, the description is quite complete. It covers purpose, usage, parameters, and return values adequately. The output schema handles return format details, so the description doesn't need to explain return structure. Minor gaps remain in behavioral transparency.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by providing clear semantic explanations for all three parameters. It explains what each parameter represents, provides examples for 'city' and 'state', specifies when 'state' is required, and indicates the default value and format for 'country'. This adds substantial value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Find') and resource ('postal codes for a given city'), distinguishing it from sibling tools like 'get_postal_code_metadata', 'lookup_postal_code', and 'validate_postal_code' which focus on different operations. The first sentence directly answers 'what does this tool do?' without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool ('when someone has a city name and needs the postal codes that serve it') and includes specific requirements for US cities (state parameter required). It distinguishes usage from sibling tools by focusing on city-based searches rather than metadata retrieval, lookup, or validation operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

validate_postal_codeA

Check whether a postal code exists in a given country.

Use this when someone wants to verify if a postal code is valid before processing an order, form, or address.

Args: postal_code: The postal code to validate country: ISO 3166-1 alpha-2 country code. Defaults to "US".

Returns: Whether the postal code is valid or invalid.

ParametersJSON Schema
NameRequiredDescriptionDefault
postal_codeYes
countryNoUS

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool checks validity, implying a read-only operation, but lacks details on error handling, rate limits, or authentication needs. It adds some context by specifying the default country, but more behavioral traits could be included.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with the purpose, followed by usage guidelines and parameter details. Every sentence adds value, with no wasted words, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity, no annotations, and an output schema that covers return values, the description is mostly complete. It explains purpose, usage, and parameters well, but could benefit from more behavioral details like error cases or limitations, though the output schema reduces the need for return value explanation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'postal_code' is 'The postal code to validate' and 'country' uses 'ISO 3166-1 alpha-2 country code' with a default of 'US,' clarifying semantics that the schema alone does not provide.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Check') and resource ('postal code'), and distinguishes it from siblings by focusing on validation rather than metadata retrieval or lookup. It explicitly mentions 'exists in a given country,' which differentiates it from tools like 'search_by_city'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'when someone wants to verify if a postal code is valid before processing an order, form, or address.' This clearly defines the context and distinguishes it from alternatives like 'get_postal_code_metadata' or 'lookup_postal_code,' which likely serve different purposes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv0.1.0
    • First observedget_postal_code_metadata
    • First observedlookup_postal_code
    • First observedsearch_by_city
    • First observedvalidate_postal_code

TDQS

A4.3/5.0
Disambiguation4/5

The tools have distinct primary purposes: get_postal_code_metadata for detailed geographic data, lookup_postal_code for basic address information, search_by_city for reverse lookup, and validate_postal_code for validation. However, get_postal_code_metadata and lookup_postal_code could be confused as both retrieve postal code information, though their descriptions clarify different use cases.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern with clear verb_noun structure: get_postal_code_metadata, lookup_postal_code, search_by_city, validate_postal_code. The naming is predictable and readable throughout the set.

Tool Count5/5

With 4 tools, this is well-scoped for a postal code data server. Each tool serves a distinct function in the domain, and the count is appropriate for covering core operations without being overwhelming or insufficient.

Completeness4/5

The toolset covers key postal code operations: lookup, validation, reverse search, and metadata retrieval. A minor gap exists in lacking explicit update or delete operations, but these are not typically needed for a read-only data service, and agents can work effectively with the provided tools.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to search, validate, and retrieve Australian postcode and suburb data with intelligent fuzzy matching for handling misspellings and voice queries. Provides comprehensive location services including geographic search, Local Government Area queries, and suburb-postcode validation for customer service interactions.
    5
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    UK address (Royal Mail PAF), email, and phone (live HLR carrier) validation via the Postio API. Six tools: address search, postcode lookup, UDPRN, email validate, phone validate, and a health probe.
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables location intelligence for US ZIP codes, allowing users to search, profile, and compare ZIP codes across various domains like crime, income, schools, and more.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides address validation and geocoding for 240+ countries, including UK Royal Mail PAF and US/Canada census enrichment. Enables batch validation, forward/reverse geocoding, UK postcode expansion, and automatic refunds for failed lookups.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PostalDataPI/postaldatapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server