sat69-mcp
Consultar las listas públicas del SAT (Art. 69, 69-B y 69-B Bis) para verificar riesgo fiscal de RFCs, buscar contribuyentes y mantener los datos sincronizados.
Verificar un RFC y obtener un veredicto de riesgo determinista (
CRITICOaLIMPIO, oNO_VERIFICADO).Verificar lotes de hasta 500 RFCs y recibir sólo los hallazgos por severidad.
Buscar contribuyentes por nombre o razón social parcial con FTS5, insensible a acentos, filtrando por dataset.
Consultar el estado de los datos: vigencia declarada por el SAT, conteos y última importación.
Actualizar/sincronizar los listados del SAT de forma idempotente por hash, con opción de forzar reprocesamiento.
Generar un resumen ejecutivo en lenguaje natural de una cartera de hasta 500 RFCs; el riesgo lo calcula el motor determinista y la IA sólo redacta (si está configurada).
Usar el servidor vía stdio o Streamable HTTP con autenticación OAuth 2.1 o bearer estático, y persistencia durable en Turso.
Durable libSQL persistence backend; the server pulls SAT list data from Turso at startup and pushes synchronized updates after imports/refreshes, preserving data across ephemeral deployments.
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., "@sat69-mcp Verifica estos 10 RFCs y dime cuáles tienen riesgo crítico"
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.
MCP SAT 69 / 69-B · WATR
MCP (Model Context Protocol) server in Python / FastMCP for querying the SAT's public lists:
Article 69-B of the CFF (EFOS) — simulated operations: Presumed, Rebutted, Definitive, Favorable Ruling.
Article 69 of the CFF — final tax status: final, enforceable, not located, cancelled, forgiven.
Same architecture as the SSC-CDMX mobilizations MCP: FastMCP with stdio + Streamable HTTP transport, OAuth 2.1 (WorkOS AuthKit) with fallback to static bearer, persistence in Turso (libSQL), optional download proxy, and deployment on Render with external cron (GitHub Actions). No OCR: the SAT CSVs already come structured.
Tools
Tool | What it does |
| Verifies an RFC → risk verdict ( |
| Validates up to 500 RFCs; returns only findings by severity. |
| Search by name/legal name (FTS5, accent-insensitive). |
| Validity declared by the SAT, counts, and last import. |
| Downloads + syncs the listings (idempotent by hash). |
Risk: CRITICO (definitive EFOS) · ALTO (alleged EFOS) · MEDIO (69 final/enforceable/not located) · BAJO (rebutted/favorable ruling) · INFORMATIVO (69 cancelled/forgiven) · LIMPIO.
The results reflect the latest import of the SAT's public files. They do not constitute tax or legal advice.
Related MCP server: bcra-deudores-mcp
Architecture
CSV del SAT (Latin-1) ┌────────── FastMCP ──────────┐
│ fetcher (httpx + proxy opcional) │ verificar_rfc / _lote │
▼ │ buscar_nombre / estado_datos │
pipeline (parse 69 / 69b) ──► SQLite ──┤ actualizar_datos │
│ (FTS5 unicode61, triggers) ▲ │ └──────────┬──────────────────┘
▼ │ │ stdio (server.py) + HTTP (web.py)
Turso (libSQL, durable) ◄── push │ └► pull al arranque │
└─────────────────── /health /refresh /reloadserver.py— FastMCP (stdio) + tools + AuthKit.web.py— Starlette/uvicorn (HTTP):/health(open),/refreshand/reload(M2M bearer),/mcp(OAuth or bearer).pipeline.py— download → SHA-256 (skips if unchanged) → Latin-1 parse → SQLite replacement → push to Turso.database.py— SQLite + FTS5 with triggers; RFC via B-tree index (hot path).turso.py— durable Turso ↔ local sync.risk.py— RFC normalization + verdict tree (69-B takes precedence over 69).
Local installation
cd sat69-mcp
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
# Primera ingesta (descarga ~22 MB; el 69 son ~½ millón de filas)
python -c "from sat69 import database as db, config; db.init_db(config.settings.db_path)"
python -c "from sat69.pipeline import process_import; print(process_import())"
# Probar
pytest -qConnect in Claude Desktop / Cowork (stdio)
{
"mcpServers": {
"sat69": { "command": "sat69-mcp" }
}
}(or "command": "python", "args": ["-m", "sat69"] with the active venv.)
Deployment on Render
render.yaml provisions the web service with native Python runtime (no Docker):
Push the repo to GitHub and create a Blueprint in Render pointing to
render.yaml.Variables (marked
sync:false):MCP_API_KEY(bearer), optionalAUTHKIT_DOMAIN+BASE_URL(OAuth),TURSO_DATABASE_URL+TURSO_AUTH_TOKEN.MCP endpoint:
POST https://<servicio>.onrender.com/mcp.
Auth (two modes, same as mobilizations)
Static bearer (
MCP_API_KEY): simple, protects/mcp,/refresh,/reload.OAuth 2.1 (WorkOS AuthKit): set
AUTHKIT_DOMAIN+BASE_URLand/mcpswitches to OAuth with Dynamic Client Registration; the bearer still protects the M2M endpoints.
Automatic refresh
.github/workflows/refresh.yml performs a daily POST /refresh (11:30 UTC ≈ 05:30 CDMX). Repo secrets: RENDER_BASE_URL, MCP_API_KEY. Manual: workflow_dispatch (with force).
Persistence (Turso)
Local SQLite (ephemeral on Render, /tmp) serves the queries; Turso is the durable store that survives redeploys. On startup a pull from Turso is performed; after each actualizar_datos//refresh a push is performed. Without TURSO_*, it runs in pure local mode.
Download proxy (optional)
FETCH_PROXY or DATAIMPULSE_* route only the CSV downloads. In testing, the SAT did not block datacenter IPs (direct 200 downloads), so it's usually not needed; it's kept for parity and resilience.
Data sources (SAT · Open Data)
69-B:
Listado_Completo_69-B.csv(~14 k records, 20 columns, header on line 3).69:
Firmes.csv,Cancelados.csv,NoLocalizados.csv,Exigibles.csv,Sentencias.csv,Condonados.csv(~½ million records, 6 columns). URLs inconfig.py.
Available Tools
6 toolsactualizar_datosBInspect
Descarga y sincroniza los listados del SAT (idempotente por hash).
Inputs: dataset, force_refresh. Returns: object
buscar_nombreAInspect
Busca contribuyentes por nombre / razón social parcial (FTS5, sin acentos).
Inputs: texto (required), limite, dataset. Returns: object
estado_datosAInspect
Estado del dataset: vigencia declarada por el SAT, conteos y última importación.
Inputs: no named parameters. Returns: object
resumen_carteraAInspect
Resumen ejecutivo en lenguaje natural de una cartera de RFCs.
El riesgo de cada RFC lo calcula el motor de reglas (DETERMINISTA); la IA sólo redacta el brief a partir de esos veredictos ya calculados — nunca decide el riesgo. Proveedor de IA conmutable por env var (LLM_PROVIDER).
Inputs: rfcs (required). Returns: object
verificar_loteBInspect
Verifica una lista de RFCs (p. ej. proveedores). Devuelve sólo hallazgos.
Inputs: rfcs (required). Returns: object
verificar_rfcAInspect
Verifica un RFC contra las listas del SAT (Art. 69, 69-B y 69-B Bis).
Inputs: rfc (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct concern: data status/update, single/batch verification, portfolio summary, and name search. The closest pair, verificar_rfc and verificar_lote, is disambiguated by singular vs batch operation.
Most tools follow a clear verb_noun pattern: actualizar_datos, verificar_rfc, verificar_lote, buscar_nombre. Two names are noun phrases, estado_datos and resumen_cartera, which is a minor deviation from the otherwise consistent style.
Six tools are well-scoped for this SAT list verification server. Each tool adds a distinct capability, covering data ingestion, verification, search, and summary without redundancy or bloat.
The toolset covers the core workflow: update and inspect dataset state, verify single or batch RFCs, search by name, and generate portfolio summaries. A dedicated detailed taxpayer-profile tool could be a minor addition, but the main use cases are well supported.
Maintenance
Related MCP Connectors
Mexican RFC/SAT 69-B, CFDI, CURP (RENAPO) and INE checks against the official registries.
Mexican invoicing (CFDI 4.0) and SAT taxes: search, draft and stamp invoices, IVA/ISR, 32-D.
Issue, sign and manage Mexican CFDI 4.0 e-invoices, complements and credit notes.
Official-source lookups on people and companies: registration status (CPF/CNPJ), Simples/MEI, SINTEG
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables querying the Colombian Business Registry (RUES) for company searches by name, location grouping, and detailed company information.MIT
- FlicenseNot gradedqualityDmaintenanceEnables consultation of Argentine credit situations (Central de Deudores) via BCRA API, providing tools for current status, historical trends, rejected checks, and consolidated reports.-
- AlicenseNot gradedqualityDmaintenanceQuery Brazilian Federal Revenue (Receita Federal) tax situation data from official sources via a single read-only tool, hosted and billed per use.MIT
- AlicenseAqualityBmaintenanceEnables AI agents to validate Mexican RFC, CURP, CLABE and NSS identifiers with real check digits, parse CFDI 4.0 invoices with labelled SAT catalogue codes and verified totals, and query the SAT's public status service to see whether an invoice is still valid. It also generates coherent test people and companies, all read-only and without API keys, certificates or PAC contracts.9108 npm1MIT