Skip to main content

mcp-leyes-chile

mcp-name: io.github.billibu-n/mcp-leyes-chile

Servidor MCP de leyes chilenas con cita verificable (v0.2.0), fichas notariales curadas y generación de documentos .odt (editable), .pdf y .docx.

No es asesoría legal. Es una herramienta para que una persona llegue a la notaría con el borrador hecho y para que un abogado no presente una cita que no exista.

Qué hace

Tool Para qué
cl_buscar Busca artículos por texto en el corpus local (SQLite FTS5)
cl_articulo Texto literal + cita con vigente_desde, fuente y aviso; acepta vigente_al (AAAA-MM-DD) para la versión histórica
cl_versiones Historial de versiones de una norma (83 en el DL 825)
cl_citar Verifica un lote: ok, faltantes, sin_fuente_verificable
cl_notaria 27 fichas: trámite, arancel y estado por campo (24 generadas del Decreto 587)
cl_documento Genera .odt y deriva .pdf/.docx, con marca de BORRADOR
cl_cobertura Qué cubre, hasta cuándo, y qué no cubre

Instalación

python3 -m venv .venv && . .venv/bin/activate
pip install -e .
python -m mcp_leyes --ingesta      # ~21 s: 8 normas, 6.098 artículos, 538 versiones
python -m mcp_leyes --notaria-generar  # crea fichas desde el arancel (idempotente)
python -m mcp_leyes --selftest     # lista las 7 tools
python -m mcp_leyes --smoke        # genera .odt + .pdf de prueba
python -m mcp_leyes                # sirve por stdio

Configuración en un host MCP (ejemplo):

{"mcpServers": {"leyes-chile": {"command": "python", "args": ["-m", "mcp_leyes"],
  "env": {"MCP_LEYES_DB": "/ruta/a/corpus.db"}}}}

Formulario HTML

python -m mcp_leyes --formulario 8801
# http://127.0.0.1:8801/  -> pregunta los campos -> .odt + .pdf

Publicación (pendiente de autorización)

server.json está listo y cumple el esquema del registro: io.github.billibu-n/mcp-leyes-chile v0.2.0, registryType: pypi, transport: stdio. Publicar requiere mcp-publisher login github y autorización del dueño.

Cobertura y límites

  • 8 cuerpos legales (DL 825, Código del Trabajo, Código Civil, Comercio, Penal, Constitución, Ley 19.628, Arancel de notarios).
  • No cubre jurisprudencia, tribunales, SII más allá de las normas, competencia territorial notarial estructurada, precios actuales ni firma de documentos.
  • Los montos del arancel son nominales de 1998: el servidor los muestra y advierte, no calcula el precio final.

Datos y licencias

  • Código: Apache-2.0 (LICENSE).
  • Fuente: LeyChile / BCN. El paquete no redistribuye el corpus: lo descarga en la máquina del usuario. Los términos de LeyChile no se pudieron verificar (2026-11-06).
  • Fichas notariales: CC BY 4.0, con fuente y fecha por campo.

Pruebas

python -m pytest -q                     # 23 tests
python -m eval.correr --banco 60        # 66 tareas: exactitud 1.0, 0 alucinaciones, p95 14 ms
python -m mcp_leyes --notaria           # 27 fichas, 0 fallos

Metadata

Release files for mcp-leyes-chile 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-leyes-chile 0.2.0
File Size Uploaded Provenance Actions
mcp_leyes_chile-0.2.0.tar.gz 24.7 kB Without provenance Details for mcp_leyes_chile-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-leyes-chile 0.2.0
File Interpreter ABI Platform Actions
mcp_leyes_chile-0.2.0-py3-none-any.whl Python 3 none any Details for mcp_leyes_chile-0.2.0-py3-none-any.whl

Total release size: 49.1 kB

Release files / mcp_leyes_chile-0.2.0.tar.gz

Download URL mcp_leyes_chile-0.2.0.tar.gz
Size 24.7 kB
Tags Source
SHA-256 checksum
How to use checksums
90469d89f940f98b71355a155526dae448a18a08b31028800aac2c3df61b6496
BLAKE2b-256 checksum
How to use checksums
efd29393bf8e3958d6a5fd26fff2bf4c69500beedfdda2d0c797c65733f21afb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / mcp_leyes_chile-0.2.0-py3-none-any.whl

Download URL mcp_leyes_chile-0.2.0-py3-none-any.whl
Size 24.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f206de68b9fcd696209133d6411d8bd4b75b999ac494c2f97f9d7d5d4edde9e
BLAKE2b-256 checksum
How to use checksums
4aa4f3f2b72be8283ed512c61b26af9bea9042a693789c0c239e07cb9d202da9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for mcp-leyes-chile 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page