Canlii Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Canlii Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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-mcpapi.canlii.orgPrerequisites: Node.js 18+ and a CanLII API key (free for research use).
Claude Desktop — add to your config (~/Library/Application Support/Claude/claude_desktop_config.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-mcpFrom source (for development):
git clone https://github.com/mohammadfarooqi/canlii-mcp.git
cd canlii-mcp
npm install && npm run buildFull-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 })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).
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 })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" })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" })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" })List all legislation databases. Ontario: ons (Statutes), onr (Regulations). Federal: cas (Statutes), car (Regulations).
List legislation items within a specific database.
browse_legislation({ databaseId: "ons" })Get metadata for a specific statute or regulation, including its CanLII URL.
search({ query: "gatekeeping parenting time" }) to find relevant casesget_case_metadata(...) to get the full citation and CanLII URLget_case_citator(..., metadataType: "citingCases") to verify the case is still good lawPer CanLII's API terms:
The server enforces these limits automatically with a built-in rate limiter.
npm run build # Compile TypeScript
npm run start # Run the server (needs CANLII_API_KEY env var)src/
index.ts # MCP server — tools, rate limiter, stdio transport
schema.ts # Zod schemas for CanLII API responsesContributions are welcome! This project aims to make Canadian legal research more accessible through AI tooling.
Ways to contribute:
To submit a PR:
git checkout -b feature/my-improvement)npm run build && CANLII_API_KEY=your_key npm run start)If you find issues with the CanLII API responses, schema mismatches, or have ideas for new tools that would help legal researchers, please open an issue — even if you're not sure how to fix it. We'll investigate together.
This server is designed to be transparent and minimal:
child_process, exec, or spawn@modelcontextprotocol/sdk (official Anthropic MCP SDK) and zod (schema validation)If you discover a security issue, please see SECURITY.md.
get_case_metadata separately for each case to get keywords, topics, decision date, and the CanLII URL.get_case_citator (full version) for comprehensive citation analysis.MIT — see LICENSE.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.