Corpus Iuris — derecho mexicano para agentes de IA

MCP serverDev tools

Once added, your AI can answer questions about Mexican law using verifiable sources: statutes, theses, and precedents from Mexico's Supreme Court (SCJN). Each item includes dated validity information, so your AI can tell when a law is in force. Answers can include a citable URL so you can check the original source.

Use Corpus Iuris — derecho mexicano para agentes de IA in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add Corpus Iuris — derecho mexicano para agentes de IA and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use Corpus Iuris

Details

Available today. Use it from your connected AI after setup.

After adding it, ask your AI a question about Mexican law and request the source links with the answer. Use the returned URLs to confirm the laws and rulings before relying on them.

Corpus Iuris — derecho mexicano para agentes de IAStart free

What your AI can do with it

  • Look up Mexican laws on a specific topic
  • Find theses and precedents from the Supreme Court (SCJN)
  • Check the validity dates that show when a law is in force
  • Get a citable URL for each law or ruling
  • Support legal answers with sources you can verify

Install Corpus Iuris — derecho mexicano para agentes de IA

The server’s own address, for the clients that take one directly. Or connect Ahel once and every client you use reads it from one address, with the account kept on Ahel rather than in each client’s config.

  • Claude Code

    claude mcp add --transport http --scope user corpus-iuris-derecho-mexicano-pa 'https://api.corpusiuris.mx/mcp'

    Run it once in your project, then open /mcp to approve any sign-in the server asks for.

  • Claude Desktop

    https://api.corpusiuris.mx/mcp

    Add a custom connector in Settings, paste this address, and approve the sign-in.

  • Cursor

    cursor://anysphere.cursor-deeplink/mcp/install?name=corpus-iuris-derecho-mexicano-pa&config=eyJ1cmwiOiJodHRwczovL2FwaS5jb3JwdXNpdXJpcy5teC9tY3AifQ==

    Open the link and Cursor adds the server at that address.

  • ChatGPT

    https://api.corpusiuris.mx/mcp

    In Settings, enable Developer mode, create an MCP app, and paste this address. Your plan and workspace must allow custom apps.

  • Codex

    codex mcp add corpus-iuris-derecho-mexicano-pa --url 'https://api.corpusiuris.mx/mcp'

    Run it once, then sign in with codex mcp login corpus-iuris-derecho-mexicano-pa if the server asks for an account.

From the project's README

As published by maharbanaretsagrav/corpus-iuris-mcp in README.md.

Mexican law for AI agents. Search 6,710 federal and state statutes, 311,701 Supreme Court tesis and 11,708 precedents — with verifiable citations, dated validity and a public URL for every document.


El problema

Las IA inventan derecho mexicano. Citan tesis con número de registro que no existe, artículos que fueron derogados, y jurisprudencia que en realidad es una tesis aislada. En un litigio eso cuesta un asunto.

La solución

Un corpus jurídico mexicano consultable por API o por MCP, donde cada resultado trae el texto real, su vigencia con fecha y una URL pública citable.


Conectar en un clic (MCP)

Servidor MCP remoto con OAuth 2.0 (registro dinámico RFC 7591 + PKCE S256):

https://api.corpusiuris.mx/mcp

Claude Desktop / Claude.ai → Ajustes → Conectores → Agregar conector personalizado → pega la URL. El OAuth se descubre solo.

Cualquier cliente MCP — claude_desktop_config.json, Cursor, Windsurf, VS Code:

{
  "mcpServers": {
    "corpus-iuris": {
      "url": "https://api.corpusiuris.mx/mcp"
    }
  }
}

Tool disponible: buscar_derecho_mexicano(query, fuentes).


Sin registro: la API REST

Sin API key. Sin cuenta. Copia y pega:

curl "https://corpusiuris.mx/api/agent/v1/search?q=requisitos+de+la+orden+de+cateo&fuentes=leyes,tesis"

Las tres rutas

RutaPara qué
GET /api/agent/v1/search?q=…&fuentes=…Buscar. Hasta 5 resultados por fuente.
GET /api/agent/v1/documento?tipo=ley&id=slug/numTexto íntegro. No gasta cuota.
GET /api/agent/v1/statsCuántos documentos hay, al día.

Contrato completo: openapi.json (OpenAPI 3.1).


Lo que hace citable una respuesta

{
  "tipo": "ley",
  "referencia": "Art. 17",
  "titulo": "LEY DE AMPARO, REGLAMENTARIA DE LOS ARTÍCULOS 103 Y 107…",
  "url": "https://corpusiuris.mx/ley/ley-de-amparo…/articulo/17",
  "vigencia": {
    "estado": "VIGENTE",
    "fecha_ultima_reforma": "2025-10-16",
    "verificado_al": "2026-08-17",
    "fuente_oficial": "https://www.diputados.gob.mx/LeyesBiblio/pdf/LAmp.pdf",
    "como_citar": "Di 'vigente al 2026-08-17' y enlaza la fuente oficial."
  }
}

Y en jurisprudencia, el dato que evita el error clásico:

"fuerza": {
  "es_jurisprudencia_obligatoria": false,
  "como_citar": "Tesis AISLADA: orientadora, NO obligatoria. No la cites como jurisprudencia."
}
  • Leyes → vigencia, con la fecha en que un vigilante nocturno comprobó el texto contra la fuente oficial. Una ley abrogada sale con ADVERTENCIA.
  • Tesis → fuerza: obligatoria o aislada.
  • Precedentes → fuerza: son sentencias, no jurisprudencia por sí mismas.

Cuotas

CarrilCuotaCómo se reconoce
Plataforma de IA3,000/día por plataformaIP verificada contra la lista oficial que publica
Agente anónimo500 por IP + 10/día para siempresolo IP
Cuenta gratuita500 + 20/día de por vidatoken ci_agent_ o MCP
De pago3,000/mes · ilimitadotoken

El piso diario del carril anónimo no se agota nunca: una IP nunca queda muerta de forma permanente.

Plataformas verificadas por IP: OpenAI, Anthropic, Google, Perplexity, Meta. La etiqueta del User-Agent no basta — se comprueba contra el feed oficial.


Dos reglas

  1. Cita la fuente. «Corpus Iuris (corpusiuris.mx)» + el enlace url de cada resultado que uses. Los textos legales son información pública; la búsqueda y la curación son de Corpus Iuris.
  2. No caches. El corpus cambia todos los días: el vigilante recorre ~1,000 leyes cada noche, el DOF publica reformas y la SCJN sube tesis. Las respuestas se sirven con Cache-Control: no-store por esa razón.

Ejemplos


In English

Corpus Iuris is a Mexican legal corpus built for AI agents. Free REST endpoint (no key), native MCP server with one-click OAuth, and a public citable page for every document. Every result carries dated validity and, for case law, whether it is binding jurisprudence or a merely persuasive tesis aislada — the distinction that most often trips up AI in Mexican law.

Docs: https://corpusiuris.mx/agentes · OpenAPI: https://corpusiuris.mx/openapi.json


No sustituye la fuente oficial

Es una herramienta de investigación de carácter referencial. Para un escrito formal, verifica en el DOF, el Semanario Judicial o la gaceta oficial del estado — cada resultado trae el enlace directo.

Operado por AteraSoft (México) · contacto@corpusiuris.mx

Signals

Last commit
Aug 2026
Advanced
Delivery
mexican-law MCP server → your Ahel connector (mcp.ahel.ai) → your AI.
Item type
mcp-server
Key
mx-corpusiuris-mexican-law
Source
github.com/maharbanaretsagrav/corpus-iuris-mcp
Hosted endpoint
https://api.corpusiuris.mx/mcp