Skip to main content
Glama
io.github.billibu-n/mcp-leyes-chile

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

by billibu-n

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

Related MCP server: chilean-legal-mcp

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

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables Chilean legal research via 15 MCP tools that search and cite official sources, retrieve full legal texts, perform hybrid semantic searches, and export results to Word or PDF.
    -
  • A
    license
    C
    quality
    A
    maintenance
    Exposes 55 forensic tools over the Model Context Protocol so agents can query Chilean statutes, jurisprudence, administrative dicta and doctrine from official state sources such as BCN, PJUD, CGR and DT, while running locally for confidential casework. It also supports citation-validated drafting, deadline and docket monitoring, judgment deconstruction, OCR dossier compilation and legal knowledge-graph analysis for civil-law practice, teaching and research.
    87
    30 PyPI
    5
    Apache 2.0
  • A
    license
    B
    quality
    B
    maintenance
    Enables citation-safe legal research and document drafting over official Turkish case law and legislation, searching a local 11-million-decision corpus with full-text and semantic retrieval or querying live sources like Bedesten, AYM, Danıştay and mevzuat.gov.tr. It also supports citation verification, petition and bundle preparation, change reports, privacy redaction, and source health checks through core and loadable extended tool sets.
    11
    30 PyPI
    3
    AGPL 3.0