Metadata-Version: 2.4
Name: ca-eli-mcp
Version: 0.1.0
Summary: MCP server for Canadian federal legislation (Justice Laws Website) with verifiable citations.
Project-URL: Repository, https://github.com/matematicsolutions/ca-eli-mcp
Project-URL: Issues, https://github.com/matematicsolutions/ca-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: canada,justice-laws,law,legaltech,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
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

# ca-eli-mcp

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

MCP server for Canadian federal legislation via the Justice Laws Website
(laws-lois.justice.gc.ca), the Department of Justice Canada's official
source for consolidated Acts and regulations. Bilingual (English/French).

## What this is not

- **No free-text search** - the Justice Laws Website has no search API of
  its own. This connector is by-code only (the same limitation as
  `ie-eli-mcp` for Ireland): you need to already know the code (e.g.
  `"C-46"` for the Criminal Code) or a short title to look one up.
- **Federal only** - provincial and territorial legislation is out of scope.
- **No case law** - CanLII's terms of service forbid bulk redistribution and
  its content API requires a per-identity key, which breaks the
  zero-cloud pattern this connector otherwise follows. Not attempted here.

## Tools

| Tool | Purpose |
|---|---|
| `ca_get_document` | Metadata (title, in-force status, last-consolidated date) for one act or regulation |
| `ca_get_text` | Full consolidated XML text of the same document |

Every response carries `lex_uri` (the XML source), `source_url` (the public
HTML page), and `human_readable_citation` (e.g. `"Criminal Code (C-46)"`).

## Install

```bash
pip install ca-eli-mcp
```

## Configuration

| Env var | Default |
|---|---|
| `CA_ELI_CACHE_DIR` | `~/.matematic/cache/ca-eli` |
| `CA_ELI_AUDIT_DIR` | `~/.matematic/audit` |
| `CA_ELI_BASE_URL` | `https://laws-lois.justice.gc.ca` |

## License

Apache-2.0 (code). Justice Laws Website content is Government of Canada
material (see [SOURCES.md](SOURCES.md)).
