Diario Oficial de la Federación (unofficial) MCP Server
Publications and financial indicators from Mexico's Diario Oficial de la Federación (DOF)
Diario Oficial de la Federación (unofficial) scores 69 (Good), licensed MIT and written in TypeScript. It installs as a local process. It declares 1 tool. Filed under Uncategorized. GitHub shows 0 stars. Package registries report about 70 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
69 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Where the 69 comes from
22 + 20 + 3 + 10 + 4 + 10 = 69. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 3 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "amatiasdev-dof-mcp": { "command": "npx", "args": [ "-y", "dof-mcp@0.2.2" ] } }}
Environment variables
This server does not declare environment variables.
Tools1Tool docs quality grade C
All capabilitiesofficialUrltoolthe publication on dof.gob.mx, so a person can check the official text
About
dof-mcp
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:
| Tool | What it returns |
|---|---|
dof_daily_summary | A day's publications with counts by edition and organization; filter by edition or organization |
dof_get_note | One publication as plain text, paged with offset / maxChars for long notes |
dof_get_indicators | FIX exchange rate, UDI and TIIE rates for a day, or a daily series of one indicator |
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:
{
"mcpServers": {
"dof": { "command": "npx", "args": ["-y", "dof-mcp"] }
}
}
- 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:
claude mcp add --transport http dof https://mcp.aldomatias.com/mcp
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: contacto@aldomatias.com.
Streamable HTTP
npx dof-mcp --http --port 3000 # endpoint http://127.0.0.1:3000/mcp, probe /healthz
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)).
import { DofClient } from "dof-mcp";
const dof = new DofClient();
const notes = await dof.getNotes("2026-10-16");
// [{ id: 5801377, title: "Acuerdo por el que se crea ...", date: "2026-10-16",
// edition: "matutina", branch: "PODER EJECUTIVO",
// organization: "SECRETARIA DE SEGURIDAD Y PROTECCION CIUDADANA", page: 4,
// hasPdf: true, hasHtml: true,
// officialUrl: "https://dof.gob.mx/nota_detalle.php?codigo=5801377&fecha=16/10/2026" }, ...]
const note = await dof.getNote(5801457); // full text as plain text
const fix = await dof.getIndicatorSeries("fix", "2026-10-01", "2026-10-16");
const { data, source } = await dof.getNotesWithSource("2026-10-16");
// source: { sourceUrl, fetchedAt, sha256, bytes }
Options (all optional):
| Option | Default | |
|---|---|---|
timeoutMs | 15000 | Per-request timeout |
retries | 2 | Retries for network errors, 429 and 5xx, with exponential backoff and full jitter; honors Retry-After up to 30 s |
maxResponseBytes | 10 MiB | Larger responses are rejected unparsed |
cacheTtlMs | 10 min | In-memory cache; identical concurrent requests share one fetch. 0 disables |
cacheMaxEntries | 256 | LRU bound |
maxCacheableBytes | 512 KiB | Larger responses are returned but not cached |
maxConcurrency | 4 | Requests in flight to SIDOF at once |
maxQueue | 64 | Requests waiting for a slot; beyond it they fail fast with DofQueueFullError |
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.
npm install
npm run lint && npm run typecheck && npm test && npm run build
npm run test:live # contract tests against the live API
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
Frequently asked questions
What is Diario Oficial de la Federación (unofficial) MCP Server?
Publications and financial indicators from Mexico's Diario Oficial de la Federación (DOF)
How do I install Diario Oficial de la Federación (unofficial) MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Diario Oficial de la Federación (unofficial) MCP Server runs locally from the npm package dof-mcp with the command npx -y dof-mcp@0.2.2.
Is Diario Oficial de la Federación (unofficial) MCP Server free and open source?
Yes. Diario Oficial de la Federación (unofficial) MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does Diario Oficial de la Federación (unofficial) MCP Server support remote (HTTP) connections?
No remote endpoint is listed for Diario Oficial de la Federación (unofficial) MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does Diario Oficial de la Federación (unofficial) MCP Server provide?
Diario Oficial de la Federación (unofficial) MCP Server provides 1 tool: officialUrl. See the full tool list for descriptions and parameters.
How is Diario Oficial de la Federación (unofficial) MCP Server's trust score calculated?
Diario Oficial de la Federación (unofficial) MCP Server scores 69 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.