dof-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dof-mcpwhat was the FIX exchange rate on October 16, 2026?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: Tlaloc MCP Server
MCP server
Three read-only tools:
Tool | What it returns |
| A day's publications with counts by edition and organization; filter by edition or organization |
| One publication as plain text, paged with |
| 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. Add it to your MCP client configuration (stdio):
{
"mcpServers": {
"dof": { "command": "npx", "args": ["-y", "dof-mcp"] }
}
}With Claude Code:
claude mcp add dof -- npx -y dof-mcpStreamable HTTP
npx dof-mcp --http --port 3000 # endpoint http://127.0.0.1:3000/mcp, probe /healthzThe 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
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 | |
|
| Per-request timeout |
|
| Retries for network errors, 429 and 5xx, with exponential backoff and full jitter; honors |
| 10 MiB | Larger responses are rejected unparsed |
| 10 min | In-memory cache; identical concurrent requests share one fetch. |
|
| LRU bound |
| 512 KiB | Larger responses are returned but not cached |
|
| Requests in flight to SIDOF at once |
|
| Requests waiting for a slot; beyond it they fail fast with |
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_indicatorsHardening: 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 APIDisclaimer
Unofficial project, not affiliated with the Secretaría de Gobernación. Data comes from the public SIDOF API and may change without notice; always confirm against the official DOF publication. SIDOF's legal notice allows non-commercial reproduction of its content.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Official Mexican data for AI agents: CURP, RFC, CFDI, postal codes, phone, SPEI/CEP, DOF, geocoding.
US government data as clean JSON for AI agents: SAM.gov contract opportunities, USAspending awards, Grants.gov grants, House STOCK Act trades, and SEC EDGAR filings (Form 4 insider trades, 8-K events, 13F holdings, 13D/G stakes, XBRL fundamentals, 10-K/10-Q sections). 19 read-only tools. Data is as fresh as each source publishes; congressional trades lag up to 45 days and report dollar ranges (House only). Free tier, no card.
US Federal Register for AI agents: rules, notices, executive orders, agency lookup. No keys.
US Federal Register for AI agents: rules, notices, executive orders, agency lookup. No keys.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides access to Mexico's INEGI (national statistics office) indicators API, enabling AI agents to query statistical data through natural language or direct tool calls.20 npmMIT

Tlaloc MCP Serverofficial
AlicenseNot gradedqualityCmaintenanceProvides AI assistants with live, authenticated access to official Mexican data sources including CURP, RFC, postal codes, phone numbers, SPEI payments, CFDI status, DOF semantic search, and geocoding via INEGI/INE.MIT- FlicenseNot gradedqualityCmaintenanceEnables AI agents to search Mexican federal and state statutes, Supreme Court theses, and precedents, returning verifiable citations with dated validity, public URLs, and explicit indication of whether case law is binding jurisprudence or merely persuasive.-
- AlicenseAqualityAmaintenanceEnables AI assistants and agents to query official Mexican economic data from Banxico, including USD/MXN exchange rates, inflation (INPC), UDIS, and interest rates.6654 PyPI4MIT