Hidden while we check this listing

Our automated checks found a problem, so this listing is out of search, browse and the API until it clears. It comes back on its own once the problem is fixed.

  • Fork with no traction of its own
Own this project? Claim it
Canlii logo

Canlii

Searches Canadian case law, browses legislation, and checks citations through the CanLII API.

Install Canlii

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "canlii": {
      "command": "npx",
      "args": [
        "-y",
        "canlii-mcp"
      ],
      "env": {
        "CANLII_API_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The canlii MCP server connects AI clients to the CanLII API for Canadian legal research. It provides tools for keyword search, court and legislation browsing, case metadata, and citation lookups in English and French. Use it when an agent needs to find relevant authorities or citation relationships, then open CanLII URLs to read decisions. It runs locally over stdio and requires Node.js 18 or later plus a CanLII API key.

Use cases

  • Search Canadian case law by legal concept or keyword
  • Browse decisions from a court or tribunal
  • Retrieve case citations and CanLII source URLs
  • Check which later cases cite an authority
  • Browse Canadian statutes and regulations

Key features

  • Full-text keyword search across CanLII
  • Court and tribunal database discovery
  • Case metadata and CanLII URLs
  • Full and preview citation lookups
  • Legislation and regulation browsing
  • Built-in rate limiting and input validation

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · canlii-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars6Stargazers on the source repository.
npm downloads164Package downloads in the last 30 days.
Last commit6mo agoMost recent push to the default branch.

How Canlii works

What the canlii MCP server does

The canlii MCP server exposes Canadian legal research functions through the Model Context Protocol. It connects to CanLII’s API and supports full-text keyword searches across cases, legislation, and commentary, although returned search results contain citations and titles rather than complete decisions.

The server also supports court and tribunal discovery, case metadata retrieval, legislation database browsing, legislation metadata, and citation lookups. English and French are supported across the tools, including citation queries. Case metadata can include a citation, decision date, docket number, keywords, and a CanLII URL for opening the source.

How it works

An MCP-compatible client starts the server as a local stdio process. The server sends validated requests to api.canlii.org, validates responses, and returns structured results to the client. It does not provide the body of a decision through the API, so reading the full judgment requires following the returned CanLII URL.

A typical research sequence is to search by legal term or concept, inspect a result’s case metadata, then query its citing cases. Court and legislation database tools provide the identifiers needed by later requests. Search does not offer a server-side jurisdiction or database filter; include jurisdiction terms in the query when narrowing results.

Setup and configuration

Node.js 18 or newer and a CanLII API key are required. The key is supplied through the CANLII_API_KEY environment variable and is not included in responses. For Claude Desktop, configure an MCP entry that runs npx -y canlii-mcp and passes the environment variable. Claude Code can add the same command with its MCP configuration command.

For development, clone the repository, run npm install, build with npm run build, and start the process with npm run start while the API key is available.

Tools and capabilities

The canlii MCP server includes nine tools:

  • Search CanLII by keyword, case name, or legal concept.
  • List available courts and tribunals.
  • Browse decisions from a selected court database with date filters.
  • Retrieve metadata for a specific case.
  • Retrieve full citation relationships or a preview capped at five results.
  • List legislation databases.
  • Browse statutes and regulations in a selected database.
  • Retrieve statute or regulation metadata.

A serialized request queue enforces CanLII’s stated limits of two requests per second, one concurrent request, and 5,000 queries per day. Inputs are regex-validated and URI-encoded before requests are made.

Limitations and notes

The canlii MCP server does not identify whether a cited decision was followed, distinguished, or overturned. Researchers must read the citing cases to assess treatment. Keyword search is not semantic and may return mixed results, so queries may need refinement.

The search endpoint is described as undocumented by the project and could change. Full decision text, paragraph verification, and direct quotations are unavailable through the API. The server only makes HTTPS requests to CanLII, has no file-system access or shell execution, and is licensed under MIT.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Canlii

canlii is an MCP server that connects AI clients to the CanLII API for Canadian legal research. Its main tools search cases and legislation, browse courts and statutes, retrieve case metadata, and inspect citation relationships. It returns source URLs for reading full decisions on CanLII.

Install it by running `npx canlii-mcp` or configuring your MCP client to run `npx -y canlii-mcp`. You need Node.js 18 or newer and must provide a CanLII API key through `CANLII_API_KEY`.

Yes, canlii works with Claude Desktop through a local stdio configuration. Add an MCP server entry that runs `npx -y canlii-mcp`, set `CANLII_API_KEY` in its environment, and restart Claude Desktop.

No, the CanLII API used by canlii does not return decision body text. The server provides metadata and a CanLII URL; open that URL to read the full decision and verify quotations or paragraph numbers.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCanlii AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/canlii?style=directory)](https://allmcps.com/mcp/canlii)
HTML Embed
<a href="https://allmcps.com/mcp/canlii"><img src="https://allmcps.com/api/badge/canlii?style=directory" alt="Canlii on AllMCPs" /></a>