Metadata-Version: 2.4
Name: lu-eli-mcp
Version: 0.1.0
Summary: MCP server for Luxembourg legislation via Legilux (data.legilux.public.lu) — ELI-native jolux RDF metadata and Akoma Ntoso full text with verifiable citations.
Project-URL: Repository, https://github.com/matematicsolutions/lu-eli-mcp
Project-URL: Issues, https://github.com/matematicsolutions/lu-eli-mcp/issues
Project-URL: Homepage, https://matematic.co
Author-email: Matematic Solutions <kontakt@matematic.co>, Wieslaw Mazur <mazur.wieslaw2022@gmail.com>
License: Apache-2.0
License-File: LICENSE
Keywords: akoma-ntoso,eli,jolux,law,legaltech,legilux,luxembourg,mcp
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Legal Industry
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business
Requires-Python: >=3.11
Requires-Dist: anyio>=4.3
Requires-Dist: diskcache>=5.6
Requires-Dist: fastmcp>=0.2.0
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.6
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Description-Content-Type: text/markdown

# lu-eli-mcp

<!-- mcp-name: io.github.matematicsolutions/lu-eli-mcp -->

An MCP server for **Luxembourg legislation** via [Legilux](https://legilux.public.lu) open data
(`data.legilux.public.lu`). It fetches act metadata and full Akoma Ntoso text with verifiable
citations. Part of the **eu-legal-mcp** line of national legal connectors by
[MateMatic](https://matematic.co).

Legilux is genuinely **ELI-native**: every act is addressed by its ELI and described as jolux RDF
over a FRBR model (Work / Expression / Manifestation), with full text as Akoma Ntoso XML. Every
response carries a native `eli_uri`, a `human_readable_citation` and a resolvable `source_url`.

> **Read-only.** The server only queries Legilux and writes a local audit log. It never modifies
> official text.

## Tools

| Tool | What it does |
| --- | --- |
| `lu_get_act(eli)` | Metadata for an act by its ELI (full URI or bare `eli/...` path). Returns the native `eli_uri`, title, dates, in-force status, available languages / manifestations, and the act's `cites` / `modifies` / `repeals` links. |
| `lu_get_text(eli, language, file_format)` | Verbatim text in one `language` (default `fr`) and `file_format` (default `xml`, Akoma Ntoso). |

There is **no free-text search**: Legilux exposes no HTTP search endpoint. Discover acts by ELI
coordinates (from legilux.public.lu) or by following the `cites` / `modifies` / `repeals` ELIs that
`lu_get_act` returns. Luxembourg is multilingual, so titles and text may be French or German; the
`languages` field shows what exists for a given act.

## Configuration

Legilux is keyless. Configuration is optional:

| Variable | Meaning |
| --- | --- |
| `LU_ELI_BASE_URL` | Legilux data host (default `https://data.legilux.public.lu`). |
| `LU_ELI_CACHE_DIR` | Disk cache dir (default `~/.matematic/cache/lu-eli`). |
| `LU_ELI_AUDIT_DIR` | Audit log dir (default `~/.matematic/audit`). |

Copy `.mcp.json.example` to your MCP client config.

## Install

```bash
py -3.13 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"   # Windows
# or: python -m pip install -e ".[dev]"                  # POSIX
```

## Tests

```bash
pytest tests/test_instructions_drift.py tests/test_parse.py   # offline
pytest tests/test_smoke.py -v                                 # live, hits Legilux
```

## Licence

Apache-2.0. Legilux content is © the Grand Duchy of Luxembourg; this software only retrieves and
cites it.
