mcpField
M
mcp-mexico

mcp-mexico

Local
github.com/DiegoTepichinFinance2Updated 1w ago

About mcp-mexico

mcp-mexico is an MCP server for AI agents and assistants that need official Mexican economic and tax data. It returns sourced, date-specific Banxico, INEGI and SAT figures, with some tables bundled for offline use.

Key features

  1. 01Banxico exchange and interest rates
  2. 02INEGI inflation data
  3. 03UMA values for 2020–2026
  4. 04ISR tables for 2020–2026
  5. 05Source and applicable date in results

Use cases

  1. 01Check the latest USD/MXN FIX rate
  2. 02Review inflation for a specified month
  3. 03Calculate with UMA values or ISR tables

MCP support

Exposes Mexican public-data tools to MCP clients, including Claude Desktop, Claude Code and Cursor. Banxico and INEGI tools require their respective API tokens; UMA and ISR tools work without tokens.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"diegotepichin-mcp-mexico": {
"command": "uvx",
"args": [
"mcp-mexico"
],
"env": {
"BANXICO_TOKEN": "<BANXICO_TOKEN>",
"INEGI_TOKEN": "<INEGI_TOKEN>"
}
}
}
}
Run commanduvx mcp-mexico
Environment variables to set
BANXICO_TOKENSecretBanxico SIE API token, needed for the exchange and interest rate tools.
INEGI_TOKENSecretINEGI Indicators API token, needed for the inflation tools.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypimcp-mexico0.1.3

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

mcp-mexico

MCP server that gives AI agents official Mexican public data: Banxico exchange and interest rates, INEGI inflation, UMA values and ISR tax tables.

CI License: MIT

Leer en español

Claude Code answering questions about the FIX exchange rate, inflation and ISR with mcp-mexico

Claude Code using mcp-mexico. Response wait times are cut from the recording.

Why

AI assistants either make up Mexican economic figures or use stale ones, so you end up looking them up by hand at Banxico, INEGI or the SAT and pasting them in. mcp-mexico lets any MCP client (Claude Desktop, Claude Code, Cursor) fetch them directly. Every result names its official source and the date it applies to.

Tools

ToolWhat it returnsSourceToken
get_fix_rateFIX USD/MXN exchange rate, latest or for a date. On weekends and holidays it returns the previous business day.Banxico SIEBANXICO_TOKEN
get_fix_rate_rangeDaily FIX between two dates (max 366 days).Banxico SIEBANXICO_TOKEN
get_interest_rateBanxico target rate, 28-day TIIE, overnight TIIE de Fondeo or 28-day CETES; latest or for a date.Banxico SIEBANXICO_TOKEN
get_interest_rate_rangeOne of those rates between two dates (max 366 days).Banxico SIEBANXICO_TOKEN
get_inflationINPC index and monthly, annual and year-to-date inflation for a month (latest by default).INEGIINEGI_TOKEN
get_inflation_rangeThe same for each month in a range (max 240 months).INEGIINEGI_TOKEN
get_umaUMA daily, monthly and annual values, 2020–2026, with validity dates.INEGInone
get_isr_tableISR tables for individuals, 2020–2026: monthly (LISR Art. 96) and annual (LISR Art. 152).Anexo 8 of the RMF (SAT / DOF)none

get_uma and get_isr_table work offline with no configuration. Their data ships inside the package; each table cites the document it was taken from and the date it was verified.

The bundled UMA covers up to 2026. From 1 February 2027, get_uma returns an error until the package is updated, instead of a stale value.

Get your tokens

Both are free and take a couple of minutes.

  1. Banxico: open the SIE API token page, solve the captcha and click "Generar token". The 64-character token appears on the page.
  2. INEGI: enter your email in the INEGI token form. The token arrives by email.

You can start with only one token, or none: tools whose token is missing return a message explaining how to get it.

Install

You need uv. The server runs with uvx mcp-mexico; you don't start it yourself, your MCP client does.

Claude Code
claude mcp add mcp-mexico -e BANXICO_TOKEN=your-token -e INEGI_TOKEN=your-token -- uvx mcp-mexico
Claude Desktop

Add this to claude_desktop_config.json (Settings → Developer → Edit Config) and restart Claude Desktop:

{
  "mcpServers": {
    "mcp-mexico": {
      "command": "uvx",
      "args": ["mcp-mexico"],
      "env": {
        "BANXICO_TOKEN": "your-token",
        "INEGI_TOKEN": "your-token"
      }
    }
  }
}
Cursor

Add the same mcpServers block to ~/.cursor/mcp.json.

Try it

Ask your assistant:

  • "What is today's FIX exchange rate?"
  • "What was annual inflation in Mexico in December 2024?"
  • "How much is 30 UMAs in pesos this year?"
  • "Using the 2026 monthly ISR table, how much tax is withheld on a 25,000 peso salary?"

Configuration

VariableRequiredDescription
BANXICO_TOKENFor Banxico toolsBanxico SIE API token.
INEGI_TOKENFor INEGI toolsINEGI Indicators API token.

Responses are cached in memory only: up to 1 hour for latest values, 24 hours for past Banxico ranges and 6 hours for the INPC series. Nothing is written to disk.

Development

uv sync
uv run pytest
uv run ruff check . && uv run ruff format --check . && uv run mypy .
uv run mcp-mexico      # starts the server over stdio

Tests never touch the network: they replay responses recorded from the real APIs. See CONTRIBUTING.md.

Disclaimer

This project is not affiliated with Banco de México, INEGI or the SAT. Figures come from their public sources, but check the cited source before relying on them for tax or legal decisions.

License

MIT © Diego Tepichin

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.