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.
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
| Tool | What it returns | Source | Token |
|---|---|---|---|
get_fix_rate |
FIX USD/MXN exchange rate, latest or for a date. On weekends and holidays it returns the previous business day. | Banxico SIE | BANXICO_TOKEN |
get_fix_rate_range |
Daily FIX between two dates (max 366 days). | Banxico SIE | BANXICO_TOKEN |
get_interest_rate |
Banxico target rate, 28-day TIIE, overnight TIIE de Fondeo or 28-day CETES; latest or for a date. | Banxico SIE | BANXICO_TOKEN |
get_interest_rate_range |
One of those rates between two dates (max 366 days). | Banxico SIE | BANXICO_TOKEN |
get_inflation |
INPC index and monthly, annual and year-to-date inflation for a month (latest by default). | INEGI | INEGI_TOKEN |
get_inflation_range |
The same for each month in a range (max 240 months). | INEGI | INEGI_TOKEN |
get_uma |
UMA daily, monthly and annual values, 2020–2026, with validity dates. | INEGI | none |
get_isr_table |
ISR 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.
Get your tokens
Both are free and take a couple of minutes.
- Banxico: open the SIE API token page, solve the captcha and click "Generar token". The 64-character token appears on the page.
- 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
| Variable | Required | Description |
|---|---|---|
BANXICO_TOKEN |
For Banxico tools | Banxico SIE API token. |
INEGI_TOKEN |
For INEGI tools | INEGI 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
Metadata
Release files for mcp-mexico 0.1.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 | |
|---|---|---|---|
| mcp_mexico-0.1.0.tar.gz | 36.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_mexico-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.8 kB
Release files / mcp_mexico-0.1.0.tar.gz
| Download URL | mcp_mexico-0.1.0.tar.gz |
|---|---|
| Size | 36.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6f7dba6f1b28b9f1b9bda9245525b0d66c470fa3dca9ece9f73f7204c861042
|
|
BLAKE2b-256 checksum How to use checksums |
74c989b49ac32f16e26552c3ed31ecc5e34573cc6b03761c267dc5c94ad1b011
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / mcp_mexico-0.1.0-py3-none-any.whl
| Download URL | mcp_mexico-0.1.0-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0d6579c86f159e5c82ee410b6b85c379ec0a8246fd2267d78a29b25e3de88aa
|
|
BLAKE2b-256 checksum How to use checksums |
7cb7fa4a1a12b4cbb0d611dfa6d4fb9bfd420a15525b1999800fd81e9984b946
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|