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 分