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. 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-mcpWindows: 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/mcpIt 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 /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
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 | |
|
| 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. 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
Available Tools
3 toolsdof_daily_summaryDOF daily summaryARead-onlyIdempotent
Lists the publications in the Diario Oficial de la Federación for one day, with counts by edition and issuing organization. Use the returned ids with dof_get_note. Days without an issue (weekends, holidays) return total 0.
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Day to summarize, YYYY-MM-DD. Defaults to today. | |
| limit | No | Maximum notes to list; counts always cover the whole day | |
| edition | No | Only include this edition | |
| organization | No | Only include notes whose organization contains this text (case-insensitive) |
Output Schema
| Name | Required | Description |
|---|---|---|
| date | Yes | |
| notes | Yes | |
| total | Yes | |
| source | Yes | |
| byEdition | Yes | |
| truncated | Yes | |
| provenance | Yes | SIDOF URL the data came from, fetch time (UTC) and SHA-256 of the raw response |
| byOrganization | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds genuinely new behavioral context: a summary/aggregate result shape with per-edition and per-organization counts, plus the empty-day returning total 0. It does not discuss rate limits or pagination behavior beyond what the limit param implies.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences: what it lists, the follow-up, and the empty-day behavior. Scope is front-loaded and every clause carries information the agent needs; nothing is repeated from the title or schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only listing tool with an output schema that already defines the return shape, the description still covers the two things an agent could get wrong: that the day may legitimately be empty and that ids should be fed to dof_get_note. Nothing needed to call it correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and each of the four parameters has a precise description including the date format, the limit ceiling and the "counts always cover the whole day" caveat, plus an enum for edition. The description adds essentially no parameter-level detail beyond restating the one-day scope, so the baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ("Lists") plus resource ("publications in the Diario Oficial de la Federación") with an explicit time scope ("for one day") and the aggregation it returns (counts by edition and issuing organization). It also positions itself against the sibling dof_get_note by naming it as the consumer of the returned ids, so an agent can place it in the workflow without opening either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives a clear next step ("Use the returned ids with dof_get_note") and a concrete edge-case rule ("Days without an issue (weekends, holidays) return total 0") that tells the agent not to treat empty results as failure. No explicit exclusion or comparison against dof_get_indicators, so it stops short of full when/when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dof_get_indicatorsDOF financial indicatorsARead-onlyIdempotent
Returns indicators published in the DOF: FIX exchange rate (pesos per dollar), UDI value and TIIE rates. Without arguments, returns what SIDOF lists for today (on weekends and holidays that can be only the UDI). With date, the values published that day. With indicator, from and to, the daily series of one indicator (at most 366 days); prefer a series to find the most recent value of one indicator.
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Series end, YYYY-MM-DD (needs indicator) | |
| date | No | Publication day, YYYY-MM-DD | |
| from | No | Series start, YYYY-MM-DD (needs indicator) | |
| indicator | No | Indicator for a date-range series |
Output Schema
| Name | Required | Description |
|---|---|---|
| source | Yes | |
| indicators | Yes | |
| provenance | Yes | SIDOF URL the data came from, fetch time (UTC) and SHA-256 of the raw response |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare read-only, idempotent, non-destructive, and open-world behavior. The description adds meaningful operational context beyond that, including the weekend/holiday caveat, the date-publication behavior, and the 366-day series limit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is tightly structured and front-loaded: it states what is returned, then covers the no-argument, date, and series modes. There is no filler, and every sentence contributes to correct invocation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given four optional parameters, full schema coverage, and an output schema, the description provides enough detail to call the tool correctly across all modes. Its main gap is that it does not route the agent between this tool and dof_daily_summary.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the parameter-level descriptions already carry much of the burden. The tool description adds value by explaining how parameters combine into modes and by clarifying that 'indicator' with 'from'/'to' produces a daily series limited to at most 366 days.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear verb and resource (returns DOF-published financial indicators) and names the specific indicators: FIX, UDI, and TIIE. It does not explicitly differentiate this tool from the sibling dof_daily_summary, so it falls short of the top score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It clearly explains the three invocation modes: no arguments for today, date for that day, and indicator+from+to for a daily series. It also gives a useful preference hint to use a series for finding the most recent value, though it does not name sibling alternatives or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dof_get_noteGet DOF noteARead-onlyIdempotent
Returns one DOF publication with its content as plain text. Long notes are paged: when nextOffset is present, call again with offset=nextOffset for the rest.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Note id from dof_daily_summary | |
| offset | No | Character offset into the text | |
| maxChars | No | Maximum characters of text to return |
Output Schema
| Name | Required | Description |
|---|---|---|
| id | Yes | |
| date | Yes | |
| page | Yes | |
| text | Yes | |
| title | Yes | |
| branch | Yes | |
| hasDoc | Yes | |
| hasPdf | Yes | |
| offset | Yes | |
| source | Yes | |
| edition | No | |
| section | Yes | |
| citation | Yes | Citation in the format SIDOF's legal notice requires when reproducing the text |
| nextOffset | No | |
| provenance | Yes | SIDOF URL the data came from, fetch time (UTC) and SHA-256 of the raw response |
| totalChars | Yes | |
| officialUrl | Yes | |
| organizations | Yes | |
| contentTooLarge | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare this as a safe, idempotent read operation, and the description adds useful behavioral detail about plain-text content and continuation via nextOffset. It does not cover permissions or rate limits, but those are not essential here given the annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences carry the core purpose first and the paging instruction second. There is no wasted text, and the most important calling behavior is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has an output schema and rich annotations, so the description need not explain return shape or safety profile. It adequately covers purpose and pagination, with only minor gaps such as not mentioning maxChars truncation behavior in the prose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds real meaning beyond the schema by connecting the output field nextOffset to the offset parameter for paging, though maxChars remains documented only in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: it returns one DOF publication with content as plain text. It is clear what the tool does, but it does not explicitly differentiate itself from siblings such as dof_daily_summary or dof_get_indicators.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The pagination guidance is explicit: when nextOffset is present, call again with offset=nextOffset. However, the description does not state when to choose this tool over its siblings or what prerequisite workflow should produce the note id, so broader usage is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.2.2- First observed
dof_daily_summary - First observed
dof_get_indicators - First observed
dof_get_note
TDQS
Scored across 3 tools
Each tool targets a distinct object and action: a daily index of publications, a single publication's content, and economic indicators. The descriptions explicitly chain them ('Use the returned ids with dof_get_note') and clarify that indicators are a separate query mode, leaving no realistic misselection risk.
All three share a clear 'dof_' namespace, but two use the verb_get pattern (dof_get_note, dof_get_indicators) while the third is a noun phrase (dof_daily_summary). The deviation is minor and readable.
Three tools is at the thin end of a well-scoped set, but each covers a genuinely different need (index, document, series data) with no filler. It is slightly under-powered for a document-retrieval domain rather than over-scoped.
The core lifecycle (list a day, fetch a note with pagination, pull indicator series) is covered, but there is no way to search publications by keyword, organization, or date range across days, forcing agents to crawl day by day. That is a notable gap for a lookup service.
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.
Fetch any RSS/Atom feed as clean JSON or extract article text from any URL. Built for AI agents.
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.395 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.626 PyPI6MIT