Banxico (Banco de México) MCP Server
Mexico's official economic data from Banxico: USD/MXN, inflation, UDIS, TIIE and reserves.
Banxico (Banco de México) scores 61 (Good), licensed MIT and written in Python. It can be reached as a remote MCP endpoint. It does not declare tools yet. Filed under Uncategorized. GitHub shows 6 stars. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
61 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade C
65/100 for listing completeness. Lost points: no listed tools, short summary.
How quality is graded
Where the 61 comes from
22 + 15 + 3 + 10 + 4 + 7 = 61. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 15 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 3 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 7 of 10 points.Install
Pick your client, copy the config, paste it in.
Remote auth: No sign-in detected. Our check reached the endpoint without being asked for credentials. Some servers only check keys after connecting, so follow the provider's setup notes. Security tips
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "nanisadw3-mcp-banxico": { "command": "uvx", "args": [ "mcp-banxico" ], "env": { "BANXICO_TOKEN": "YOUR_BANXICO_TOKEN" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
BANXICO_TOKENSecret | Required | Free API token for Banxico's SIE (Sistema de Informacion Economica) |
Tools
All capabilitiesTools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.
About
🇲🇽 mcp-banxico
Servidor comunitario de Model Context Protocol (MCP) para conectar asistentes de Inteligencia Artificial (Claude Desktop, Cursor, Cline, Gemini CLI) con el Sistema de Información Económica (SIE) del Banco de México (Banxico).
Permite a tus modelos y agentes de IA consultar en tiempo real el tipo de cambio oficial (USD/MXN), inflación (INPC), valor de las UDIS, tasas de interés interbancarias (TIIE) y cualquier serie económica oficial de México.
Proyecto independiente. No está afiliado ni respaldado por el Banco de México. Consume la API pública del SIE. Si lo instalas en local necesitas tu propio token gratuito; el endpoint remoto de más abajo no lo requiere.
▶️ Demo en video
Diez minutos sin cortes: un modelo local (Qwen 2.5 en Ollama) y Claude Desktop pasan de "no tengo acceso en tiempo real" a responder con el tipo de cambio oficial. El momento clave está en el minuto 2:52.
📈 Datos en vivo
banxico-mcp.duckdns.org: tipo de cambio (dólar, euro, libra, dólar canadiense y yen), tasas de interés, curva de CETES, inflación, UDIS y reservas internacionales, 22 indicadores oficiales que se actualizan cada día hábil. Cada uno se puede descargar en CSV. Vive en el mismo dominio que el endpoint remoto de este servidor.
🏗️ Arquitectura
flowchart LR
subgraph Clientes["Clientes MCP / AI"]
Claude["Claude Desktop"]
Cursor["Cursor IDE"]
Cline["Cline / VS Code"]
Agents["AI Agents"]
end
subgraph Server["mcp-banxico"]
MCP["MCP Protocol (stdio)"]
Tools["Herramientas Económicas"]
end
subgraph Banxico["Banco de México"]
SIE["API SIE Banxico"]
end
Clientes <-->|JSON-RPC / stdio| MCP
MCP --> Tools
Tools <-->|HTTPS + Token| SIE
⚡ Instalación y Uso Rápido
Opción 0: Endpoint remoto (sin instalar nada, sin token)
Hay una instancia pública hospedada. No requiere instalación ni que saques tu propio token de Banxico:
https://banxico-mcp.duckdns.org/mcp
Transporte streamable-http. En Claude Desktop:
{
"mcpServers": {
"banxico": {
"type": "streamable-http",
"url": "https://banxico-mcp.duckdns.org/mcp"
}
}
}
Es un servicio comunitario en infraestructura propia, con límite de peticiones por IP. Para uso intensivo o en producción, instálalo localmente con tu token: así no dependes de que esta instancia esté disponible.
Probarlo a mano (curl o Postman)
El endpoint habla JSON-RPC 2.0 sobre HTTP POST. Son dos peticiones: una para abrir sesión y otra para llamar la herramienta.
1. Abrir sesión. La respuesta trae el header mcp-session-id:
curl -i -X POST https://banxico-mcp.duckdns.org/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"capabilities": {},
"clientInfo": { "name": "curl", "version": "1" }
}
}'
2. Llamar una herramienta, pasando ese id en el header:
curl -X POST https://banxico-mcp.duckdns.org/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'mcp-session-id: EL_ID_DEL_PASO_1' \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": { "name": "tipo_cambio_usd", "arguments": {} }
}'
Respuesta (el contenido viaja como evento SSE, en la línea data:):
{
"serie": "TIPO_CAMBIO_FIX",
"id_serie": "SF43718",
"nombre": "Tipo de cambio FIX (Pesos por Dólar)",
"unidad": "Pesos por dólar",
"fecha": "28/09/2026",
"valor": "17.8413"
}
Otros ejemplos de params:
{ "name": "inflacion_mexico", "arguments": { "tipo": "anual" } }
{ "name": "valor_udis", "arguments": {} }
{ "name": "tasa_interes_banxico", "arguments": { "tipo": "objetivo" } }
{ "name": "reservas_internacionales", "arguments": {} }
{ "name": "consultar_serie_sie", "arguments": { "id_serie": "SF43718",
"fecha_inicio": "2026-09-01",
"fecha_fin": "2026-09-28" } }
Dos cosas que confunden al probar desde Postman. El header
mcp-session-ides obligatorio a partir de la segunda petición: sin él la respuesta es400. Y si mandasAccept: application/jsona secas obtienes406— el servidor exige aceptar ambos tipos, o puedes omitir el header por completo.
Opción 1: Con uvx (Recomendado para Claude Desktop y Cursor)
uvx mcp-banxico
Opción 2: Con pip
pip install mcp-banxico
mcp-banxico
🛠️ Configuración en Clientes de IA
1. Claude Desktop
Agrega la siguiente configuración a tu archivo claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"banxico": {
"command": "uvx",
"args": ["mcp-banxico"],
"env": {
"BANXICO_TOKEN": "TU_TOKEN_DE_BANXICO_AQUI"
}
}
}
}
2. Cursor IDE
En Settings -> Features -> MCP Servers -> Add new MCP server:
- Name:
banxico - Type:
command - Command:
uvx mcp-banxico
📊 Herramientas Disponibles para la IA
| Herramienta | Serie Banxico | Descripción |
|---|---|---|
tipo_cambio_usd | SF43718 / SF60653 | Consulta el tipo de cambio oficial peso/dólar (FIX o liquidación), hoy o en un rango de fechas. |
inflacion_mexico | SP30578 / SP30577 | Consulta la inflación general anual o mensual de México basada en el INPC. |
valor_udis | SP68257 | Consulta el valor oficial de las Unidades de Inversión (UDIS) en pesos mexicanos. |
tasa_interes_banxico | SF43783 / SF61745 | Consulta la TIIE a 28 días o la Tasa Objetivo de fondeo interbancario. |
reservas_internacionales | SF43707 | Saldo de la reserva internacional del Banco de México, en millones de USD. |
consultar_serie_sie | Cualquiera | Consulta avanzada para cualquier ID de serie del catálogo general de Banxico. |
🌐 Hospedar tu propia instancia remota
mcp-banxico --transport streamable-http \
--host 127.0.0.1 --port 8005 \
--allowed-host tu-dominio.example
--allowed-host es obligatorio detrás de un proxy inverso: el transporte HTTP
valida el header Host contra ataques de DNS rebinding y, sin declarar el
nombre público, responde 421 a todas las peticiones.
La caché en memoria (1 h por defecto, BANXICO_CACHE_TTL para ajustarla)
evita que el token compartido agote su límite en el SIE.
🔑 Cómo obtener tu Token de Banxico
Banxico proporciona acceso público y gratuito a su API:
- Ingresa a: Portal de Tokens de Banxico SIE
- Ingresa tu correo y solicita tu token. Te llegará inmediatamente.
- Configúralo en tu entorno:
export BANXICO_TOKEN="tu_token_aqui"
🧪 Verificación Local
Puedes probar que tu token y la conexión funcionen correctamente ejecutando:
mcp-banxico --test
Salida esperada:
============================================================
mcp-banxico v0.1.0 - Verificación de Conexión a Banxico SIE
============================================================
Consultando tipo de cambio FIX (serie SF43718)...
-> Éxito: Fecha 18/09/2026, Valor: $19.92 MXN por USD
💻 Desarrollo y Pruebas
Para contribuir localmente:
git clone https://github.com/nanisadw3/mcp-banxico.git
cd mcp-banxico
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest --cov=mcp_banxico
📄 Licencia
Distribuido bajo la Licencia MIT. Consulta el archivo LICENSE para más detalles.
Desarrollado con ❤️ en México por Inaki Sobera (nanisadw3).
Frequently asked questions
What is Banxico (Banco de México) MCP Server?
Mexico's official economic data from Banxico: USD/MXN, inflation, UDIS, TIIE and reserves.
How do I install Banxico (Banco de México) MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Banxico (Banco de México) MCP Server runs locally from the PyPI package mcp-banxico with the command uvx mcp-banxico.
Is Banxico (Banco de México) MCP Server free and open source?
Yes. Banxico (Banco de México) MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does Banxico (Banco de México) MCP Server support remote (HTTP) connections?
Yes. Banxico (Banco de México) MCP Server offers a hosted endpoint over Streamable HTTP, so HTTP-capable clients can connect to it without running anything locally.
How is Banxico (Banco de México) MCP Server's trust score calculated?
Banxico (Banco de México) MCP Server scores 61 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.
