MCP.Market

Canlii MCP server

by mohammadfarooqi·io.github.mohammadfarooqi/canlii·v1.1.4·5 stars

Search Canadian case law, browse legislation, and check citations via the CanLII API.

B72/100grade B
What users say
No reviews yet
Be the first
Safety scan
B72/100

full report

Adoption
Growing

5 stars59 downloads/wk

Reviews

Write one

Nobody has reviewed Canlii yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

Canlii tools (9)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • browse_legislation

    List all legislation items in a specific database. Use to find legislation IDs for metadata lookup.

  • get_case_citator

    Look up citation relationships for a case. Critical for verifying if a case is still good law.

  • get_case_citator_tease

    Quick preview of citation relationships (max 5 results). Faster than the full citator.

  • get_case_law_decisions

    List case law decisions from a specific court database. Use date filters to narrow results.

  • get_case_metadata

    Get detailed metadata for a specific case including its CanLII URL, citation, decision date, docket number, keywords, and topics.

  • get_courts_and_tribunals

    List all available court and tribunal databases in Canada. Returns database IDs needed for other tools.

  • get_legislation_databases

    List all available legislation databases in Canada. Returns database IDs for browsing statutes and regulations.

  • get_legislation_regulation_metadata

    Get metadata for a specific statute or regulation including its CanLII URL, citation, and table of contents.

  • search

    Search CanLII for cases, legislation, and commentary by keyword. This is the primary entry point for legal research.

Public scan report

scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it

no findings
  • Code scan4 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitystatic API keys via environment variables6/15
  • Maintenancelast push 171 days ago8/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 72/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How Canlii compares

Against every graded Web search MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
72/100
higher than 40% of 3,470 Web search servers
Tools
9
the typical Web search server has 5
Tools that change things
0%
typical: 0%. Fewer write tools means less an agent can break
GitHub stars
5
more than 80% of 1,786 Web search servers
Downloads a week
59
more than 41% of 827 Web search servers with a package

What its tools let an agent do: 9 read

Install Canlii in Claude Code, Cursor or VS Code

Runs npx -y canlii-mcp on your machine. Read the scan report first; the gateway never runs local packages.

claude mcp add canlii -- npx -y canlii-mcp
Add to Cursor

What the publisher says

From the Canlii repository's README, as published. We do not edit it. Read it on GitHub

CanLII MCP Server

A Model Context Protocol (MCP) server for searching Canadian legal information via the CanLII API. Search cases, browse legislation, and check citations — all from Claude Desktop or Claude Code.

npx canlii-mcp

Features

  • Full-text search — search across all of CanLII by keyword, case name, or legal concept
  • Case citator — check if a case is still good law by finding what later cases cite it
  • Legislation browsing — browse statutes and regulations by jurisdiction
  • Bilingual — English and French support across all tools including the citator
  • 9 tools — search, browse courts, browse cases, case metadata, full citator, citator preview, legislation databases, browse legislation, legislation metadata
  • Built-in rate limiting — serialized request queue respects CanLII's API limits (2 req/sec, 1 concurrent, 5,000/day)
  • Input validation — all parameters regex-validated and URI-encoded to prevent injection
  • Minimal footprint — 2 runtime dependencies, ~500 lines of code, runs locally as a stdio process
  • Security-first — no file system access, no shell execution, only connects to api.canlii.org

Quick Start

Prerequisites: Node.js 18+ and a CanLII API key (free for research use).

Claude Desktop — add to your config (~/Library/Application Support/Claude/claudedesktopconfig.json on macOS):

{
  "mcpServers": {
    "canlii": {
      "command": "npx",
      "args": ["-y", "canlii-mcp"],
      "env": {
        "CANLII_API_KEY": "your_api_key_here"
      }
    }
  }
}

Restart Claude Desktop after saving.

Claude Code:

claude mcp add canlii -e CANLII_API_KEY=your_key -- npx -y canlii-mcp

From source (for development):

git clone https://github.com/mohammadfarooqi/canlii-mcp.git
cd canlii-mcp
npm install && npm run build

Available Tools (9)

search

Full-text keyword search across all of CanLII — cases, legislation, and commentary. This is the primary entry point for legal research.

search({ query: "material change in circumstances Ontario", resultCount: 10 })

getcourtsand_tribunals

List all available court and tribunal databases. Returns database IDs needed by other tools.

Key Ontario databases: onsc (Superior Court), onca (Court of Appeal), oncj (Court of Justice), csc-scc (Supreme Court of Canada).

getcaselaw_decisions

Browse case law decisions from a specific court database, ordered by most recently added. Supports date filters.

get_case_law_decisions({ databaseId: "onsc", resultCount: 20 })

getcasemetadata

Get full details for a specific case — citation, decision date, docket number, keywords, and CanLII URL for reading the full decision.

get_case_metadata({ databaseId: "onsc", caseId: "2021onsc8582" })

getcasecitator

Look up citation relationships for a case. Use citingCases to check if a case is still good law.

get_case_citator({ databaseId: "csc-scc", caseId: "1996canlii190", metadataType: "citingCases" })

getcasecitator_tease

Quick citation preview returning max 5 results. Faster than the full citator for a quick check.

get_case_citator_tease({ databaseId: "csc-scc", caseId: "1996canlii190", metadataType: "citingCases" })

getlegislationdatabases

List all legislation databases. Ontario: ons (Statutes), onr (Regulations). Federal: cas (Statutes), car (Regulations).

browse_legislation

List legislation items within a specific database.

browse_legislation({ databaseId: "ons" })

getlegislationregulation_metadata

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

Canlii: common questions

Is Canlii MCP server safe?
Mostly: it is graded B (72/100). Read the Canlii safety report
How do I install Canlii?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does Canlii need an API key?
Yes. The registry entry asks for CANLII_API_KEY.
Is Canlii maintained?
The last commit was 209 days ago (2026-04-09). The latest release is v1.1.4.
What can I use instead of Canlii?
Servers from other publishers that do the same job: Legal Data Hunter MCP server, Eur Lex MCP server and Arxiv MCP server.
How does Canlii compare with other Web search MCP servers?
safety score 72/100 (higher than 40% of 3,470 Web search servers); tools 9 (the typical Web search server has 5); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.

Alternatives to Canlii

Same job from other publishers: the closest match first, then the best rated.

  • Legal Data Hunter
    Search 18M+ legal documents worldwide — case law, legislation, and doctrine across 110+ countries.
    A
  • Eur Lex
    Search EU legislation, CJEU case law, and treaties; traverse CELLAR graph; browse EuroVoc concepts.
    A
  • Arxiv
    Search arXiv papers, download full text, semantic search, citation graphs, and alerts via MCP.
    A
  • Claude Code Explorer MCP
    Explore the Claude Code CLI source — browse tools, commands, search code, and more.
    A
  • obsei
    Self-hosted customer feedback with PII stripped at ingest: search, stats and themes with citations.
    A