MCP Legal Chile
MCP Legal Chile is a comprehensive legal research tool for Chilean law, providing access to official legislation, jurisprudence, doctrine, and administrative opinions. Key capabilities include:
Legislation: Search Chilean laws (BCN/LeyChile), retrieve norm metadata, check norm status and history, find related norms, get official XML text (full body or index), and extract specific articles or clauses/literals.
Jurisprudence: Search general Chilean court rulings (PJUD/TC) or specifically the Tribunal Constitucional, retrieve TC ruling extracts, and resolve cases by ROL/RIT — note that most jurisprudence searches return links only, not full text.
Doctrine: Search Chilean legal doctrine (OpenAlex, Crossref, SciELO Chile) or Latin American doctrine (Peru, Brazil, Argentina, Mexico, Colombia), with formal Chilean/APA citations, abstracts, and PDFs where available; retrieve specific works by DOI or OpenAlex ID.
Administrative Opinions (Dictámenes): Search Contraloría General de la República (CGR) dictámenes (link-only) or resolve a specific dictamen by number.
Citation & Text: Generate formal Chilean legal citations, produce official blockquote text from legal articles, and format citations for norms, ROLs, dictámenes, or doctrine from already-retrieved identifiers (no fabrication).
Integrated Research: Run a unified fan-out search across all sources (
buscar_derecho_chileno), or orchestrate a full topic investigation into a structured anti-hallucination markdown memo (investigar_tema).System Info: Access the tool catalog, honesty matrix, and Service Level Objectives via
acerca_de.
Key limitation: Jurisprudence and dictamen searches provide links to official sources only — the system explicitly advises against affirming content based on link-only evidence.
Provides web search capabilities for legal content using Brave Search API as an optional search provider.
Used for durable caching and persistent API key quotas to improve performance and rate limiting.
Supports deployment on Render with a blueprint configuration and cron keep-alive for cold start mitigation.
Click on "Install 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., "@MCP Legal Chilecitar artículo 1 de la Constitución Política"
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.
MCP Legal Chile
Conector MCP libre y gratuito de derecho chileno para Claude, Cursor y apps compatibles.
Licencia: MIT — código abierto
Producción: https://mcp-legal-chile.onrender.com/mcp
Versión: 1.14.0
Proyecto libre
Este MCP usa solo fuentes públicas sin costo de API:
Fuente | Uso |
LeyChile / BCN SPARQL | Texto y metadata de normas |
Tribunal Constitucional | Fallos TC con texto y considerandos |
OpenAlex + DOAJ + Crossref | Doctrina académica OA |
SciELO ArticleMeta | Enrich de artículos SciELO (PDF/HTML) por DOI/PID |
Portales oficiales (PJUD, CGR, superintendencias, etc.) | Deep links |
Yahoo HTML (+ DDG HTML/lite fallback) | Búsqueda web best-effort (sin claves) |
No se usan APIs comerciales (Serper, Brave, vLex, etc.).
PJUD no publica API de texto: para citar Corte Suprema / Apelaciones, pega el fallo en citar_jurisprudencia.
Acceso abierto por defecto (sin MCP_API_KEYS). Redis es opcional para self-host.CONTACT_EMAIL activa el polite pool de OpenAlex/Crossref (mailto=).
Excepción —
pjudCauses(§ Case-tracking PJUD): a diferencia de todo lo anterior, esta función sí elude una protección anti-bot (paga un solver de CAPTCHA para pasar el WAF F5/TSPD de PJUD). Está deshabilitada por defecto y es responsabilidad de quien la active.
Related MCP server: saij-mcp
Matriz de honestidad (qué trae cada tool)
Tool | Evidencia | Fuente |
| Texto íntegro + cita | XML LeyChile en blockquote |
| Texto + considerando | API TC gratis, o texto pegado (PJUD) |
| Metadata + abstract + citas | OpenAlex + DOAJ + Crossref + ArticleMeta |
| Metadata + citas + enlaces | Catálogo ISSN + OpenAlex + DOAJ |
| Enlace / candidatos | TC + web libre (Yahoo) → portales PJUD |
| Metadata + PDF | API gratuita TC |
| Enlaces + candidatos | TC + portales |
| Extracto + índice de considerandos | API gratuita TC |
| Solo enlace | Contraloría (deep link por número) |
| Solo enlace / portal_stub | CMF, Superintendencia de Salud, SUSESO, SEC, SUPERIR (sin API pública) |
| Pack mixto (parcial OK) | Orquesta lo anterior (~18s) |
| Siempre | Oficina Judicial Virtual PJUD — experimental/no oficial, ver abajo |
Integridad (anti-alucinación): cada resultado lleva integrity:
Nivel | Significado |
| Texto/fuente oficial recuperada por el MCP |
| Metadato o enlace a verificar; no afirmar contenido |
| Solo portal de búsqueda; no es un documento encontrado |
Calidad de citas: jurisprudencia unifica el formato chileno (tribunal, tipo, ROL, año, considerando); la web ya no usa el título de página como cita. Doctrina normaliza autores (Apellido, N.), completa vol./páginas DOAJ y prioriza relevancia temática + catálogo Chile. Niveles de integrity: verified | candidate | portal_stub (evidence puede ser full_text / metadata / link_only).
Reglas: si evidence=link_only o integrity es portal_stub/candidate, no afirmes el contenido. citar_jurisprudencia rechaza un considerando que no exista en el texto (no sustituye por otro). Sin resultados → decirlo; no completar con memoria.
Cómo usarlo sin quedarse corto
Empieza con
investigar_tema(mapa rápido).Extrae texto con
citar_texto_legal,obtener_articulo,obtener_fallo_tcocitar_jurisprudencia.Fallos PJUD: abre el portal unificado, copia el texto y pásalo a
citar_jurisprudenciaconrol,tribunalytexto.
SLOs (objetivos P95)
Operación | Objetivo | Notas |
Artículo con cache hit | < 500 ms | |
Artículo cold (sin 429) | < 5 s | LeyChile puede rate-limitar |
| < 4 s | SPARQL BCN |
| < 8 s | |
| < 18 s | Tope duro |
Éxito XML LeyChile (24h, con caché) | > 95% |
Métricas en vivo: GET /metrics
Capacidades principales
Texto oficial LeyChile (artículos, índice/cuerpo, inciso/literal heurístico)
Doctrina OA: ranking por relevancia, abstracts (backfill Crossref), enrich SciELO
citar_jurisprudenciacon considerando (TC o texto pegado)Caché en memoria (Redis opcional)
Rate limit / circuit breaker por proveedor (LeyChile XML aislado de BCN SPARQL/HTML; DOAJ aislado de Crossref; abort/deadline no abre circuitos; un solo conteo terminal tras reintentos)
Warmup boot +
GET /warmup(cron) omiten XML si LeyChile está en cooldown 429 / circuito abiertoEndurecimiento de producción: CORS explícito para clientes MCP en navegador, rate limit por IP en
/mcp(60 req/min por defecto, independiente de las cuotas por API key), errores JSON-RPC limpios (sin stack traces ni rutas de archivo aunqueNODE_ENVno esté seteado), apagado ordenado anteSIGTERM/SIGINT, timeouts de socket HTTP contra clientes lentos, yuncaughtException/unhandledRejectionno derriban el proceso
Nota clientes MCP (Hermes, etc.): un mensaje global tipo «MCP unreachable» tras ~3 errores suele ser protección del cliente, no del servidor. En el servidor los circuitos son por host; ante 429 o circuito abierto de LeyChile las tools de texto devuelven markdown útil (URL oficial + reintento) sin marcar
isErrorcuando es posible.
Inicio rápido
npm install
npm run dev
npm test
SMOKE_BASE=http://127.0.0.1:3000 npm run smokeMCP: http://localhost:3000/mcp
Variables de entorno
Variable | Descripción |
| Polite pool OpenAlex/Crossref ( |
| Opcional: Redis self-host |
| Opcional — si falta, acceso abierto |
|
|
| Tope búsquedas standalone (default 22s) |
| Búsqueda web libre (DDG) |
| Enfriamiento tras bloqueo DDG (default 180s) |
| Tope |
| Timeout por fuente en el pack (default ~11s) |
| Tope de requests/IP a |
| Timeouts de socket HTTP (defaults 60s/65s/61s) |
Case-tracking PJUD (experimental/no oficial)
buscar_causa_pjud / obtener_causa_pjud automatizan la Consulta Unificada de Causas de PJUD (Oficina Judicial Virtual) para devolver estado, litigantes y movimientos por RUT/nombre o ROL/RIT/RUC. A diferencia de todo el resto de este proyecto:
Elude activamente el WAF anti-bot (F5/TSPD) de PJUD usando un navegador headless (Playwright) y un servicio de pago de resolución de CAPTCHA (2Captcha o CapSolver).
No es una API oficial ni endorsada por PJUD: los datos son siempre
integrity=candidate, obtenidos por scraping, y pueden romperse sin aviso si PJUD cambia su HTML/anti-bot.Implica un riesgo de Términos de Servicio que asume explícitamente quien habilite la función (ver
docs/pjud-casetracking-solution.mdpara el diseño completo).
Deshabilitada por defecto (kill switch): si PJUD_CAUSAS_ENABLED != 1 o no hay un solver de CAPTCHA configurado, ambas tools degradan a una respuesta tipo portal_stub con el link a la Consulta Unificada, nunca fallan en silencio ni inventan datos.
Variable | Descripción |
|
|
|
|
| API key del solver (cuenta de pago) |
| Timeout de resolución (default 120s) |
| TTL de la cookie de sesión reutilizada (default 25 min), para amortizar el costo del CAPTCHA entre búsquedas |
| Tope diario de CAPTCHAs resueltos (control de costo/abuso, default 50) |
| Cache de resultados (default 6h / 24h) — el estado de una causa cambia a lo sumo a diario |
npm run build/postinstall no descarga Chromium salvo que PJUD_CAUSAS_ENABLED=1 esté seteado en tiempo de instalación (ver scripts/installPlaywright.mjs), así el build por defecto (p. ej. render.yaml) permanece liviano.
Deploy
Blueprint: render.yaml — plan free, sin Key Value de pago ni API keys comerciales. pjudCauses está comentado en el blueprint por defecto: requiere una API key de pago (agrégala manualmente en el dashboard de Render si decides habilitarla).
Aviso
No sustituye asesoría jurídica. PJUD/CGR no ofrecen API abierta de texto completo. El MCP es un puente gratuito a fuentes oficiales y OA.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-quality-maintenanceProvides access to Argentina's official legal database (SAIJ) to search and retrieve judgments, legislation, summaries, and legal doctrine. It allows AI clients to query Argentine legal information and access metadata for various legal documents.Last updated6
- AlicenseAqualityDmaintenanceConnects AI clients to Argentina's official legal database (SAIJ) to search and retrieve court rulings, legislation, summaries, and legal doctrine. It enables users to perform keyword searches and fetch detailed metadata and summaries for Argentinian legal research.Last updated32MIT
- AlicenseAqualityCmaintenanceMCP server that connects AI to the Chilean legislation system (Ley Chile) for retrieving legal norms, citations, and intertemporal analysis.Last updated2281MIT
- Flicense-qualityDmaintenanceProvides AI assistants with up-to-date legal documents from official sources, enabling accurate legal information retrieval and analysis.Last updated14
Related MCP Connectors
Connect AI to millions of laws and court cases with the Lawstronaut MCP.
Legal research: US primary law, Indian case law (31M+ judgments), and citation graph traversal.
Verified, citable German & EU law for any LLM. Daily updates from official sources, hosted in DE.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gabrielperezibacache/mcp-legal-chile'
If you have feedback or need assistance with the MCP directory API, please join our Discord server