Skip to main content
Glama
jkamilo81

diario-oficial-mcp

by jkamilo81

Diario Oficial MCP

🌐 English | Español

An MCP server that obtains the Colombian Diario Oficial daily PDF from the Imprenta Nacional public consultation portal (https://svrpubindc.imprenta.gov.co/diario/).

The server's job is acquisition: it downloads the official PDF and returns its file path plus metadata. Reading the document or building alerts on top of it is left to the calling agent / user.

Disclaimer. This is an unofficial, community project. It is not affiliated with, endorsed by, or supported by the Imprenta Nacional de Colombia. It works by reading the public consultation portal's current HTML, so it may break if the site changes. Use it responsibly and keep request volume modest against a government service.

Tools

Tool

Description

list_recent_editions

List the most recent editions (numero, tipo, fecha). No download.

download_latest_edition

Download the newest published edition.

download_edition_by_date

Download the edition for a given day (dd/MM/yyyy).

download_edition_by_number

Download a specific edition by number (53524 or 53.524).

Each download tool saves the PDF and returns:

{
  "numero": "53.524",
  "tipo": "Ordinaria",
  "fecha": "16/06/2026",
  "path": "/Users/you/Downloads/diario-oficial/DiarioOficial_53524_2026-06-16.pdf",
  "size_bytes": 13265672
}

Related MCP server: pdf-organizer-mcp

Where PDFs are saved

In order of precedence:

  1. The output_dir argument passed to the tool.

  2. The DIARIO_OFICIAL_DIR environment variable.

  3. Default: ~/Downloads/diario-oficial.

You only need uv installed. uv fetches the code from git, sets up an isolated environment, and runs the server — no manual clone or install. Add this to your MCP config:

  • Kiro: .kiro/settings/mcp.json (workspace) or ~/.kiro/settings/mcp.json (global)

  • Claude Desktop: claude_desktop_config.json

{
  "mcpServers": {
    "diario-oficial": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/jkamilo81/diario-oficial-mcp",
        "diario-oficial-mcp"
      ],
      "env": {
        "DIARIO_OFICIAL_DIR": "/Users/you/Documents/diario-oficial"
      },
      "disabled": false,
      "autoApprove": ["list_recent_editions"]
    }
  }
}

Pin a released version by appending a tag, e.g. git+https://github.com/jkamilo81/diario-oficial-mcp@v0.1.0.

Verify it runs at all:

uvx --from git+https://github.com/jkamilo81/diario-oficial-mcp diario-oficial-mcp

(The process starts and waits for an MCP client on stdio; press Ctrl+C to exit.)

A colleague can then ask their agent things like "download today's Diario Oficial" or "get edition 53.510", then read or set up alerts on the saved PDF.

Local development

git clone https://github.com/jkamilo81/diario-oficial-mcp
cd diario-oficial-mcp
uv venv
uv pip install -e ".[dev]"
uv run diario-oficial-mcp   # run over stdio
pytest -q                   # smoke tests against the live portal

Config pointing at your local checkout instead of git:

{
  "mcpServers": {
    "diario-oficial": {
      "command": "uv",
      "args": ["run", "--directory", "/absolute/path/to/diario-oficial-mcp", "diario-oficial-mcp"]
    }
  }
}

How it works

The portal is a JSF/PrimeFaces application. Downloading an edition is a session-bound, three-step flow handled by client.py:

  1. GET /diario/ — obtain the JSESSIONID cookie and JSF ViewState; the landing page already lists the most recent editions with per-row "Ver Diario" buttons.

  2. POST the row button — returns a viewer page containing a PrimeFaces streamed-content URL.

  3. GET that streamed-content URL (same session) — returns the PDF bytes.

Search by date or number is a POST of the search form that re-renders the editions table with the matching row, after which the same download flow runs.

Troubleshooting

  • No editions returned / "Could not find ... ViewState". The portal HTML likely changed. The brittle parts are the PrimeFaces component ids in client.py (e.g. dtbDiariosOficiales:*:j_idt38). Run pytest -q to confirm and update the parsing.

  • No edition found for date .... No edition was published that day (weekends/holidays), or the date is not in dd/MM/yyyy format.

  • TLS / certificate errors. httpx bundles its own CA store, so this is usually a network/proxy issue rather than the portal.

  • The server "hangs" when run manually. Expected — it waits for an MCP client on stdio. It's meant to be launched by Kiro / Claude Desktop.

Notes & limitations

  • Depends on the portal's current HTML structure; see Troubleshooting.

  • Editions are typically large scanned PDFs (10+ MB). Text extraction / OCR for reading or alerting is intentionally out of scope for this server.

  • Be considerate with request volume against a government service.

License

MIT

Available Tools

4 tools
download_edition_by_dateA

Download the Diario Oficial edition published on a specific date.

Args: date: Publication date in dd/MM/yyyy format (e.g. "16/06/2026"). output_dir: Directory to save the PDF (see download_latest_edition).

Returns metadata plus the saved file path and size. Raises if no edition was published on that date.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYes
output_dirNo

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses that it downloads a PDF, returns metadata plus file path and size, and raises an error if no edition exists. It does not detail output_dir behavior (defers to another tool) or side effects like overwriting, but is adequate for a simple download.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences plus clean argument descriptions. No fluff, front-loaded purpose, and easy to parse. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers tool purpose, parameter semantics, error handling, and return values. Lacks explicit details on output_dir default behavior and exact return structure, but references another tool for more info. Adequate for a simple two-parameter tool without output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description must compensate. It explains 'date' format with example ('dd/MM/yyyy') and 'output_dir' purpose (directory to save PDF). It adds semantic value beyond schema types, though output_dir details are deferred.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Download the Diario Oficial edition published on a specific date' with a specific verb and resource. It distinguishes from siblings like download_edition_by_number and download_latest_edition by emphasizing the date-based selection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context for when to use (by date) and mentions error condition ('Raises if no edition was published'). However, it does not explicitly advise against using it for other criteria or list alternatives, though sibling tool names imply them.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

download_edition_by_numberB

Download a specific Diario Oficial edition by its edition number.

Args: number: Edition number, with or without thousands separators (e.g. "53524" or "53.524"). output_dir: Directory to save the PDF (see download_latest_edition).

Returns metadata plus the saved file path and size. Raises if the edition number is not found.

ParametersJSON Schema
NameRequiredDescriptionDefault
numberYes
output_dirNo

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses the return format ('metadata plus the saved file path and size') and error behavior ('Raises if the edition number is not found'), which is helpful. However, it does not discuss side effects (e.g., file system writes, overwrite behavior) or safety, and relies on a cross-reference for output_dir details. With no annotations, this is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, front-loads the main purpose, and separates parameter details. It uses clear formatting. One sentence on output_dir references another tool, which is efficient but somewhat indirect.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with two parameters and no output schema or annotations, the description covers the core purpose, parameters with examples, return value, and error behavior. It is mostly complete, though it omits details on output_dir default behavior (e.g., when null) and file naming.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates by providing examples for the 'number' parameter ('e.g., "53524" or "53.524"') and a cross-reference for 'output_dir'. This adds practical meaning beyond the bare schema types.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Download') and the resource ('a specific Diario Oficial edition by its edition number'). It differentiates from sibling tools through the parameter, but does not explicitly contrast with download_edition_by_date.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus its siblings (e.g., download_edition_by_date or download_latest_edition). There is no mention of context or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

download_latest_editionA

Download the newest published Diario Oficial edition as a PDF.

Args: output_dir: Directory to save the PDF. Defaults to the DIARIO_OFICIAL_DIR environment variable, or ~/Downloads/diario-oficial.

Returns metadata (numero, tipo, fecha) plus the saved file path and size.

ParametersJSON Schema
NameRequiredDescriptionDefault
output_dirNo

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It explains return metadata and file path/size, but omits details like overwrite behavior, network usage, or authentication needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences with front-loaded purpose. No redundancy, each sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with no output schema, the description covers purpose, parameter default, and return format adequately. It does not address overwrite or error behavior, but sufficient for basic selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter (output_dir), and description adds value by explaining default fallback (environment variable or ~/Downloads/diario-oficial), which schema does not cover.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (download) and resource (newest published Diario Oficial edition as PDF). It distinguishes from sibling tools which target specific dates or numbers.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use vs alternatives. Sibling names suggest specificity, but description does not advise against using for non-latest editions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_recent_editionsA

List the most recently published Diario Oficial editions (newest first).

Returns each edition's number, type (e.g. Ordinaria), and date (dd/MM/yyyy). Use this to discover what is available before downloading.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the ordering (newest first) and output fields, but does not discuss any behavioral traits such as rate limits, authorization needs, or potential side effects. For a read-only list operation, this is adequate but minimally transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, efficiently front-loaded with the purpose: 'List the most recently published Diario Oficial editions (newest first).' Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no parameters and an existing output schema. The description covers the essential output fields, ordering, and usage context, making it complete for the agent to understand and invoke correctly alongside sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, so the description compensates by detailing the output fields (number, type, date) and the date format (dd/MM/yyyy). This adds semantic value beyond the schema, aligning with the baseline of 4 for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'list' and the resource 'recently published Diario Oficial editions', with specific output fields (number, type, date) and ordering (newest first). It distinguishes from sibling download tools by positioning itself as a discovery step before downloading.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit context with 'Use this to discover what is available before downloading', indicating when to use this tool versus the download siblings. However, it lacks explicit when-not-to-use guidance or alternative conditions.

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.

  1. 4 tool updatesv0.1.0
    • First observeddownload_edition_by_date
    • First observeddownload_edition_by_number
    • First observeddownload_latest_edition
    • First observedlist_recent_editions

TDQS

A4.2/5.0

Scored across 4 tools

Disambiguation5/5

Each tool serves a unique and clearly distinct purpose: downloading the latest edition, downloading by date, downloading by number, and listing recent editions. No ambiguity between them.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case: download_latest_edition, download_edition_by_date, download_edition_by_number, list_recent_editions. The naming is predictable and uniform.

Tool Count5/5

With 4 tools, the set is well-scoped for the domain of downloading official gazette editions. Each tool earns its place without unnecessary redundancy.

Completeness5/5

The tool surface covers all key workflows: listing available editions, downloading the latest, downloading by date, and downloading by number. No critical gaps in the core functionality.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    A template for deploying MCP servers on Cloudflare Workers without authentication. Enables easy creation and deployment of custom MCP tools that can be accessed remotely via Claude Desktop or Cloudflare AI Playground.
    9
    Mozilla Public 2.0
  • F
    license
    B
    quality
    D
    maintenance
    Automatically organizes PDF files into date-based folders, providing tools to move, copy, list, and track PDFs by date.
    6
    -
  • F
    license
    A
    quality
    C
    maintenance
    Allows querying the Diário Oficial do Estado do Piauí (DOE-PI) in natural language: list editions, search content, and read full texts without downloading PDFs.
    4
    -