Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions servers/lexius/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Lexius Compliance MCP Server

AI regulatory compliance database with provenance-tracked obligations, penalties, deadlines, and verbatim regulation text.

## What it does

Lexius gives Claude access to a structured compliance database covering the **EU AI Act** (Regulation 2024/1689) and **DORA** (Regulation 2022/2554). Every fact is tagged with a provenance tier:

- **AUTHORITATIVE** — verbatim from the official regulation text (EUR-Lex CELLAR), SHA-256 hash-verified
- **CURATED** — written or reviewed by a domain expert, with attribution
- **AI_GENERATED** — model output, flagged for review

## Tools (13)

| Tool | What it does |
|------|-------------|
| `legalai_classify_system` | Classify an AI system's risk level |
| `legalai_get_obligations` | Get compliance obligations by role/risk |
| `legalai_calculate_penalty` | Calculate fine exposure (EUR 35M/15M/7.5M tiers) |
| `legalai_get_article` | Retrieve verbatim article text |
| `legalai_get_deadlines` | Compliance deadlines with days remaining |
| `legalai_search_knowledge` | Semantic search across all content |
| `legalai_answer_question` | FAQ lookup |
| `legalai_run_assessment` | Structured assessments (Art. 6(3), GPAI) |
| `legalai_list_legislations` | Available legislations |
| `legalai_get_article_history` | Article revision history |
| `legalai_get_derivation_chain` | Trace obligation → source articles |
| `legalai_get_article_extracts` | Extracted facts (fines, dates, cross-refs) |
| `legalai_run_swarm_assessment` | Parallel hivemind compliance assessment |

## Modes

### Direct Mode (own database)

Connect to a PostgreSQL database with the Lexius schema. Use the `robotixai/lexius-db` Docker image for a pre-configured database:

```bash
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=secret robotixai/lexius-db
```

Then configure the MCP server with `DATABASE_URL=postgresql://legal_ai:secret@host.docker.internal:5432/legal_ai`.

### Proxy Mode (hosted API)

Connect to a hosted Lexius API — no database required. Configure with `LEXIUS_API_URL` and `LEXIUS_API_KEY`.

## Data

- **190 articles** (113 EU AI Act + 13 annexes + 64 DORA) — all AUTHORITATIVE
- **1,734 extracted facts** (fine amounts, percentages, dates, cross-references, shall-clauses)
- **61 curated obligations** (35 EU AI Act + 26 DORA)
- **5 penalty tiers** with CI-verified amounts
- **44 FAQ entries** with semantic search

## Links

- [GitHub](https://github.com/rob-otix-ai/lexius)
- [npm: @robotixai/lexius-mcp](https://www.npmjs.com/package/@robotixai/lexius-mcp)
- [Docker Hub: robotixai/lexius-mcp](https://hub.docker.com/r/robotixai/lexius-mcp)
58 changes: 58 additions & 0 deletions servers/lexius/server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: lexius
image: mcp/lexius
type: server
meta:
category: database
tags:
- compliance
- regulation
- legal
- eu-ai-act
- dora
- provenance
about:
title: Lexius Compliance
description: >-
AI regulatory compliance database with provenance-tracked obligations,
penalties, deadlines, and verbatim regulation text. Covers the EU AI Act
and DORA. Every fact is labelled AUTHORITATIVE (verbatim from EUR-Lex),
CURATED (expert-reviewed), or AI_GENERATED. Includes deterministic fact
extraction and parallel hivemind swarm assessment.
icon: https://avatars.githubusercontent.com/u/209498797?v=4
source:
project: https://github.com/rob-otix-ai/lexius
branch: main
commit: d50a452d8c6ac1214fd2ad281d396ab9c757b893
directory: packages/mcp
config:
description: >-
Direct mode: set DATABASE_URL to a PostgreSQL database with the Lexius
schema (use 'docker run robotixai/lexius-db' for a ready-made database).
Proxy mode: set LEXIUS_API_URL and LEXIUS_API_KEY to connect to a hosted
Lexius API without needing a local database.
secrets:
- name: lexius.api_key
env: LEXIUS_API_KEY
example: lx_your_api_key_here
env:
- name: DATABASE_URL
example: postgresql://legal_ai:secret@host.docker.internal:5432/legal_ai
value: "{{lexius.database_url}}"
- name: LEXIUS_API_URL
example: https://api.lexius.ai
value: "{{lexius.api_url}}"
- name: LEXIUS_API_KEY
example: lx_your_api_key_here
value: "{{lexius.api_key}}"
parameters:
type: object
properties:
database_url:
type: string
description: PostgreSQL connection string (direct mode)
api_url:
type: string
description: Hosted Lexius API URL (proxy mode)
api_key:
type: string
description: API key for hosted Lexius API (proxy mode)
108 changes: 108 additions & 0 deletions servers/lexius/tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
[
{
"name": "legalai_classify_system",
"description": "Classify an AI system under a legislation's risk framework (e.g., EU AI Act prohibited/high-risk/limited/minimal). Uses signals, keywords, and semantic matching.",
"arguments": [
{ "name": "legislationId", "type": "string", "desc": "Legislation ID (e.g., 'eu-ai-act', 'dora')" },
{ "name": "description", "type": "string", "desc": "Free-text description of the AI system" },
{ "name": "role", "type": "string", "desc": "Organization's role: 'provider', 'deployer', or 'unknown'" }
]
},
{
"name": "legalai_get_obligations",
"description": "Get compliance obligations filtered by legislation, role, and risk level. Each obligation includes its provenance tier (AUTHORITATIVE/CURATED).",
"arguments": [
{ "name": "legislationId", "type": "string", "desc": "Legislation ID" },
{ "name": "role", "type": "string", "desc": "Filter by role (e.g., 'provider', 'deployer')" },
{ "name": "riskLevel", "type": "string", "desc": "Filter by risk level (e.g., 'high-risk', 'limited')" }
]
},
{
"name": "legalai_calculate_penalty",
"description": "Calculate potential penalties for a specific violation type. Returns AUTHORITATIVE fine amounts extracted from verbatim regulation text.",
"arguments": [
{ "name": "legislationId", "type": "string", "desc": "Legislation ID" },
{ "name": "violationType", "type": "string", "desc": "Violation type (e.g., 'prohibited-practices', 'high-risk-non-compliance')" },
{ "name": "annualTurnoverEur", "type": "number", "desc": "Annual worldwide turnover in EUR" },
{ "name": "isSme", "type": "boolean", "desc": "Whether the organization is an SME" }
]
},
{
"name": "legalai_get_article",
"description": "Retrieve a specific article by number from a legislation. Returns verbatim regulation text (AUTHORITATIVE) when fetched from EUR-Lex CELLAR.",
"arguments": [
{ "name": "legislationId", "type": "string", "desc": "Legislation ID" },
{ "name": "articleNumber", "type": "string", "desc": "Article number (e.g., '6', '99', 'annex-iv')" }
]
},
{
"name": "legalai_get_deadlines",
"description": "Get compliance deadlines for a legislation with days remaining and past/upcoming status.",
"arguments": [
{ "name": "legislationId", "type": "string", "desc": "Legislation ID" },
{ "name": "onlyUpcoming", "type": "boolean", "desc": "If true, only return future deadlines" }
]
},
{
"name": "legalai_search_knowledge",
"description": "Semantic search across articles, obligations, FAQs, or risk categories. Results include provenance tier.",
"arguments": [
{ "name": "legislationId", "type": "string", "desc": "Legislation ID" },
{ "name": "query", "type": "string", "desc": "Natural language search query" },
{ "name": "entityType", "type": "string", "desc": "Type: 'article', 'obligation', 'faq', 'risk-category'" },
{ "name": "limit", "type": "number", "desc": "Max results (default 5)" }
]
},
{
"name": "legalai_answer_question",
"description": "Answer a compliance question using the FAQ knowledge base with semantic matching.",
"arguments": [
{ "name": "legislationId", "type": "string", "desc": "Legislation ID" },
{ "name": "question", "type": "string", "desc": "The question to answer" }
]
},
{
"name": "legalai_run_assessment",
"description": "Run a structured compliance assessment (e.g., Article 6(3) exception check, GPAI systemic risk).",
"arguments": [
{ "name": "legislationId", "type": "string", "desc": "Legislation ID" },
{ "name": "assessmentId", "type": "string", "desc": "Assessment identifier" }
]
},
{
"name": "legalai_list_legislations",
"description": "List all available legislations in the database (currently EU AI Act and DORA).",
"arguments": []
},
{
"name": "legalai_get_article_history",
"description": "Retrieve the full revision history of an article, showing how verbatim text changed across amendments.",
"arguments": [
{ "name": "articleId", "type": "string", "desc": "Article identifier (e.g., 'eu-ai-act-art-99')" }
]
},
{
"name": "legalai_get_derivation_chain",
"description": "Trace an obligation back to its source articles. Shows the verbatim law that a curated obligation paraphrases.",
"arguments": [
{ "name": "obligationId", "type": "string", "desc": "Obligation identifier" }
]
},
{
"name": "legalai_get_article_extracts",
"description": "View deterministically extracted facts from an article's verbatim text: fine amounts, percentages, dates, cross-references, shall-clauses. All AUTHORITATIVE.",
"arguments": [
{ "name": "articleId", "type": "string", "desc": "Article identifier (e.g., 'eu-ai-act-art-99')" },
{ "name": "extractType", "type": "string", "desc": "Optional filter: 'fine_amount_eur', 'turnover_percentage', 'date', 'article_cross_ref', 'shall_clause'" }
]
},
{
"name": "legalai_run_swarm_assessment",
"description": "Run a parallel hivemind assessment — multiple agents analyse all articles simultaneously, producing a comprehensive ComplianceReport with gap detection. Fully deterministic (no LLM in the agent loop).",
"arguments": [
{ "name": "legislationId", "type": "string", "desc": "Legislation ID (e.g., 'eu-ai-act')" },
{ "name": "systemDescription", "type": "string", "desc": "Description of the AI system being assessed" },
{ "name": "concurrency", "type": "number", "desc": "Number of parallel agents (default 4, max 8)" }
]
}
]