Skip to main content
Glama

MCP SAT 69 / 69-B · WATR

Server MCP (Model Context Protocol) in Python / FastMCP zur Abfrage der öffentlichen Listen des SAT:

  • Artikel 69-B des CFF (EFOS) — simulierte Geschäfte: mutmaßlich, entkräftet, endgültig, günstiges Urteil.

  • Artikel 69 des CFF — bestandskräftige Steuersituation: rechtskräftig, fällig, nicht lokalisiert, annulliert, erlassen.

Gleiche Architektur wie das MCP für Einsätze der SSC-CDMX: FastMCP mit Transport stdio + Streamable HTTP, OAuth 2.1 (WorkOS AuthKit) mit Fallback auf statisches Bearer-Token, Persistenz in Turso (libSQL), optionaler Download-Proxy und Deployment auf Render mit externem Cron (GitHub Actions). Kein OCR: Die CSV-Dateien des SAT sind bereits strukturiert.

Tools

Tool

Was es tut

verificar_rfc

Prüft einen RFC → Risiko-Verdikt (CRITICOLIMPIO).

verificar_lote

Validiert bis zu 500 RFCs; liefert nur Feststellungen nach Schweregrad.

buscar_nombre

Suche nach Name/Firmenname (FTS5, akzentunabhängig).

estado_datos

Vom SAT angegebene Gültigkeit, Anzahl und letzter Import.

actualizar_datos

Lädt die Listen herunter + synchronisiert sie (idempotent per Hash).

Risiko: CRITICO (EFOS endgültig) · ALTO (EFOS mutmaßlich) · MEDIO (69 rechtskräftig/fällig/nicht lokalisiert) · BAJO (entkräftet/günstiges Urteil) · INFORMATIVO (69 annulliert/erlassen) · LIMPIO.

Die Ergebnisse spiegeln den letzten Import der öffentlichen SAT-Dateien wider. Sie stellen keine steuerliche oder rechtliche Beratung dar.

Related MCP server: rues

Architektur

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 /reload
  • server.py — FastMCP (stdio) + Tools + AuthKit.

  • web.py — Starlette/uvicorn (HTTP): /refresh und /reload (M2M-Bearer), /mcp (OAuth oder Bearer).

  • pipeline.py — Download → SHA-256 (überspringt, falls unverändert) → Latin-1-Parsing → Ersetzen in SQLite → Push zu Turso.

  • database.py — SQLite + FTS5 mit Triggern; RFC über B-Baum-Index (Hot Path).

  • turso.py — dauerhafte Synchronisierung Turso ↔ lokal.

  • risk.py — RFC-Normalisierung + Veredikt-Baum (69-B hat Vorrang vor 69).

Lokale 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 -q

Verbindung in Claude Desktop / Cowork (stdio)

{
  "mcpServers": {
    "sat69": { "command": "sat69-mcp" }
  }
}

(oder "command": "python", "args": ["-m", "sat69"] mit aktivem venv.)

Deployment auf Render

render.yaml stellt den Webdienst mit nativem Python-Runtime bereit (ohne Docker):

  1. Lade das Repo auf GitHub hoch und erstelle einen Blueprint in Render, der auf render.yaml zeigt.

  2. Variablen (markiert mit sync:false): MCP_API_KEY (Bearer), optional AUTHKIT_DOMAIN+BASE_URL (OAuth), TURSO_DATABASE_URL+TURSO_AUTH_TOKEN.

  3. MCP-Endpoint: POST https://<servicio>.onrender.com/mcp.

Auth (zwei Modi, wie beim MCP für Einsätze)

  • Statischer Bearer (MCP_API_KEY): einfach, schützt /mcp, /refresh, /reload.

  • OAuth 2.1 (WorkOS AuthKit): Definiere AUTHKIT_DOMAIN + BASE_URL, und /mcp wechselt zu OAuth mit Dynamic Client Registration; der Bearer schützt weiterhin die M2M-Endpoints.

Automatische Aktualisierung

.github/workflows/refresh.yml führt täglich POST /refresh aus (11:30 UTC ≈ 05:30 CDMX). Repo-Secrets: RENDER_BASE_URL, MCP_API_KEY. Manuell: workflow_dispatch (mit force).

Persistenz (Turso)

Lokales SQLite (flüchtig auf Render, /tmp) bedient die Abfragen; Turso ist der dauerhafte Speicher, der Redeploys übersteht. Beim Start wird ein Pull von Turso durchgeführt; nach jedem actualizar_datos//refresh wird ein Push ausgeführt. Ohne TURSO_* läuft es im reinen lokalen Modus.

Download-Proxy (optional)

FETCH_PROXY oder DATAIMPULSE_* routen nur den Download der CSV-Dateien. In Tests blockierte der SAT keine Rechenzentrums-IPs (direkte Downloads mit 200), daher ist es normalerweise nicht erforderlich; es wird aus Parität und Resilienz beibehalten.

Datenquellen (SAT · Datos Abiertos)

  • 69-B: Listado_Completo_69-B.csv (~14.000 Datensätze, 20 Spalten, Header in Zeile 3).

  • 69: Firmes.csv, Cancelados.csv, NoLocalizados.csv, Exigibles.csv, Sentencias.csv, Condonados.csv (~½ Million Datensätze, 6 Spalten). URLs in config.py.

A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Latin American business compliance suite — 28 tools for tax ID validation (CPF, CNPJ, RFC, RUT, CUIT, NIT), banking (PIX, CLABE, CBU), VAT rules, e-invoicing (NF-e, CFDI, DTE), holidays, and labor calendar across Brazil, Mexico, Chile, Argentina, and Colombia.
    28
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables querying the Colombian Business Registry (RUES) for company searches by name, location grouping, and detailed company information.
  • F
    license
    Not graded
    quality
    C
    maintenance
    Provides business intelligence, compliance tools, and economic data for Latin America, including Brazilian company lookups, tax ID validation for multiple countries, and economic indicators from official government sources.
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables consultation of Argentine credit situations (Central de Deudores) via BCRA API, providing tools for current status, historical trends, rejected checks, and consolidated reports.

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/edbror/sat69-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server