up-law-argleg-mcp
This server provides access to a comprehensive Argentine legal corpus — national legislation, Supreme Court (CSJN) jurisprudence, and international treaties — enabling verifiable legal research with full provenance tracking.
Legislation (Normas)
buscar_normas— Search laws, decrees, and other norms by free text, type, issuing body, and date rangeobtener_norma— Retrieve full metadata, captured texts, article index, modification history, and InfoLEG observationsleer_articulos— Read literal text of specific articles (individual, range, or list) with per-article provenance; supports current vs. original versionsmodificaciones— Explore a norm's modification graph (incoming, outgoing, or both)buscar_articulos— Hybrid semantic + full-text search across ~1.2 million articles to find which norm regulates a given topic
Supreme Court Jurisprudence (CSJN)
buscar_fallos— Hybrid search over case summaries and full ruling texts, filterable by thematic descriptors and year rangeobtener_fallo— Retrieve a full case profile: caption, date, volume/page, summaries, topics, holdings, and PDF provenanceleer_fallo— Read the full literal text of a ruling, paginated, with citation verification support
International Treaties (Cancillería)
buscar_tratados— Search bilateral/multilateral treaties by free text, subject, counterpart, signing dates, status, or constitutional hierarchy (CN art. 75 inc. 22)obtener_tratado— Retrieve a treaty's full lifecycle (signing, ratification, entry into force, denunciation), parties, hierarchy status, and linked approval normsleer_tratado— Read the full literal text of a treaty from official sources, paginated with sha256 + URL provenance
Verification & System Status
verificar_cita— Verify that any quoted text exists literally in the corpus; returns VERIFIED (with location and source), NOT FOUND, or NOT FOUND WITH SIMILAR (showing a diff against the closest real passage); supports strict and tolerant modesestado_corpus— Check corpus freshness and coverage: last ingestion timestamps, document counts, and embedding coverage
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., "@up-law-argleg-mcp buscar la Ley 27.078 de Tecnologías de la Información"
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.
up-law-argleg-mcp
Servidor MCP que expone el corpus legal de la base up_law_argleg_db (legislacion
nacional argentina + jurisprudencia CSJN + tratados internacionales de
Cancilleria) a Claude, con proveniencia
verificable en cada respuesta: el abogado puede rastrear cada texto al
documento oficial capturado (sha256 + fecha + URL de InfoLEG) y auditar
cualquier cita textual con el tool verificar_cita.
Requisitos
Docker Desktop (Postgres 16 + pgvector via docker compose del proyecto infoleg)
Python >= 3.12 y uv
La base
up_law_argleg_dbcargada (ver proyecto hermano../infoleg)
Related MCP server: bora-mcp
Instalacion (macOS / Windows)
# 1. base con pgvector (en el proyecto infoleg)
cd ../infoleg && docker compose up -d
# 2. dependencias
cd ../mcp-v2 && uv sync
# 3. schema mcp + roles (idempotente)
uv run up-law-argleg-mcp setup-db
# 4. embeddings (primera vez: 2-4 h; incrementales: minutos)
uv run up-law-argleg-mcp index
# 5. smoke
uv run up-law-argleg-mcp statusClaude Desktop
Agregar a claude_desktop_config.json
(macOS: ~/Library/Application Support/Claude/,
Windows: %APPDATA%\Claude\):
{
"mcpServers": {
"up_law_argleg": {
"command": "uv",
"args": ["run", "--directory", "/RUTA/ABSOLUTA/a/mcp-v2", "up-law-argleg-mcp", "serve"]
}
}
}En Windows la ruta usa barras invertidas escapadas: C:\\Users\\...\\mcp-v2.
Servidor HTTP (clientes remotos)
Ademas del modo stdio, el servidor puede exponerse por Streamable HTTP
(el transporte que aceptan los conectores remotos de claude.ai y el parametro
mcp_servers de la API):
uv run up-law-argleg-mcp serve-http # 127.0.0.1:8000
uv run up-law-argleg-mcp serve-http --host 0.0.0.0 --port 9000El endpoint MCP queda en http://HOST:PORT/mcp, en modo stateless (apto para
escalar horizontalmente). Configuracion via .env:
HTTP_HOST,HTTP_PORT: interfaz y puerto de escucha.HTTP_ALLOWED_HOSTS: lista JSON de dominios publicos aceptados en el headerHostal desplegar detras de un proxy (p.ej.'["mcp.ejemplo.ar"]'); vacia = solo localhost, proteccion DNS-rebinding default del SDK.HTTP_RATE_RPM,HTTP_RATE_BURST: rate limit por IP (token bucket, default 120 rpm / burst 20;HTTP_RATE_RPM=0lo desactiva). Al exceder responde 429 conRetry-After.DB_POOL_MAX: conexiones simultaneas maximas del pool de lectura (default 10).
Las consultas a la base van por un pool de conexiones (psycopg_pool), asi que
multiples clientes concurrentes se atienden en paralelo.
Operacion
Tras cada sync mensual del ETL infoleg:
uv run up-law-argleg-mcp index.uv run up-law-argleg-mcp statusmuestra frescura y cobertura.Tests:
uv run pytest(unit) |uv run pytest -m live(requiere base) |uv run pytest -m model(carga el modelo de embeddings).
Garantia de fidelidad
El servidor se conecta con un rol de solo lectura (
mcp_reader).Los tools devuelven texto verbatim; el servidor jamas resume.
Cada texto viaja con bloque
fuente(sha256 del documento oficial, fecha de captura, URL, offsets).verificar_citaconfirma si una cita existe literalmente en el corpus, y detecta citas casi-correctas mostrando el diff contra el texto real.La base no determina vigencia: expone el grafo de modificaciones y las observaciones de InfoLEG; el analisis juridico es del profesional.
Créditos
Proyecto de la Facultad de Derecho de la Universidad de Palermo — Palermo E-Law / Innovation Hub.
Equipo: Hernán Quadri, Juan Cruz Romano, Aníbal Ramírez y Guido Barosio.
Available Tools
13 toolsbuscar_articulosA
Busqueda profunda sobre 1,2M articulos vigentes (hibrida: semantica + FTS). Para "que norma regula X" cuando no sabes donde mirar. El texto devuelto es literal de la base, con proveniencia.
Inputs: query (required), limit, tipo_norma.
buscar_fallosB
Busca jurisprudencia CSJN (hibrida sobre sumarios + texto de fallos).
voces filtra por descriptor tematico del sumario (ILIKE).
Inputs: query (required), limit, voces, anio_desde, +1 more.
buscar_normasA
Busca normas por texto libre sobre titulos y resumenes oficiales (FTS), con filtros por tipo (Ley/Decreto/...), organismo y rango de fecha_boletin (YYYY-MM-DD). Devuelve id canonico e id_norma; usar cualquiera en los otros tools.
Inputs: query (required), tipo, limit, organismo, +2 more.
buscar_tratadosB
Busca tratados internacionales (Cancilleria). Con query la busqueda es
FTS sobre la ficha (titulo, partes, materias) + texto completo del tratado;
sin query lista por filtros (p.ej. solo_jerarquia_constitucional=True da
los tratados con jerarquia de la CN art. 75 inc. 22). contraparte filtra
por pais/organismo; fechas de firma en YYYY-MM-DD. Usar ficha_id_opaco o
id_tratado+catalogo en los otros tools.
Inputs: limit, query, materia, catalogo, +5 more.
estado_corpusA
Frescura y cobertura del corpus: ultima ingesta por etapa, conteos, cobertura de segmentacion y de embeddings.
Inputs: no named parameters.
leer_articulosA
Texto LITERAL de articulos de una norma, con proveniencia por articulo.
articulos: "245", "240-250" o "14 bis, 245". Sin articulos devuelve todos.
Cita el texto de forma textual y verifica cada cita con verificar_cita antes
de responder. documento: texto_actualizado | texto_original (default: el
actualizado si existe).
Inputs: ref (required), articulos, documento, fragmento.
leer_falloA
Texto completo LITERAL de un fallo, paginado en fragmentos. Citar textual y verificar con verificar_cita.
Inputs: id_fallo (required), fragmento.
leer_tratadoA
Texto completo LITERAL de un tratado (extraido del documento oficial de Cancilleria), paginado en fragmentos y con proveniencia (sha256 + URL). Citar textual y verificar con verificar_cita.
Inputs: ref (required), caso, catalogo, fragmento.
modificacionesC
Grafo de modificaciones de una norma segun InfoLEG. direccion:
entrantes (que la modifican) | salientes (a cuales modifica) | ambas.
Inputs: ref (required), direccion.
obtener_falloC
Ficha de un fallo CSJN: caratula, fecha, tomo/pagina, sumarios completos con voces y holdings, y proveniencia del PDF.
Inputs: id_fallo (required).
obtener_normaA
Ficha completa de una norma: metadatos, textos capturados, indice de
articulos, resumen de modificaciones y observaciones de InfoLEG. ref acepta
id canonico (ley_20744), alias (ccyc) o id_norma numerico. La base NO
determina vigencia: solo presenta el grafo de modificaciones.
Inputs: ref (required).
obtener_tratadoA
Ficha completa de un tratado: fechas del ciclo de vida (firma, entrada en
vigor, ratificacion, denuncia...), contrapartes, firmantes, jerarquia
constitucional si la tiene, normas aprobatorias vinculadas y archivos
capturados. ref acepta ficha_id_opaco o id_tratado numerico (si el id
existe en ambos catalogos, desambiguar con catalogo).
Inputs: ref (required), catalogo.
verificar_citaA
Verifica que un texto citado exista LITERALMENTE en el corpus.
Resultados: VERIFICADA (con ubicacion y fuente) | NO_ENCONTRADA |
NO_ENCONTRADA_CON_SIMILAR (existe un pasaje parecido, NO verificado, con
diff). modo: estricta (solo whitespace flexible) | tolerante (tildes,
mayusculas, comillas). Usar sobre toda cita textual antes de responder.
Inputs: texto (required), ref, modo, articulo.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct operation and document type: buscar for search, leer for reading literal text, obtener for metadata, plus specialized tools for modifications, corpus status, and citation verification. No overlap.
All tool names follow a consistent verb_noun pattern in Spanish: buscar_ (search), leer_ (read), obtener_ (get). Exceptions like modificaciones, estado_corpus, and verificar_cita are nouns or verb+noun but are clearly differentiated and fit the domain.
With 13 tools, the server covers all essential operations for legal research (search, read, metadata, modifications, citation verification) without being overwhelming. Each tool has a clear purpose.
The tool set provides a complete workflow: search across articles, rulings, norms, and treaties; read full literal texts; retrieve detailed metadata; explore modification graphs; verify citations; and check corpus health. No obvious gaps for the intended domain.
Related MCP Connectors
Brazilian legal stack in one MCP: lawsuits, court publications, case law, tenders, certificates.
Official MCP connector for Legalize: read and search its whole open corpus, at any point in time.
Resolve, search and verify legal citations against the official sources, with provenance.
MCP for CanLII: Canadian case law and legislation metadata (federal, provincial, territorial).
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceRemote MCP server that provides access to over 285K Argentine court rulings and user's own case files via Streamable HTTP transport.-
- AlicenseAqualityCmaintenanceMCP server for searching and extracting official announcements, decrees, and resolutions from the Argentine Official Gazette (Boletín Oficial de la República Argentina). It enables LLMs to perform real-time searches and retrieve verbatim legal text with complete juridical fidelity.1419 npm3MIT
- AlicenseNot gradedqualityDmaintenanceA specialized MCP server for Argentine legal professionals, enabling legal research, document processing, case analysis, and practice management through integration with official Argentine legal databases.8MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that enables searching and retrieving judicial decisions from the Uruguayan National Public Jurisprudence Database (BJN).-