
Diario Oficial de la Federación (unofficial)
io.github.amatiasdev由 GitHub 账号 amatiasdev 发布v0.2.2更新于 Oct 27, 2026
Publications and financial indicators from Mexico's Diario Oficial de la Federación (DOF)
概览
面向墨西哥《联邦官方公报》的只读 MCP 服务器,可通过公开 SIDOF API 获取每日公告、公告全文与金融指标。
- 可以做什么
- 按版次和组织汇总某日的公报发布内容,可按版次或组织筛选
- 以纯文本读取单篇公告,长文可分页获取
- 查询某日的 FIX 汇率、UDI 与 TIIE 利率,或某一指标的每日序列
- 每条结果附带 dof.gob.mx 官方链接与来源信息(来源网址、抓取时间、SHA-256)
- 适用场景
- 适合需要查阅墨西哥联邦法律、法令、税务或海关规定以及官方金融指标,并引用官方来源的场景。适用于研究或起草工作,用户随后可对照官方版本核实。
- 运行要求
- npm 包需 Node.js 22 或更高版本,通过 stdio 运行(例如用 npx)。未声明需要账号、API 密钥或环境变量。也可使用公开托管的 Streamable HTTP 端点,或在 127.0.0.1 本地以 HTTP 方式运行。需要能访问 SIDOF API 的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Diario Oficial de la Federación (unofficial),将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
dof-mcp
[CI] [Contract] [OpenSSF Scorecard] [OpenSSF Best Practices] [npm]
MCP server and typed TypeScript client for Mexico's Diario Oficial de la Federación (DOF), built on the public SIDOF JSON API, so AI agents (Claude Code, Claude Desktop, Cursor, etc.) can read official publications and financial indicators.
Why
The DOF is where federal laws, decrees, tax and customs rules, and official indicators are published. Its JSON API is public, with only sparse official documentation (https://sidof.segob.gob.mx/datos_abiertos), and there is no typed client or MCP server for it on npm. This project wraps it with validation, provenance and a stable, normalized shape.
MCP server
Three read-only tools:
Every result includes:
officialUrl: the publication on dof.gob.mx, so a person can check the official textprovenance: the SIDOF URL the data came from, when it was fetched (UTC) and a SHA-256 of the raw response
Install
Requires Node.js 22 or later. The server runs over stdio; add it to your MCP client:
- Claude Desktop: Settings → Developer → Edit Config, which opens
claude_desktop_config.json(%APPDATA%\Claude\on Windows,~/Library/Application Support/Claude/on macOS). - Cursor:
.cursor/mcp.jsonin your project, or~/.cursor/mcp.jsonfor every project. - Claude Code:
claude mcp add dof -- npx -y dof-mcp - Windows: if your client cannot start
npxdirectly, use"command": "cmd", "args": ["/c", "npx", "-y", "dof-mcp"].
Hosted endpoint (no install)
A public instance runs at https://mcp.aldomatias.com/mcp (Streamable HTTP, no authentication, rate limited). Use it from clients that accept remote MCP servers, such as custom connectors in Claude, or:
It serves the same tools and the same release as the npm package. It is a free, best-effort service with no SLA; for heavy use, run the package yourself.
Privacy. The endpoint does not store IP addresses, tool arguments or results. For each request it logs the HTTP method and path, status, duration, the JSON-RPC method, the tool name, and the name and version your MCP client reports about itself (for example claude-ai). Those logs are kept for 7 days in AWS CloudWatch and are used only to count usage and detect failures. Traffic passes through Cloudflare, which processes IP addresses to apply rate limiting and DDoS protection under its own privacy policy. Questions: [email protected].
Streamable HTTP
The HTTP transport is stateless, binds to 127.0.0.1 and validates the Host and Origin headers (--allowed-host <name> adds hostnames). It has no authentication or rate limiting: to expose it beyond localhost, put it behind a reverse proxy that adds them. See SECURITY.md.
Client
The package is ESM. import works everywhere; require("dof-mcp") works on Node.js 22.12 and later (require(esm)).
Options (all optional):
Design notes
- Validation at the boundary. Every response is parsed with Zod; an unexpected shape fails loudly instead of leaking
undefinedinto callers. - Normalization. SIDOF mixes section headers and publications in one list and writes some missing values as the string
"null"; the client returns titled publications only, with ISO dates, booleans and plain-text content. - Polite to the source. Identifying
User-Agent, concurrency limit, cache, no redirects. SIDOF answers406to a bareAccept: application/json, so the client sends a header with a fallback. - Recorded fixtures. Tests run against real recorded responses; a nightly contract test checks the live API still matches.
Roadmap
- Typed client for daily publications, note detail and indicators (FIX, UDIS, TIIE)
- MCP server (stdio + Streamable HTTP) with
dof_daily_summary,dof_get_note,dof_get_indicators - Hardening: size limits, backoff with jitter, cache, provenance; nightly contract test
- Release pipeline: npm trusted publishing with provenance, MCP Registry
- Optional: hosted endpoint, local search index (
dof_search_notes; SIDOF's own search is broken)
Development
See CONTRIBUTING.md and RELEASING.md.
Disclaimer
Unofficial project, not affiliated with the Secretaría de Gobernación. Data comes from the public SIDOF API and may change without notice. The text this package returns is a plain-text conversion, not the official edition: the official DOF is the signed PDF on dof.gob.mx, so always confirm against it.
The MIT license covers this code, not DOF content. SIDOF's legal notice allows reproducing its content for non-commercial purposes when the source is cited; commercial use requires written consent from the Secretaría de Gobernación. If you republish content obtained with this package, cite the Diario Oficial de la Federación as the source.
License
MIT
来源:README.md,提交 2d0d84d
工具
0版本历史
2- v0.2.2最新Oct 18, 2026
- v0.1.0Oct 18, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分