mef_subnational_efficiency_mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mef_subnational_efficiency_mcpShow me the budget execution for each department in 2025"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mef_subnational_efficiency_mcp
Sistema multi-agente local para auditar el gasto público del Perú usando Claude Code Skills, un servidor MCP local y PaddleOCR: analiza la ejecución presupuestal 2025 del MEF y digitaliza registros históricos de 1964.
Tarea HW_05 — Auditoría del Gasto Público vía Sistemas Multi-Agente, Claude Code Skills y MCP Local.
Arquitectura
Capa | Tecnología | Rol |
Servidor MCP |
| 10 herramientas sobre la API CKAN del portal |
Ingesta / datos |
| Procesa sin saturar memoria (anti-flooding) |
OCR histórico |
| Digitaliza 15+ páginas de 1964 |
Dashboard |
| 4 pestañas (2025 + 1964) |
Agentes | 2 Claude Code Skills | Executor (construye) + Evaluator (audita/pule) |
Related MCP server: LATAM-MCP
Fuentes de datos
2025: dataset “Presupuesto y Ejecución de Gasto – Devengado Mensual” del portal
datosabiertos.gob.pe(CSV2025-Gasto-Devengado-Mensual.csv, conMONTO_PIM,MONTO_DEVENGADO_ANUAL, departamento, pliego, etc.).1964: PDF de la Cuenta General de la República (1964) →
data/raw_pdfs/cuenta_general_1964.pdf(descarga manual).Vulnerabilidad social (Tab 2): dataset “Resumen de Hogares afiliados… Programa JUNTOS 2025” del portal
datosabiertos.gob.pe(hogares en pobreza por departamento, proxy de vulnerabilidad).Geo:
peru_departamental_simple.geojson(repojuaneladio/peru-geojson).
Métricas
Avance de ejecución =
(Devengado / PIM) × 100Saldo No Devengado =
PIM − Devengado
Estructura del proyecto
mef_subnational_efficiency_mcp/
├── app.py # Dashboard Streamlit (4 tabs)
├── requirements.txt
├── .streamlit/config.toml
├── .claude/skills/ # Skills Executor y Evaluator (.json + SKILL.md)
├── src/
│ ├── mcp_server.py # Servidor MCP + 10 herramientas
│ ├── data_pipeline.py # Ingesta 2025 (DuckDB → Parquet)
│ ├── ocr_engine.py # OCR de 1964 (PaddleOCR + PyMuPDF)
│ ├── analytical_engine.py # Métricas (Avance, Saldo No Devengado)
│ ├── vulnerabilidad.py # Vulnerabilidad por depto (JUNTOS 2025)
│ └── utils.py # Cliente CKAN + helpers
├── data/
│ ├── raw_pdfs/ # PDF crudo de 1964 (no versionado)
│ ├── snapshots/ # Muestras de esquema (5–10 filas)
│ ├── geo/ # GeoJSON de departamentos del Perú
│ └── processed/ # Salidas Parquet "microscópicas"
├── docs/evaluator_report.md # Reporte de auditoría del Evaluator (Tab 4)
└── video/link.txt # Enlace del video de presentaciónRequisitos e instalación
⚠️ Usar Python 3.12 (PaddleOCR no soporta 3.14).
# Crear entorno virtual con Python 3.12
py -3.12 -m venv .venv
.\.venv\Scripts\Activate.ps1
# Instalar dependencias
pip install -r requirements.txtUso
# 1) Servidor MCP (transporte stdio, sin auth)
py -3.12 src/mcp_server.py
# 2) Dashboard
py -3.12 -m streamlit run app.pyFlujo de desarrollo (Git)
El proyecto se construye por componentes en branches feature/* y se integra a
main mediante Pull Requests (nunca commits directos a main):
feature/mcp-server-core · feature/data-snapshot-pipeline ·
feature/historical-1964-paddle-ocr · feature/executor-dashboard-draft ·
feature/evaluator-qa-refinement
Notas de ejecución
Los Parquet procesados (
data/processed/) ya están versionados, así que el dashboard funciona tras clonar sin reprocesar los GB de origen.El CSV crudo del MEF (~2.66 GB) se descarga a una carpeta temporal del sistema (fuera del repo) cuando se ejecuta el pipeline.
PaddleOCR/CPU: el código fija
FLAGS_use_mkldnn=0automáticamente para evitar un fallo de oneDNN en PaddlePaddle 3.x (no requiere acción manual).El reporte de auditoría del Evaluator está en
docs/evaluator_report.mdy se muestra en el Tab 4 del dashboard.
This server cannot be deployed
Maintenance
Related MCP Connectors
IBGE: geography, census, economy and health from the official APIs, with provenance. 23 tools.
Access US federal award, recipient, agency, and spending analytics data from USAspending.gov.
28 pay-per-event tools for regulatory, sanctions, procurement, and corporate-registry monitoring.
US government data as clean JSON for AI agents: SAM.gov contract opportunities, USAspending awards, Grants.gov grants, House STOCK Act trades, and SEC EDGAR filings (Form 4 insider trades, 8-K events, 13F holdings, 13D/G stakes, XBRL fundamentals, 10-K/10-Q sections). 19 read-only tools. Data is as fresh as each source publishes; congressional trades lag up to 45 days and report dollar ranges (House only). Free tier, no card.
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceEnables AI assistants and CLI tools to explore and analyze datasets from 600+ global CKAN open-data portals. Provides comprehensive tools for dataset discovery, datastore queries, metadata analysis, and local downloads without writing custom CKAN integrations.14MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for Peruvian public-data lookups including SUNAT RUC registrations, BCRP exchange rates, and SEACE tenders. Provides official open-data access through tools for Claude, Cursor, and other MCP clients.MIT

licinexus-mcpofficial
AlicenseAqualityBmaintenancerazilian public procurement (PNCP) and Federal Revenue CNPJ data for any MCP client. 18 tools covering bids, contracts, atas de registro de preço, annual procurement plans, CNPJ enrichment, plus temporal aggregation and period comparison. MIT licensed, maintained by Licinexus under Law 14.133/2021.1867 npm78MIT- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search and retrieve metadata and data files from Peru's National Open Data Platform, and generate Jupyter notebooks for data analysis.4Apache 2.0