mcp-mexico

io.github.DiegoTepichin由 GitHub 账号 DiegoTepichin 发布v0.1.3更新于 Oct 29, 2026

Official Mexican public data for AI agents: Banxico rates, INEGI inflation, UMA and ISR tables.

已验证STDIO仅桌面金融数据与分析

概览

AI 生成的概览

本地 MCP 服务器,为助手提供墨西哥官方经济数据:Banxico 汇率与利率、INEGI 通胀、UMA 数值和 ISR 税率表。

可以做什么
  • 查询指定日期或最新的 FIX 美元兑比索汇率,以及区间内的每日 FIX 序列
  • 获取 Banxico 政策利率、28 天 TIIE、隔夜 TIIE de Fondeo 和 28 天 CETES 的最新或历史值
  • 获取某月或某区间的 INPC 通胀数据,含月度、年度和年初至今涨幅
  • 查询 UMA 的日、月、年数值,以及个人 ISR 税率表(月度与年度)
  • 每条结果都标明官方来源和适用日期
适用场景
当助手需要墨西哥当前或历史的经济与税务数据而非猜测或过时数值时适用:汇率、利率、通胀、UMA 金额和 ISR 预扣税表。
运行要求
通过 uvx 以 stdio 在本地运行(需安装 uv),由 MCP 客户端启动。汇率和利率工具需要 BANXICO_TOKEN,通胀工具需要 INEGI_TOKEN,两者均可免费申请。UMA 和 ISR 工具无需配置即可离线使用。
安装前请注意
需要两个 API 令牌 BANXICO_TOKEN 和 INEGI_TOKEN,保存在客户端配置中;缺少令牌的工具只会返回获取说明。该项目与 Banco de México、INEGI 和 SAT 无关联,README 建议在用于税务或法律决策前核对所引来源。内置 UMA 数据截至 2026 年,此后 get_uma 会返回错误,直到软件包更新。

安装

在 SourceWeft 中

  1. 打开 控制台中的 mcp-mexico,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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

bash
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:

json
{  "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

bash
uv syncuv run pytestuv 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

来源:README.md,提交 4079c80

工具

8

get_uma

UMA (Unidad de Medida y Actualización)

Get the official UMA (Unidad de Medida y Actualización) in Mexican pesos. Returns the daily, monthly and annual values, the validity period and the official source. Without `year`, returns the UMA in force today. Each year's UMA takes effect on February 1, so in January the previous year's value applies.

输入参数year

get_isr_table

ISR rate table (personas físicas)

Get the official ISR rate table for individuals (personas físicas) in Mexican pesos. `monthly` is the Art. 96 table used for monthly withholdings and provisional payments on wages; `annual` is the Art. 152 table used for the annual tax return. Without `year`, returns the current year's table. To compute the tax, find the bracket containing the taxable income, then: fixed_fee + (income - lower_limit) * rate_percent / 100.

输入参数yearperiod

get_fix_rate

FIX exchange rate

Get the FIX USD/MXN exchange rate published by Banco de México. Without `date`, returns the latest FIX. With `date`, returns the FIX for that day; on weekends and holidays there is no FIX, so it returns the most recent one before that day. Check the `date` field of the result.

输入参数date

get_fix_rate_range

FIX exchange rate series

Get the daily FIX USD/MXN exchange rate between two dates (inclusive, max 366 days). Only business days have a value.

输入参数end必填start必填

get_interest_rate

Interest rate

Get a key Mexican interest rate from Banco de México, in percent per year. Rates: `target` (Banxico policy rate), `tiie_28` (28-day TIIE), `tiie_funding` (overnight TIIE de Fondeo) and `cetes_28` (28-day CETES, weekly auction). Without `date`, returns the latest value. With `date`, returns the value for that day or the most recent one before it. Check the `date` field of the result.

输入参数daterate必填

get_interest_rate_range

Interest rate series

Get a key Mexican interest rate between two dates (inclusive, max 366 days). Rates: `target`, `tiie_28`, `tiie_funding` and `cetes_28` (weekly). Values are in percent per year.

输入参数end必填rate必填start必填

get_inflation

Inflation (INPC)

Get Mexican consumer price inflation (INPC, INEGI) for a month. Returns the INPC index plus monthly, annual and year-to-date inflation in percent. Without `year` and `month`, returns the latest published month. Pass both to get a specific month.

输入参数yearmonth

get_inflation_range

Inflation series (INPC)

Get Mexican consumer price inflation (INPC, INEGI) for each month in a range. `start` and `end` are inclusive, as YYYY-MM, at most 240 months apart. The returned `start` and `end` are the first and last months with data, which can be earlier than requested when the latest INPC is not yet published.

输入参数end必填start必填

版本历史

1
  1. v0.1.3最新Oct 21, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分