Skip to main content
Glama
PostalKit MCP server

PostalKit MCP server

Official
by postalkit

PostalKit MCP server

npm tests

An MCP server that gives Claude, Cursor, VS Code and other AI assistants accurate Mexican address data: postal codes (códigos postales), colonias, municipalities, states, streets and geocoding, from the official SEPOMEX catalog via the PostalKit API.

Español: servidor MCP para consultar códigos postales, colonias, municipios y estados de México desde Claude, Cursor y otros asistentes de IA, con datos oficiales de SEPOMEX a través de la API de PostalKit.

Ask things like:

  • "¿Qué colonias tiene el código postal 06600?"

  • "What's the postal code for Colonia Americana in Guadalajara?"

  • "Validate these 200 shipping addresses and flag any postal code that doesn't match its colonia."

  • "Which postal code is closest to 19.4233, -99.1637?"

Get an API key

Create a free account at postalkit.mx (100 requests/month on the free plan) and copy your key from the dashboard.

Related MCP server: mcp-latam-validate

Install

Claude Code

claude mcp add postalkit --env POSTALKIT_KEY=your-api-key -- npx -y postalkit-mcp

Claude Desktop, Cursor, Windsurf, VS Code and other clients

Add this to your client's MCP config (claude_desktop_config.json, .cursor/mcp.json, etc.):

{
  "mcpServers": {
    "postalkit": {
      "command": "npx",
      "args": ["-y", "postalkit-mcp"],
      "env": {
        "POSTALKIT_KEY": "your-api-key"
      }
    }
  }
}

Requires Node.js 20 or newer.

Tools

All tools are read-only.

Tool

What it does

lookup_postal_code

State, municipality, city and every colonia for a 5-digit postal code

search_postal_codes

Postal codes that start with a prefix

find_postal_codes_by_place

Postal codes for a state, municipality and/or colonia name

search_colonias

Colonias by name, nationwide

list_states

The 32 states with INEGI codes

list_municipalities

Municipalities of a state, by ID or INEGI code

list_municipality_colonias

Every colonia in a municipality

search_streets

Streets of a municipality, by name

geocode_postal_code

Latitude/longitude for a postal code (optionally street and number)

reverse_geocode

Nearest postal code to a coordinate

get_usage

Your plan, monthly limit and requests used

Each tool call is one API request against your PostalKit quota.

Configuration

Variable

Default

POSTALKIT_KEY

(required)

Your API key (POSTALKIT_API_KEY also works)

POSTALKIT_BASE

https://api.postalkit.mx

API base URL

Development

npm install
npm test          # unit tests, no network
npm run build
npm run inspector # try the tools in the MCP Inspector

License

MIT

Available Tools

11 tools
find_postal_codes_by_placeFind postal codes by place nameA
Read-onlyIdempotent

Find the postal codes for a state, optionally narrowed by municipality and colonia names. Use this when the user knows the address but not the código postal.

Inputs: state (required), page, exact, colonia, +1 more.

geocode_postal_codeGeocode a postal codeB
Read-onlyIdempotent

Get latitude and longitude for a postal code, optionally refined with a street name and number.

Inputs: code (required), number, street.

get_usageGet API usageA
Read-onlyIdempotent

Show the PostalKit plan, monthly request limit and requests used this period.

Inputs: no named parameters.

list_municipalitiesList municipalities of a stateB
Read-onlyIdempotent

List the municipalities (municipios, or alcaldías in CDMX) of a state, by PostalKit state ID or two-digit INEGI state code.

Inputs: state_id, state_code.

list_municipality_coloniasList colonias of a municipalityA
Read-onlyIdempotent

List every colonia (settlement) in a municipality, by PostalKit municipality ID.

Inputs: municipality_id (required), page.

list_statesList statesA
Read-onlyIdempotent

List Mexico's 32 states with their PostalKit IDs and two-digit INEGI codes.

Inputs: no named parameters.

lookup_postal_codeLook up a postal codeA
Read-onlyIdempotent

Get the state (estado), municipality (municipio/alcaldía), city and every colonia (settlement) for one Mexican postal code.

Inputs: code (required).

reverse_geocodeReverse geocodeA
Read-onlyIdempotent

Find the nearest Mexican postal code (with its colonias, municipality and state) to a latitude/longitude.

Inputs: lat (required), lng (required).

search_coloniasSearch coloniasA
Read-onlyIdempotent

Search Mexican colonias (settlements) by name across the country. Each result includes its postal code, municipality and state.

Inputs: query (required), page.

search_postal_codesSearch postal codes by prefixA
Read-onlyIdempotent

List Mexican postal codes that start with a prefix, e.g. '066' for the codes around Colonia Roma in CDMX.

Inputs: prefix (required), page.

search_streetsSearch streetsB
Read-onlyIdempotent

Search the streets of a municipality by INEGI state and municipality codes, optionally filtered by name.

Inputs: state_code (required), municipality_code (required), page, limit, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 11 tools

    Disambiguation4/5

    Each tool has a fairly distinct input/output: lookup by exact code, search by prefix, search by place names, geocode to coordinates, and reverse geocode from coordinates. The only mild overlap is between search_postal_codes and find_postal_codes_by_place, both returning lists of postal codes, but the descriptions clarify their different query styles.

    Naming Consistency4/5

    Almost all tools follow a verb_noun pattern (list_states, search_colonias, find_postal_codes_by_place, get_usage). Minor deviations: reverse_geocode has no noun object and geocode_postal_code orders as verb_noun while reverse_geocode is verb-only, but the set remains predictable.

    Tool Count5/5

    Eleven tools is well within a healthy range for a postal-code/location API and each tool covers a distinct operation (states, municipalities, colonias, postal codes, streets, geocoding, usage). Nothing feels redundant or filler-like.

    Completeness4/5

    The surface covers the full hierarchy from state down to colonia plus forward/reverse geocoding and street search, which is strong lifecycle coverage. Minor gaps: streets are only searchable within a municipality (not by postal code or nationally), and there is no batch or multi-code lookup, but agents can work around these.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Validates LatAm banking and tax IDs (Mexican CLABE, Brazilian CNPJ/CPF checksums) and performs BrasilAPI company, CEP, and bank lookups, enabling AI agents to verify financial and tax information in Latin America.
      72 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides AI assistants with live, authenticated access to official Mexican data sources including CURP, RFC, postal codes, phone numbers, SPEI payments, CFDI status, DOF semantic search, and geocoding via INEGI/INE.
      MIT