Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words Sign in

Leyes MX: Mexican federal law at any date

by BEG-lagversion 1.0.0i★ 0iRuns on your computerRepository ↗
Registry nameio.github.BEG-lag/mcp-leyes

How to install

What it does

Mexican federal law at any date: articles, reform history, diffs and search over leyes-mx.

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Law & government data

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity0/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score12/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Leyes MX: Mexican federal law at any date. Follow https://mcp.popnx.com/i/beg-lag-mcp-leyes.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 18, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Docker on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Leyes MX: Mexican federal law at any date for Claude on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "leyes": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/beg-lag/mcp-leyes:1.0.0" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Leyes MX: Mexican federal law at any date tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "leyes": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "ghcr.io/beg-lag/mcp-leyes:1.0.0"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use Leyes MX: Mexican federal law at any date and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Leyes MX: Mexican federal law at any date or shows a Leyes MX: Mexican federal law at any date tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MCP_LEYES_REFRESH_HOURS Hours between git fetches of leyes-mx (default 24; 0 never fetches and uses the snapshot in the image). · default 24

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Leyes MX: Mexican federal law at any date yet

Leyes MX: Mexican federal law at any date runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Leyes MX: Mexican federal law at any date

  • Install Docker on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Docker on your computer first (one time)
  • Install Docker on your computer first (one time)
  • Install Docker on your computer first (one time)

B · Others in Law & government data that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Docker on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Leyes MX: Mexican federal law at any date for Claude Code on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user leyes -- docker run -i --rm ghcr.io/beg-lag/mcp-leyes:1.0.0 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Leyes MX: Mexican federal law at any date tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user leyes -- docker run -i --rm ghcr.io/beg-lag/mcp-leyes:1.0.0
  4. Type /mcp in Claude Code

    You should see Leyes MX: Mexican federal law at any date listed as connected

  5. Try it

    Use Leyes MX: Mexican federal law at any date and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Leyes MX: Mexican federal law at any date or shows a Leyes MX: Mexican federal law at any date tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MCP_LEYES_REFRESH_HOURS Hours between git fetches of leyes-mx (default 24; 0 never fetches and uses the snapshot in the image). · default 24

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Docker on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Leyes MX: Mexican federal law at any date for Cursor on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "leyes": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/beg-lag/mcp-leyes:1.0.0" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Leyes MX: Mexican federal law at any date tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use Leyes MX: Mexican federal law at any date and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Leyes MX: Mexican federal law at any date or shows a Leyes MX: Mexican federal law at any date tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MCP_LEYES_REFRESH_HOURS Hours between git fetches of leyes-mx (default 24; 0 never fetches and uses the snapshot in the image). · default 24

Descriptions are as written by the maker.

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Docker on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Leyes MX: Mexican federal law at any date for VS Code on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "leyes": { "type": "stdio", "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/beg-lag/mcp-leyes:1.0.0" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Leyes MX: Mexican federal law at any date tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use Leyes MX: Mexican federal law at any date and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Leyes MX: Mexican federal law at any date or shows a Leyes MX: Mexican federal law at any date tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MCP_LEYES_REFRESH_HOURS Hours between git fetches of leyes-mx (default 24; 0 never fetches and uses the snapshot in the image). · default 24

Descriptions are as written by the maker.

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Leyes MX: Mexican federal law at any date💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user leyes -- docker run -i --rm ghcr.io/beg-lag/mcp-leyes:1.0.0

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "leyes": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/beg-lag/mcp-leyes:1.0.0"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "leyes": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/beg-lag/mcp-leyes:1.0.0"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "leyes": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/beg-lag/mcp-leyes:1.0.0"
      ]
    }
  }
}

Values you fill in

  • MCP_LEYES_REFRESH_HOURS env
    Hours between git fetches of leyes-mx (default 24; 0 never fetches and uses the snapshot in the image).

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
Not on npm/PyPI
Connection
Runs on your computer
Latest versioni
1.0.0
Published to registryi
Nov 18, 2026
Code last changedi
Nov 18, 2026
Maker
BEG-lag
Packages
oci: ghcr.io/beg-lag/mcp-leyes:1.0.0
Website
github.com
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 20, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account BEG-lag, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 2 days ago

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

Not checked: only npm and PyPI packages with a version can be checked

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/beg-lag-mcp-leyes.svg)](https://mcp.popnx.com/en/servers/beg-lag-mcp-leyes)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Law & government datai

  • More stars than 0% of the other 1972 servers in this category
  • Published to the registry more recently than 94% of the other 1972 servers in this category
  • Basic checks equal to or better than 99% of the other 1972 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Leyes MX: Mexican federal law at any date safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 2 days ago, and the latest version (1.0.0) reached the registry 2 days ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Docker on your computer.

What can I use instead?

In the same category: Global law, Open Legal Data (Germany), LibreJustice, InfraNode, Fedlex Connector

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

Global law

The law of nearly every country on earth, any date: read it, see what changed it, check citations.

by lexifinaWidely used★ 2.1KUpdated 10 days ago

Runs in the cloud✓ lexifina.com

LibreJustice

Search French-language and European case law and French legal texts (codes, statutes, treaties).

by librejusticeEarly★ 38Updated 2 months ago

Runs in the cloud✓ service owner · librejustice.fr

InfraNode

Keyless open data for 84 German cities: 12 lean read-only MCP tools covering 67 data types.

by street1983nkEarly★ 18Updated 5 months ago

Runs in the cloud✓ service owner · infranode.dev

Fedlex Connector

Search Swiss federal legislation: laws, articles, amendments via the Fedlex SPARQL endpoint.

by JayTheSkierEarly★ 8Updated 7 months ago

Runs in the cloud✓ service owner · fedlex-connector.ch
Compared with similar ones
This one
Leyes MX: Mexican federal law at any date
Global lawOpen Legal Data (Germany)LibreJusticeInfraNodeFedlex Connector
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to install
Needs a keyNoNoNoNoNoNo
Add with + in ClaudeNoNoNoNoNoNo
Basic checks3/34/44/44/44/44/4
LicenseMITNOASSERTIONMITApache-2.0Apache-2.0MIT
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

English · Español

mcp-leyes is a Model Context Protocol server that gives Claude and other AI agents *point-in-time* access to Mexican federal law: the exact text of an article as it stood on any date, every change it went through, word-level diffs of what a reform did, full-text search over the laws as they read on a given day, and the reform timeline of each law. It reads the public leyes-mx repository, where 36 federal laws are Markdown files and each of their 375 archived versions is a git commit dated on its publication in the *Diario Oficial de la Federación* (DOF).

Lawyers ask "what did article 27 say in 2013?" or "what exactly did the 2019 labor reform change?" all the time. Answering from memory is how a model ends up citing a repealed paragraph. This server answers from the archived text, cites the DOF date, the decree and the line on GitHub, and says what the archive cannot know.

[!IMPORTANT]

Unofficial. Only the DOF is authoritative. Not legal advice.

Demo

Real output, recorded through a real MCP client over stdio on 2026-11-17, starting from an empty cache. Excerpts below are copied verbatim (… marks omitted lines); the full, unedited transcript is in docs/demo.md. Tool output is in Spanish, like the law.

Article 27 of the Constitution on January 1, 2013, with where the text comes from and what the archive cannot tell:

<!-- get_article(law="CPEUM", article="27", date="2013-01-01") · 0.02 s -->

CPEUM · Artículo 27.

Constitución Política de los Estados Unidos Mexicanos › Título Primero › Capítulo I · De los Derechos Humanos y sus Garantías

Texto aplicable al 01-01-2013: versión DOF 15-10-2012 (commit 9cdbce4). …

Advertencias

  • Entre el DOF 15-10-2012 y el 01-01-2013 se publicaron reformas sin versión propia en el archivo (DOF 30-11-2012: DECRETO por el que se reforma el Artículo 40 de la Constitución Política de los Estados Unidos Mexicanos.). Su texto aparece en la siguiente versión del archivo, DOF 26-02-2013; el texto mostrado NO las refleja.
  • Esta versión agrupa 3 reformas publicadas entre el DOF 25-06-2012 y el 15-10-2012: no hay copia archivada intermedia, así que el commit lleva la fecha de la última.
  • En la siguiente versión archivada (DOF 26-02-2013) este artículo no cambia: esas reformas no lo modificaron.

The same article, 2013 versus today: the energy reforms of 2013 and 2024 to 2025, word by word.

<!-- diff_article(law="CPEUM", article="27", date_from="2013-01-01") · 0.14 s -->

CPEUM · Artículo 27. · DOF 15-10-2012 → DOF 07-10-2026

…

  • DOF 10-02-2014 · modificado · nota editorial: DOF 20-12-2013
  • DOF 29-01-2016 · modificado · nota editorial: DOF 29-01-2016

…

  • DOF 01-04-2025 · modificado · nota editorial: DOF 17-03-2025

… … Tratándose [-del petróleo y de los carburos de hidrógeno sólidos, líquidos o gaseosos o-] de minerales [-radioactivos,-] {+radiactivos y litio+} no se otorgarán concesiones [-ni contratos, ni subsistirán los que en su caso se hayan otorgado y la Nación llevará a cabo la explotación de esos productos, en los términos que señale la Ley Reglamentaria respectiva-]. Corresponde exclusivamente a la Nación [-generar, conducir, transformar, distribuir-] {+la planeación+} y [-abastecer-] {+el control del sistema eléctrico nacional en los términos del artículo 28 de esta Constitución, así como el servicio público de transmisión y distribución de+} energía eléctrica …

What the 2019 labor reform changed in the Ley Federal del Trabajo. The archive has no copy between 01-05-2019 and 02-07-2019, so the tool says so and uses the Cámara's editorial notes to tell the articles of this decree from those of the other two:

<!-- diff_reform(law="LFT", reform_date="2019-05-01", limit=3) · 0.03 s -->

LFT · reforma DOF 01-05-2019

… Comparación: versión DOF 22-06-2018 (2ed3ea7) → versión DOF 02-07-2019 (8157e28).

Resumen

  • 475 artículo(s) modificado(s), 96 añadido(s), 0 que ya no aparece(n).
  • De ellos, 559 tienen una nota editorial que cita el DOF 01-05-2019.
  • Transitorios nuevos de 3 decreto(s) (DOF 01-05-2019, 04-06-2019, 02-07-2019): consúltalos con transitorios.

… Sin esa nota (12; otras reformas de la versión o cambios editoriales): 170 Bis. (añadido), 331 Bis. (añadido), 331 Ter. (añadido), 334 Bis. (añadido), 335., 336 Bis. (añadido), 337 Bis. (añadido), 339., 341., 343., 542., 641-A. …

Artículo 3o. (modificado; nota cita DOF 01-05-2019)

[-El trabajo es un derecho y un deber sociales. No es artículo de comercio.-] …

And it refuses to over-claim. Asked for article 371 (union bylaws) on June 1, 2019, a month after the reform, it returns the last archived text and flags it as outdated for that date:

<!-- get_article(law="LFT", article="371", date="2019-06-01") · 0.00 s -->

LFT · Artículo 371.

… Texto aplicable al 01-06-2019: versión DOF 22-06-2018 (commit 2ed3ea7). …

  • En la siguiente versión archivada (DOF 02-07-2019) este artículo sí cambia y su nota editorial cita la reforma del DOF 01-05-2019, publicada antes del 01-06-2019: el texto mostrado está desactualizado para esa fecha. Usa diff_article o la fecha 2019-07-02 para ver el cambio.

The transcript also has the full history of article 27 (10 changes in 44 versions, two of them flagged as editorial corrections), the transitorios of the 2019 decree, a search for subcontrat "servicios especializados", the LFT reform timeline, the LISR reform of 13-11-2026 that is not consolidated yet, and a Código de Comercio version whose source skips article 291.

First sync: 7.0 s from an empty cache on a home connection, cloning leyes-mx from GitHub and indexing 375 versions; the cache then takes 29 MB. Every later call is answered locally, in milliseconds.

Things you can ask once it is connected (example prompts, not recorded answers):

  • *"¿Qué decía el artículo 123 constitucional, apartado A, fracción IV, antes de la reforma de la jornada de 40 horas?"*
  • *"Explain what the 2019 labor reform changed in collective bargaining."* (uses the explain_reform prompt)
  • *"¿Qué decía el artículo 15-A de la LFT sobre subcontratación y cuándo se derogó?"*
  • *"¿Desde cuándo aparece «beneficiario controlador» en el Código Fiscal?"*

Quickstart

You need uv and git. uvx downloads and runs the server; git is its database.

Claude Code

claude mcp add leyes -- uvx --from git+https://github.com/BEG-lag/mcp-leyes mcp-leyes

Claude Desktop: add this to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\) and restart:

{

"mcpServers": { "leyes": { "command": "uvx", "args": ["--from", "git+https://github.com/BEG-lag/mcp-leyes", "mcp-leyes"] } } }

The first start clones leyes-mx (about 4 MB) and builds the index in a few seconds; after that it works offline. To do that ahead of time, run uvx --from git+https://github.com/BEG-lag/mcp-leyes mcp-leyes sync.

Docker: every release publishes a multi-arch image (linux/amd64, linux/arm64) to GitHub Container Registry, with git and a snapshot of leyes-mx inside, so it answers even with --network none. In any client config, use "command": "docker" with these arguments:

docker run -i --rm ghcr.io/beg-lag/mcp-leyes:1.0.0

Any other MCP client: run mcp-leyes over stdio, or mcp-leyes --transport http --port 8000 for streamable HTTP at http://127.0.0.1:8000/mcp.

The metadata for the MCP Registry lives in server.json, under the name io.github.BEG-lag/mcp-leyes.

Tools

ToolWhat it does
list_laws()The catalog: abbreviation, name, last reform, articles, versions in git and the oldest archived version of each law.
get_article(law, article, date)Exact text of an article as it stood on a date (default today): version DOF date and commit, the decrees that version reflects, since when the article reads that way, the editorial notes, a link to the exact lines on GitHub at that commit, and every caveat that applies.
article_history(law, article)Every version that added, changed, repealed or dropped the article, with its decree. In grouped versions, the decree named by the editorial note; changes that only touch notes or a few words without a reform note are flagged as editorial.
diff_article(law, article, date_from, date_to, mode)What changed between two dates, as a word diff ([-old-] {+new+}) or a unified diff, plus the versions in between that touched it.
diff_reform(law, reform_date, mode, limit, offset)What a reform did: articles modified, added and removed, new transitorios and headings, and the diffs, paginated.
search(query, law, date, limit, include_transitorios)Full-text search over the laws as they read on a date. Accent and case insensitive, prefix matching, "phrases" and -exclusions.
reforms(law, since, limit)Reform decrees of a law (number, DOF date, title, PDF) and which version in git carries each one.
transitorios(law, decree_date, date, max_chars)Transitory articles of the original text or of one decree: entry into force, deadlines, repeals.

Also exposed: the prompts `explain_reform(law, reform_date, audience, language)` and `trace_article(law, article, language)`, and the resources ley://{law}@{date} (the whole law as it stood on a date, Markdown), ley://{law}/articulo/{article}@{date}, leyes://catalogo (JSON) and leyes://estado (sync status). Laws accept the abbreviation (LFT) or slug (lft); articles accept 27, 1o, 3o. Bis, 15-A, 353-Ñ, 29-A Bis or 21 bis 1; dates accept YYYY-MM-DD, DD-MM-YYYY or hoy. All tools are annotated read-only.

How it works

flowchart LR

A["Claude or any MCP client"] -- "stdio / HTTP" --> B["mcp-leyes tools, prompts, resources"] B --> C["SQLite index art

Only the beginning is shown; read the rest in the repo