# MéxicoAPI

> MéxicoAPI is an MCP server for finance and payments. Official Mexican data for assistants: FIX rate, UDIS, business days, UMA, ISR, ID checks. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI, self-hosted
- **Repository:** https://github.com/dagel4k/mexicoapi/tree/HEAD/packages/mcp
- **MCP Registry name:** io.github.Dagel4k/mexicoapi-mcp
- **Categories:** [finance and payments](https://ai-powered.com/categories/finance-and-payments), [legal and government](https://ai-powered.com/categories/legal-and-government)
- **Listing updated:** 2026-11-15

## About

MéxicoAPI is built so an assistant looks up published Mexican figures rather than inventing them. It runs on your own machine over stdio, is read-only, and every result carries the official source, a cut-off date and where the data came from: the public API, the bundled `mexicoapi` package, or a local cache for postal codes. Results include a Spanish text and structured content that follows each tool's output schema.

Tools cover the INEGI municipality catalogue, state lists, CLABE and bank code checks, RFC, CURP and NSS format validation, the FIX exchange rate, UDI values, non-working days under the labour law, banking and tax calendars, UMA, minimum wage and ISR tables, and postal codes. Validators check format and check digits only and say they do not prove an account or person exists. Date arithmetic warns about what it does not account for.

Time-sensitive data falls back to the packaged copy if the API is down, and `MEXICOAPI_SIN_RED` forces fully offline answers. `MEXICOAPI_BASE` points at your own deployment. It needs Node 22.13 or later.

## Features

- **Sourced results:** Each answer includes the official source, cut-off date and data origin.
- **Offline mode:** Setting MEXICOAPI_SIN_RED answers from the bundled package without network access.
- **Identifier validators:** Check CLABE, RFC, CURP and NSS format and check digits.
- **Business-day maths:** Add working days using labour-law, banking or tax-authority calendars with warnings.
- **Financial constants:** Look up FIX, UDIS, UMA, minimum wage and ISR tables.
- **Municipality and postal data:** Search INEGI municipalities and read postal-code settlements.

## Good for

- Validate a CLABE or RFC captured in a form
- Convert a deadline into a due date using the banking calendar
- Look up the FIX rate that applies to a given operation
- Find the municipality key for a place name
- Cite the official source behind a tax or wage figure

## Install

### Claude Code (Terminal)

```sh
claude mcp add mexicoapi-mcp -- npx -y mexicoapi-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mexicoapi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mexicoapi-mcp"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mexicoapi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mexicoapi-mcp"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mexicoapi-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mexicoapi-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mexicoapi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mexicoapi-mcp"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mexicoapi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mexicoapi-mcp"
      ]
    }
  }
}
```

## Tools

- `buscar_municipio`: Search municipalities by name in the INEGI catalogue
- `municipio`: Get a municipality by geostatistical key
- `estados`: List the 32 federal entities
- `municipios_de_estado`: List municipalities of a state
- `validar_clabe`: Validate a CLABE check digit and bank
- `banco_por_codigo`: Look up a SPEI bank by 3-digit code
- `validar_rfc`: Validate RFC format
- `validar_curp`: Validate CURP format and check digit
- `validar_nss`: Validate an IMSS NSS
- `tipo_de_cambio_fix`: Get the FIX exchange rate
- `udis`: Get the UDI value for a day
- `dias_inhabiles`: List non-working days for a year
- `sumar_dias_habiles`: Add working days to a date
- `constantes`: Get UMA, minimum wage and ISR tables
- `codigo_postal`: Look up a postal code

## FAQ

### Does it change anything?

No. All tools are read-only and declare readOnlyHint.

### Does it work offline?

Yes, with MEXICOAPI_SIN_RED set, answers come from the bundled data package.

### Does a valid RFC mean the person exists?

No. Validators check format and check digit and say they do not confirm existence.

### Which Node version is needed?

Node 22.13 or later.

### How do I add MéxicoAPI to Claude Code?

Run this command in your terminal: claude mcp add mexicoapi-mcp -- npx -y mexicoapi-mcp

### What are the best alternatives to MéxicoAPI?

The closest alternatives to MéxicoAPI are Hexadata Tools, Lex API MX, calcu.mx — calculadoras de México, MexCheck and DOF: Diario Oficial de la Federación.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Hexadata Tools](https://ai-powered.com/mcp/hexadata-tools): Hexadata Tools is a paid MCP server for finance and payments.
- [Lex API MX](https://ai-powered.com/mcp/lex-api-mx): Lex API MX is a free MCP server for legal and government.
- [calcu.mx — calculadoras de México](https://ai-powered.com/mcp/calcu-mx-calculadoras-de-mexico): calcu.mx — calculadoras de México is a free MCP server for finance and payments.
- [MexCheck](https://ai-powered.com/mcp/mexcheck): MexCheck is a paid MCP server for legal and government.
- [DOF: Diario Oficial de la Federación](https://ai-powered.com/mcp/dof-diario-oficial-de-la-federacion): DOF: Diario Oficial de la Federación is an open-source MCP server for legal and government.
- [INDEC Argentina (no oficial)](https://ai-powered.com/mcp/indec-argentina-no-oficial): INDEC Argentina (no oficial) is an open-source MCP server for analytics and data.
- [Calculadoras laborales y tributarias PY/EC](https://ai-powered.com/mcp/calculadoras-laborales-y-tributarias-py-ec): Calculadoras laborales y tributarias PY/EC is a free MCP server for finance and payments.
- [RedTape: Spain, Mexico & Colombia business data](https://ai-powered.com/mcp/redtape-spain-mexico-and-colombia-business-data): RedTape: Spain, Mexico & Colombia business data is a freemium MCP server for legal and government.

---
Source: https://ai-powered.com/mcp/mexicoapi
