nexus-legal-mcp
This server connects Claude and other MCP clients to the Nexus Legal API, exposing 27 legal AI tools for analysis, drafting, verification, simulation, and research.
Analyze contracts/legal documents (
nexus_analyze) with ISO 31000 risk assessment, certainty locks, blocking signals, and audit trails.Ask open legal questions (
nexus_consulta) with or without a document.Draft pleadings, appeals, claims, and clauses (
nexus_draft).Cross-audit prior analyses (
nexus_audit,nexus_opinion,nexus_adversarial,nexus_redteam) for adversarial validation and second opinions.Run Monte Carlo litigation/contract stress simulations (
nexus_monte_carlo).Search case law and legislation semantically (
nexus_jurisprudencia_search,nexus_normativa_search,nexus_doctrina).Verify citations and check every citation in a document (
verify_cita,nexus_verificacion).Compute procedural time limits (
plazos_calcular) for ES and GB-EAW forums.Explore statute↔case-law citation graphs (
cruce_normativa_jurisprudencia).Compare legal treatment across 2–15 jurisdictions (
nexus_cross_border_compare).Analyze Box files by file ID (
box_analyze).Check conflicts of interest, compare document versions, and inspect attention inbox (
nexus_conflict_check,nexus_compare_versions,nexus_inbox).Check corpus coverage and availability (
nexus_corpus_coverage,nexus_normativa_coverage).
@nexus-legal/mcp
MCP (Model Context Protocol) server for Nexus Legal — exposes 27 specialised legal capabilities to Claude Desktop, Claude Code, Cursor and any other MCP-compatible client.
What is this? Connect your Claude to Nexus in 30 seconds. From then on Claude can run ISO 31000 legal analysis, Monte Carlo litigation simulation, case-law search, legal drafting, administrative doctrine, adversarial red teaming, multi-jurisdiction comparison (cross-border), citation verification, procedural time-limit computation, the statute↔case-law citation graph, and analysis of Box files by
file_id(box_analyze) — without leaving the conversation.
Quick install
1. Generate an MCP key
Go to legal.nexusquantum.legal/developers, choose "MCP server", give it a name (e.g. "personal MacBook") and press + Create MCP key. Copy the nlk_... key — it is shown only once.
2. Configure your client
Claude Desktop (macOS)
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"nexus-legal": {
"command": "npx",
"args": ["-y", "@nexus-legal/mcp"],
"env": {
"NEXUS_API_KEY": "nlk_YOUR_KEY_HERE"
}
}
}
}Restart Claude Desktop. You will see a 🔌 icon in the chat with the 27 Nexus tools available.
Claude Desktop (Windows)
Edit %APPDATA%\Claude\claude_desktop_config.json with the same contents.
Claude Code (CLI)
claude mcp add nexus-legal -- npx -y @nexus-legal/mcp
# Then set your key:
export NEXUS_API_KEY=nlk_YOUR_KEY_HERECursor
Edit ~/.cursor/mcp.json:
{
"mcpServers": {
"nexus-legal": {
"command": "npx",
"args": ["-y", "@nexus-legal/mcp"],
"env": { "NEXUS_API_KEY": "nlk_YOUR_KEY_HERE" }
}
}
}3. Try it
In Claude Desktop, type:
Analyse this contract with Nexus in jurisdiction GB, commercial branch, conservative profile: «[paste the contract text here]»
Claude will call the nexus_analyze tool and return the report with certainty locks [L1]/[L2-J]/[L3-NV]/[L4], blocking signals [L5-C]/[L5-P], and a NEXUS-AUDIT-TRAIL block.
Related MCP server: jurisprudenciaia-mcp
The 27 tools
Tool | Capability | Typical cost |
| Full legal analysis (Node A — ISO 31000) | 1-3 credits |
| Open legal question, with or without a document | 1 credit |
| Legal drafting (appeal, claim, defence, clause…) | 2-4 credits |
| Cross-audit of a Node A analysis (Node B) | 1-2 credits |
| Multi-agent consensus Node A ↔ Node B (analysis + adversarial audit in a loop until consensus; | 3-7 credits |
| Monte Carlo scenario simulation (ISO 31000 §6) | 4 credits |
| Administrative doctrine search, by jurisdiction | 1 credit |
| Multi-LLM second opinion on a previous analysis | 2 credits |
| Adversarial red team (vulnerabilities as structured JSON) | 5 credits |
| Adversarial argument in prose over a previous analysis | 2-3 credits |
| Multi-jurisdiction comparison (2-15 jurisdictions) | 2-4 credits |
| Semantic search over the multi-jurisdiction case-law corpus | requires balance + the case-law add-on for that jurisdiction |
| Deterministic verification of one citation (judgment or provision) against the official corpus | requires balance (+ case-law add-on if the citation is case law) |
| Procedural time limits by forum. | requires balance |
| Citation graph: provisions ↔ judgments | requires balance + case-law add-on |
| Analysis of a Box file by | 1-2 credits |
| Verification Centre: checks EVERY citation in a document against the official corpus (deterministic, no LLM cost) | requires balance |
| Strategic negotiation playbook over a previous analysis | 2-3 credits |
| Comparison of two versions of a document (V1 ↔ V2) | 2 credits |
| Conflict check (conflicts of interest) over the parties to a case file | 1 credit |
| Firm-wide attention inbox (what needs action) | requires balance |
| Legal chat with the case context | 1 credit |
| Semantic search over legislation in force | requires balance + the legislation add-on for that jurisdiction |
| Literal text of a provision at a date (lex temporis) | requires balance + legislation add-on |
| Legislative hierarchy: coverage by level | requires balance |
| Inventory of the case-law corpus | read-only |
| Legislation corpus coverage (jurisdictions + freshness) | read-only |
Billing: the MCP server is not free. Every call requires an account with a credit balance > 0 (paid from minute one). Premium content is per jurisdiction add-on: case law and extra legislation are add-ons (Layer 3) — the subscription includes the legislation of one jurisdiction. Without the matching add-on, searches and lookups for that jurisdiction return
403 CONTENT_NOT_ENTITLED.
On jurisdictions and coverage. 63 jurisdiction codes are selectable (GB, ES, CO, SG, US with the US-CA/US-NY/US-DE/US-TX state overlays, MULTI for cross-border, and others). Selectable is not the same as grounded: what corpus actually backs a given jurisdiction — how many provisions, when our copy was last written, whether search is enabled for it — varies, and it is not something to infer from this list. Call nexus_normativa_coverage with your key: it answers for the jurisdictions your account has active, with the figures of each. A jurisdiction with no grounding corpus still analyses, but without literal citation against an official source.
Bring-your-own-engine (BYO) accounts — what you will see before registering one
Some accounts are provisioned so that legal generation runs only on the firm's own LLM engine, with no fallback chain. That is not a limitation: it is the guarantee that documents never reach a Nexus engine.
While no provider is registered and enabled, every generative tool
(nexus_analyze, nexus_consulta, nexus_chat, nexus_draft, nexus_audit,
nexus_adversarial, nexus_redteam, nexus_doctrina, nexus_consensus,
nexus_monte_carlo, nexus_opinion, nexus_playbook, nexus_compare_versions,
nexus_cross_border_compare, box_analyze) returns:
Error running nexus_analyze: BYO_PROVIDER_REQUIRED: This account requires its own
BYO LLM engine for AI-generative endpoints … This is a configuration state, not a
transient failure — retrying returns the same 409. Register and enable a provider
via POST /api/v1/llm-providers, then retry.Retrying does not fix it, and no credits are charged for a run that stops there.
Register the engine once (POST /api/v1/llm-providers, or header → AI models in
the application) and run it again.
Reasoning engines and long analyses
If your engine is a reasoning model (DeepSeek V-pro, o1-style, Claude 5 with thinking), a heavy analysis can take longer than a synchronous HTTP request is allowed to last. The gateway closes the connection at 300 s — that ceiling is ours to live with, not to raise.
MEASURED on 2026-08-18: nexus_analyze in mode: "auditoria" over a ~5 KB contract, on a BYO
DeepSeek engine, went past it and returned 502. The reason is not a fault in your engine: a
reasoning model spends a large part of its completion budget thinking before it writes, and when
it runs out mid-thought Nexus automatically re-issues the call with a wider budget — which costs
more wall clock again.
Two ways round it, in order of preference:
Use the asynchronous path for that combination:
POST /api/v1/jobswithkind: "analyze"returns202and ajobIdyou poll (or a signed webhook). No wall clock. This is the right door for reasoning engines and forauditoriaon large documents.Use
mode: "standard"through the MCP tool, which is materially shorter.
Platform engines and mode: "standard" are unaffected: the synchronous tool is the right one
there and stays the default.
Read-only tools work without an engine, because they generate nothing:
nexus_jurisprudencia_search, verify_cita, nexus_verificacion,
nexus_normativa_search / _articulo / _pyramid, nexus_corpus_coverage,
nexus_normativa_coverage, cruce_normativa_jurisprudencia, plazos_calcular,
nexus_conflict_check (deterministic name matching, no LLM) and nexus_inbox.
Environment variables
Variable | Default | Description |
| — | Required. An |
|
| For test or self-hosted environments. |
|
| Timeout for long analyses. |
Language. This package sends the same tool descriptions to every client — MCP
publishes them once, in tools/list, and no tool here takes a language argument —
so descriptions and rendered output are in English. Where a tool produces a legal
deliverable, the language of that deliverable follows the jurisdiction and the account,
not this README.
You can name the role and the party in your own terms. professionalRole takes
lawyer, solicitor, barrister, prosecutor, notary, registrar, judge,
in-house and individual. proceduralSide takes the term your forum actually uses:
claimant (England and Wales, CPR r 2.3), pursuer (Scotland), plaintiff (Northern
Ireland, which did not adopt the CPR), defendant, defender. The original Spanish wire
values — abogado, demandante, auditoria — are unchanged and will keep working: this
adds spellings, it does not retire any. Everything resolves to the same protocol value
before it reaches the analysis, so the two are interchangeable in every call.
API version: this server speaks to the Nexus v1 API, the same one used by the
TypeScript and
Python SDKs. Read-only and verification tools
call /api/v1/* routes; generative ones enter through the backend node routes with the
same nlk_ key (mcp scope), the same billing and the same BYO enforcement.
This stdio package exposes 27 of the catalogue's capabilities. The remote
connector (https://legal.nexusquantum.legal/api/mcp, nothing to install) also
exposes the case-file, firm-memory, firm-governance, legal-analytics, account and billing
capabilities. If you need any of those, use the remote connector or the v1 API directly.
Privacy and GDPR
Zero Retention on EU infrastructure. Documents you send via MCP are processed in RAM on Railway europe-west4-drams3a (Netherlands) and are NOT persisted to a database by default. The Nexus Zero Retention policy applies to 100% of MCP traffic exactly as it does to web traffic.
PII Gatekeeper. Before anything reaches the LLM, the backend anonymises national ID numbers, IBANs, phone numbers, emails and account numbers with reversible tokens (
[DNI_1],[ACCOUNT_3]…). The MCP client only ever sees output already re-identified by our pipeline.Audit. Every tool call is recorded in
analysis_costsandapi_usage_stats(withvia_api_key_id) for billing and traceability.
Support
Email: support@nexusquantum.legal
Documentation: https://legal.nexusquantum.legal/developers
Issues: https://github.com/djtellado/nexus-legal-prod/issues
Licence
Apache-2.0 — see LICENSE and NOTICE.
Copyright 2026 Nexus Legal · Quantum Nexus Ventures.
Available Tools
11 toolsnexus_adversarialAInspect
ARGUMENTACIÓN ADVERSARIAL (Nodo C — modo contraparte). Para cada conclusión del análisis Nodo A, construye el argumento más fuerte que esgrimiría la contraparte. Útil para preparar litigio o anticipar objeciones en negociación. Distinto de nexus_redteam: adversarial DEBATE las conclusiones (texto en prosa), redteam DESTRUYE cláusulas (JSON estructurado). USAR CUANDO: el cliente necesita anticipar objeciones de la otra parte. Coste: 2-3 créditos.
Inputs: text (required), analysis, jurisdiction, legalBranch, +2 more.
nexus_analyzeAInspect
ANÁLISIS PRIMARIO JURÍDICO (Nodo A — ISO 31000). Examina un documento íntegramente: extrae partes, riesgos, cláusulas, plazos, normas aplicables y jurisprudencia relevante. Aplica la jurisdicción (ES/CO/MX/etc.) y rama del derecho correspondiente. Devuelve informe estructurado con candados de certeza [L1]/[L2-J]/[L3-NV]/[L4] y señales bloqueantes [L5-C]/[L5-P]. Termina con bloque NEXUS-AUDIT-TRAIL para auditoría posterior. Coste: ~1-3 créditos según tamaño + tier de modelo. USAR CUANDO: el usuario aporta un documento jurídico y pide análisis de riesgos, viabilidad, cláusulas críticas, o defensa en juicio.
Inputs: text (required), jurisdiction, jurisdictionB, legalBranch, +5 more.
nexus_auditAInspect
AUDITORÍA CRUZADA DEL ANÁLISIS NODO A (Nodo B — control adversarial). Verifica el análisis previo contra el documento original: detecta afirmaciones no soportadas, candados mal asignados, omisiones, contradicciones internas, y genera el bloque de verificaciones V-XX. Devuelve confidence score 0-100. USAR CUANDO: el usuario quiere una segunda capa de validación antes de presentar el análisis a un cliente o tribunal. Requiere haber ejecutado nexus_analyze primero. Coste: 1-2 créditos.
Inputs: analysis (required), text (required), jurisdiction, jurisdictionB, +3 more.
nexus_consultaAInspect
CONSULTA JURÍDICA LIBRE (Nodo A — modo Q&A). Pregunta jurídica en lenguaje natural, con o sin documento de referencia. Devuelve respuesta con candados de certeza y referencias normativas/jurisprudenciales cuando aplican. Soporta hilos conversacionales mediante el parámetro history. Coste: 1 crédito. USAR CUANDO: el usuario hace una pregunta jurídica concreta (¿cuál es el plazo de prescripción?, ¿es válida esta cláusula?, ¿qué dice el TS sobre X?) y NO necesita análisis íntegro de un documento.
Inputs: question (required), jurisdiction, documentText, analysisContext, +2 more.
nexus_cross_border_compareAInspect
COMPARATIVA MULTI-JURISDICCIONAL. Para los hechos/contrato aportados, compara cómo lo trata el ordenamiento jurídico de cada jurisdicción listada (2-15 países). Identifica: ley aplicable más favorable, foro competente óptimo, riesgos fiscales por país (CDI), reconocimiento de sentencias entre jurisdicciones, conflictos de leyes. Devuelve JSON con tabla comparativa estructurada. USAR CUANDO: el cliente opera en varios países y necesita decidir dónde litigar/contratar/establecerse. Coste: 2-4 créditos según número de jurisdicciones.
Inputs: text (required), jurisdictions (required), legalBranch, language.
nexus_doctrinaAInspect
BÚSQUEDA DE DOCTRINA ADMINISTRATIVA (Nodo Doctrina — RAG + LLM). Consulta el corpus de doctrina admin/tributaria (DGT consultas vinculantes V-XXXX-YY, TEAC RG XXXX/XXXX, Consejo de Estado dictámenes). Distingue 'Doctrina consolidada' (≥2 fuentes ORIGEN-A/B) vs 'Criterio orientativo' ([L3-NV]). Indica vinculatoriedad y conflictos con jurisprudencia TS. USAR CUANDO: el usuario pregunta por el criterio administrativo en un tema fiscal/regulatorio concreto. Coste: 1 crédito.
Inputs: query (required), jurisdiction, language, history.
nexus_draftAInspect
REDACCIÓN DE ESCRITO JURÍDICO (Nodo A — Modo Redactor). Genera el primer borrador de un escrito (recurso, demanda, contestación, cláusula contractual, dictamen) siguiendo el formato y candados obligatorios de MODULE-DRAFT. Si la fecha de notificación es incierta, se degrada a [L3-NV] y se pide verificación en el brief. USAR CUANDO: el usuario pide redactar un escrito concreto, normalmente tras un análisis Nodo A previo o sobre un documento aportado. Coste: 2-4 créditos.
Inputs: instructions (required), jurisdiction, legalBranch, documentContext, +4 more.
nexus_jurisprudencia_searchAInspect
BÚSQUEDA SEMÁNTICA DE JURISPRUDENCIA. Consulta vectorial (voyage-law-2) sobre el corpus curado de Nexus: ES ~141k sentencias (CENDOJ — TS/AN/TSJ/AP) · CO ~106k (CC/CSJ/CE) · más países en expansión. Devuelve top-K resultados con título, fuente, extracto (2 000 chars) y URL permanente al texto íntegro. USAR CUANDO: el usuario pide localizar sentencias sobre un tema concreto, contrastar un argumento, o construir un dossier de citas. Coste: gratis (solo búsqueda).
Inputs: query (required), jurisdiction, top_k.
nexus_monte_carloAInspect
SIMULACIÓN MONTE CARLO DE ESCENARIOS (Nodo Monte Carlo — ISO 31000 §6). Estresa el perfil de riesgo de un contrato bajo variables definidas por el usuario. Por cada variable, simula tres intensidades (Moderada P25 / Base P50 / Severa P75), recalifica los riesgos del análisis Nodo A y calcula un Índice de Resiliencia Contractual (IRC 0-100). Devuelve tablas de impacto + recomendaciones de blindaje. USAR CUANDO: el cliente quiere saber cómo aguanta el contrato shocks externos (M&A, due diligence, ratings). Coste: 4 créditos.
Inputs: text (required), stressVariables (required), analysis, jurisdiction, +1 more.
nexus_opinionAInspect
SEGUNDA OPINIÓN JURÍDICA (Nodo Opinion — control adversarial con LLM distinto al Nodo A). Toma una respuesta del Nodo A y la reexamina con un modelo diferente, buscando: omisiones, sesgos, errores de aplicación normativa, o jurisprudencia ignorada. Útil para casos de alto valor. USAR CUANDO: el cliente exige doble validación sobre una posición jurídica antes de actuar. Coste: 2 créditos.
Inputs: question (required), nodaAResponse (required), analysisContext, jurisdiction, +1 more.
nexus_redteamAInspect
RED TEAM ADVERSARIAL (Nodo C — modo destructivo). Análisis hostil del documento como si fuera el abogado de la contraparte: vacíos legales, cláusulas trampa, asimetrías de poder, riesgos catastróficos. Devuelve JSON estructurado con vulnerabilidades (severidad Alta/Media) y un catastrophic_risk_score 1-100. USAR CUANDO: pre-firma de contrato estratégico, auditoría de M&A, due diligence agresivo. Coste: 5 créditos.
Inputs: documentText (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool has a clearly distinct purpose: analysis, audit, drafting, search, adversarial (two variants with explicit differences), Q&A, comparative, simulation, second opinion. Descriptions explicitly differentiate overlapping ones (e.g., nexus_adversarial vs nexus_redteam). No ambiguity.
All tools use the nexus_ prefix with descriptive names in snake_case. Most are verb-based (analyze, audit, draft, search) but a few are nouns (consulta, doctrina). The mix of English and Spanish is domain-appropriate but slight inconsistency in verb/noun pattern.
11 tools is well-scoped for a legal MCP server covering analysis, drafting, research, adversarial testing, consultation, simulation, and cross-border comparison. Each tool earns its place without redundancy.
The tool surface covers the full legal workflow: primary analysis (nexus_analyze), Q&A (nexus_consulta), drafting (nexus_draft), research (nexus_jurisprudencia_search, nexus_doctrina), adversarial review (nexus_adversarial, nexus_redteam), audit (nexus_audit), second opinion (nexus_opinion), comparative law (nexus_cross_border_compare), and risk simulation (nexus_monte_carlo). No obvious gaps.
Maintenance
Related MCP Connectors
AI governance MCP server for EU AI Act compliance and jurisdiction verification
Busca jurisprudencia española desde Claude, ChatGPT y otros clientes MCP. Localiza resoluciones, consulta sus fundamentos y el fallo cuando estén disponibles y comprueba los pasajes con enlaces a las fuentes oficiales para preparar tu investigación jurídica. Conecta tu cuenta mediante OAuth o utiliza una clave API. Los resúmenes se distinguen del texto íntegro; la cobertura es progresiva y no exhaustiva.
AI legal compliance: contract review, risk scoring, EU/CN AI act, watermark check. 8 MCP tools.
Connect AI to millions of laws and court cases with the Lawstronaut MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA modular MCP server providing structured, methodology-driven prompt endpoints for rapid legal/compliance landscape mapping, gap discovery, and risk prioritization across privacy, IP, AI governance, security, consumer, and disclosure domains, with argument-based adaptability to any product context.7 npm6MIT
- FlicenseNot gradedqualityBmaintenanceSelf-hosted MCP connector for querying Brazilian legal jurisprudence via JurisprudenciaIA. Enables natural language legal research using Claude.ai, with tools for consulting, searching, and comparing jurisprudence and legal theses.18-
- AlicenseAqualityCmaintenanceMCP server that connects AI to the Chilean legislation system (Ley Chile) for retrieving legal norms, citations, and intertemporal analysis.283MIT
- FlicenseAqualityBmaintenanceMCP server that provides access to Argentine legal documents (legislation, CSJN jurisprudence, international treaties) with verifiable provenance including SHA256 hashes and source URLs, enabling legal professionals to search and verify citations.13-