sat69-mcp
MCP SAT 69 / 69-B · WATR
一个用 Python / FastMCP 编写的 MCP(Model Context Protocol) 服务器,用于查询 SAT 的公共列表:
CFF 第 69-B 条(EFOS) —— 虚构交易:推定、已推翻、最终、有利判决。
CFF 第 69 条 —— 确定的税务状况:已确定、可执行、未找到、已取消、已豁免。
与 SSC-CDMX 的 movilizaciones MCP 架构一致:FastMCP 采用 stdio + Streamable HTTP 传输;OAuth 2.1(WorkOS AuthKit) 可回退到静态 bearer;持久化使用 Turso(libSQL);支持可选的下载代理;部署在 Render 上,由外部 cron(GitHub Actions)触发。无需 OCR:SAT 的 CSV 本身就是结构化数据。
工具
工具 | 功能 |
| 验证一个 RFC → 风险判定( |
| 最多验证 500 个 RFC;仅按严重程度返回发现项。 |
| 按名称/法定名称搜索(FTS5,不区分重音)。 |
| SAT 声明的有效期、计数和最近一次导入。 |
| 下载 + 同步列表(按哈希幂等)。 |
风险: CRITICO(EFOS 最终)· ALTO(EFOS 推定)· MEDIO(69 已确定/可执行/未找到)· BAJO(已推翻/有利判决)· INFORMATIVO(69 已取消/已豁免)· LIMPIO。
结果反映 SAT 公共文件的最近一次导入。不构成税务或法律建议。
Related MCP server: rues
架构
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)+ 工具 + AuthKit。web.py—— Starlette/uvicorn(HTTP):/health(公开)、/refresh和/reload(bearer M2M)、/mcp(OAuth 或 bearer)。pipeline.py—— 下载 → SHA-256(未变更则跳过)→ Latin-1 解析 → 在 SQLite 中替换 → 推送至 Turso。database.py—— SQLite + 带触发器的 FTS5;RFC 走 B-tree 索引(热路径)。turso.py—— Turso ↔ 本地的持久化同步。risk.py—— RFC 规范化 + 判定树(69-B 优先于 69)。
本地安装
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在 Claude Desktop / Cowork 中连接(stdio)
{
"mcpServers": {
"sat69": { "command": "sat69-mcp" }
}
}(或在激活 venv 的情况下使用 "command": "python", "args": ["-m", "sat69"]。)
在 Render 上部署
render.yaml 使用原生 Python 运行时配置 Web 服务(无需 Docker):
将仓库推送到 GitHub,并在 Render 中创建一个指向
render.yaml的 Blueprint。变量(标记为
sync:false):MCP_API_KEY(bearer)、可选的AUTHKIT_DOMAIN+BASE_URL(OAuth)、TURSO_DATABASE_URL+TURSO_AUTH_TOKEN。MCP 端点:
POST https://<servicio>.onrender.com/mcp。
认证(两种模式,与 movilizaciones 相同)
静态 Bearer(
MCP_API_KEY):简单,保护/mcp、/refresh、/reload。OAuth 2.1(WorkOS AuthKit):设置
AUTHKIT_DOMAIN+BASE_URL后,/mcp将切换为使用 Dynamic Client Registration 的 OAuth;bearer 仍继续保护 M2M 端点。
自动刷新
.github/workflows/refresh.yml 每天执行 POST /refresh(11:30 UTC ≈ 05:30 CDMX)。仓库 Secrets:RENDER_BASE_URL、MCP_API_KEY。手动:workflow_dispatch(带 force)。
持久化(Turso)
本地 SQLite(在 Render 上为临时存储,位于 /tmp)负责处理查询;Turso 是持久化存储层,能够在重新部署后保留数据。启动时从 Turso 拉取;每次 actualizar_datos//refresh 后推送。未配置 TURSO_* 时,以纯本地模式运行。
下载代理(可选)
FETCH_PROXY 或 DATAIMPULSE_* 仅路由 CSV 的下载。测试中,SAT 并未屏蔽数据中心 IP(直接下载返回 200),因此通常无需代理;保留它只是为了对等性和弹性。
数据来源(SAT · 开放数据)
69-B:
Listado_Completo_69-B.csv(约 1.4 万条记录,20 列,表头在第 3 行)。69:
Firmes.csv、Cancelados.csv、NoLocalizados.csv、Exigibles.csv、Sentencias.csv、Condonados.csv(约 50 万条记录,6 列)。URL 见config.py。
Maintenance
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
- FlicenseAqualityDmaintenanceLatin 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
- FlicenseNot gradedqualityDmaintenanceEnables querying the Colombian Business Registry (RUES) for company searches by name, location grouping, and detailed company information.
- FlicenseNot gradedqualityCmaintenanceProvides 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.
- FlicenseNot gradedqualityCmaintenanceEnables consultation of Argentine credit situations (Central de Deudores) via BCRA API, providing tools for current status, historical trends, rejected checks, and consolidated reports.
Related MCP Connectors
Simplified lookup of a person's or company's lawsuits from the CPF or CNPJ. Platform-hosted, no cred
Receita Federal: Situação Fiscal, official-source lookup. Platform-hosted, pay per query with prepai
Receita Federal PGFN: Lista de Devedores, official-source lookup. Platform-hosted, pay per query wit
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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