Metadata-Version: 2.4
Name: il-eli-mcp
Version: 0.4.2
Summary: MCP server for Israeli legislation (Knesset OData) with verifiable citations.
Project-URL: Repository, https://github.com/matematicsolutions/il-eli-mcp
Project-URL: Issues, https://github.com/matematicsolutions/il-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: israel,knesset,law,legaltech,mcp,odata
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<4,>=3.4
Requires-Dist: httpx<1,>=0.27
Requires-Dist: huggingface-hub>=0.24
Requires-Dist: pandas>=2.0
Requires-Dist: pyarrow>=15.0
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

# il-eli-mcp

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

MCP server for Israeli law via the Knesset's official OData API plus a
local case-law corpus. Covers the legislation registry (`KNS_IsraelLaw`:
in-force/repealed status, Basic Law flag), published law versions with
their official PDF documents (`KNS_Law` + `KNS_DocumentLaw`, including
consolidated texts), and 10,558 Hebrew court judgments.

## What this is not

- **Law texts are PDF links, not inline text** - `il_get_law_documents`
  returns official fs.knesset.gov.il PDF URLs; fetching and reading the
  PDF is the client's job.
- **Two disjoint legislation id spaces** - `israel_law_id` (registry) and
  `law_id` (published versions). The Knesset exposes no reliable general
  join between them; search both by name (see [DISCOVERY.md](DISCOVERY.md)).
- **Hebrew only** - law names, queries and judgments are in Hebrew.
- **No Supreme Court case law** - the local corpus covers Family, District,
  Magistrate, Labor, Military and Administrative courts only, and its
  upstream license is undocumented (analysis use, not redistribution).

## Tools

| Tool | Purpose |
|---|---|
| `il_search_laws` | Full-text search over law names (registry: status, Basic Law flag) |
| `il_get_law` | Full detail for one law by its `IsraelLawID` |
| `il_search_law_texts` | Search published law versions (KNS_Law), incl. consolidated texts |
| `il_get_law_documents` | Official PDF documents for a published law (fs.knesset.gov.il) |
| `il_search_case_law` | Keyword search over the local corpus of 10,558 judgments |
| `il_get_case` | One judgment's full text by `judgment_id` |

Every response carries `lex_uri`, `source_url` and `human_readable_citation`
(the Hebrew name) - Israel has no separate public citation identifier
scheme for this data, so the URLs are dereferenceable Knesset OData entity
URLs, never invented.

## Install

```bash
pip install il-eli-mcp
```


### Windows 11 with Smart App Control

Smart App Control blocks unsigned executables, which covers `uvx.exe`, `pip.exe`
and the `il-eli-mcp.exe` launcher that pip writes at install time. The `python.exe` and
`py.exe` from the python.org installer are signed by the Python Software
Foundation, so running the module through the interpreter works:

```bash
python -m pip install il-eli-mcp
python -m il_eli_mcp
```

`pip.exe` is blocked for the same reason, so install with `python -m pip`, not
`pip install`. If `python` is not on PATH, use the Windows launcher: `py -3 -m il_eli_mcp`.

```json
{ "mcpServers": { "il-eli-mcp": { "command": "python", "args": ["-m", "il_eli_mcp"] } } }
```

Do not turn Smart App Control off to work around this - it cannot be re-enabled
without reinstalling Windows.

## Configuration

| Env var | Default |
|---|---|
| `IL_ELI_CACHE_DIR` | `~/.matematic/cache/il-eli` |
| `IL_ELI_AUDIT_DIR` | `~/.matematic/audit` |
| `IL_ELI_BASE_URL` | `https://knesset.gov.il/Odata/ParliamentInfo.svc` |

## License

Apache-2.0 (code). Knesset OData content is official parliamentary
publication material (see [SOURCES.md](SOURCES.md)).
