chilean-legal-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@chilean-legal-mcpBusca la Ley de Teletrabajo vigente y expórtala a PDF"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
chilean-legal-mcp
Chilean legal research MCP server — 15 tools, verifiable official sources, no registration or credits. Better than Trifolia: local, unlimited, with body FTS, hybrid semantics and Word/PDF export.
What it does (15 tools)
Tool | Source | What it returns |
| BCN SPARQL 748k + local FTS + body | Laws with filters |
| BCN | Citation text and JSON |
|
| Full text 14k |
| local | Word |
| Hybrid FTS + MiniLM embeddings + synonyms |
|
| CGR Domino + BCN + FTS | Rulings with URL |
| BCN + CGR + public PJUD | Case law + links |
| BCN Article 30k + fallback | Articles |
| BCN | Validity and relationships |
| SciELO, DT, Diario Oficial | Doctrine and sectoral regulations |
| Real parallel | Multi-source in 1 call |
| — | 6 official links |
All responses include citation and link to the official source. Chilean dates DD-MM-AAAA in input and output.
Related MCP server: LeyChile MCP
Installation
git clone <repo>
cd chilean-legal-mcp
pip install -e . # base: httpx, mcp, python-docx, reportlab
pip install -e ".[semantic]" # opcional: sentence-transformers para embeddings reales
pip install -e ".[pdf]" # opcional: weasyprint (requiere libgobject)
python -m chilean_legal_mcp.ingest # 545 normas iniciales
python -m chilean_legal_mcp.ingest --bulk # 360k completo (~2h, 150MB)Usage — any MCP client (stdio)
python -m chilean_legal_mcp.server # stdio (default)
python -m chilean_legal_mcp.server --http # HTTP streamable :8000Claude Code: claude mcp add chilean-legal -- python -m chilean_legal_mcp.server
Claude Desktop / OpenCode / Cursor / VS Code / Antigravity: mcpServers: {"chilean-legal": {"command":"python","args":["-m","chilean_legal_mcp.server"]}}
Structure
src/chilean_legal_mcp/
sparql_client.py # BCN SPARQL + filtros fecha/tipo
db.py # SQLite FTS5 (normas, textos, dictamenes) + check_same_thread=False
texto.py # LeyChile obtxml XML
contraloria.py # CGR Domino POST
fuentes_externas.py # SciELO, DT, Diario Oficial
exportar.py # docx/pdf
ingest.py # incremental + bulk OFFSET
server.py # FastMCP 15 tools, paralelo real
data/
normas.db (545)
jpl/README.md # reservado Ley 18.287Sources (100% public, no registration)
BCN
datos.bcn.cl/sparql(Virtuoso)LeyChile
leychile.cl/Consulta/obtxml?opt=7&idNorma=...CGR
contraloria.cl/appinf/...+ BCN OficioPJUD
pjud.cl/portal-unificado-sentencias(Playwright verified, without api.pjud.cl)SciELO, DT, Diario Oficial — public search engines
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Taiwan legal research MCP: 判決書、全國法規、釋字/憲判與立法歷程查詢,12 個工具,回應均附官方出處 URL。
LawOracle — 20 legal AI tools: case law search, contracts, EU regulations, citation graph.
Brazilian legal stack in one MCP: lawsuits, court publications, case law, tenders, certificates.
- DikeOAuthio.github.fr3on
Grounded MENA legal search, reasoning, citation resolution, and citation-graph traversal.
Related MCP Servers
- AlicenseCqualityBmaintenanceEnables searching, comparing, and analyzing Korean laws and public institution regulations through natural language, integrating 110 MCP tools covering statutes, precedents, and internal rules.100106 npm20MIT
- AlicenseAqualityCmaintenanceMCP server that connects AI to the Chilean legislation system (Ley Chile) for retrieving legal norms, citations, and intertemporal analysis.282MIT
- AlicenseBqualityFmaintenanceConnects AI assistants to Chilean legal sources, enabling citation of official legal texts, search of doctrine, jurisprudence, and rulings.18MIT
- AlicenseNot gradedqualityFmaintenanceEnables querying Spanish legislation (BOE) and EU law integration through MCP, providing full-text search, citation validation, and cross-referencing capabilities.47 npm2Apache 2.0