
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 分