Skip to main content

Documentation Index

Fetch the complete documentation index at: https://vaquill.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

The CanLII MCP server gives AI assistants access to the CanLII Canadian legal information API - case law and legislation metadata across all federal, provincial, and territorial jurisdictions, in English and French. Vaquill hosts a public instance with bring-your-own-key (BYOK) auth, so your CanLII token is forwarded on every request and never stored. US-focused teams use this when they need a Canadian comparator for cross-border matters.

GitHub

Source code, Docker, Workers entry

CanLII API

Upstream API docs

Hosted endpoint

canlii-mcp.vaquill.ai
Forked from tomilashy/canlii-mcp. The Vaquill fork adds BYOK auth, a /health route, and a hosted endpoint. Tools are unchanged.
The CanLII API returns metadata only - titles, citations, dates, keywords, and citation relationships. Full document text is not available through the API. For full opinions, link out to the canonical CanLII page.

Quickstart

1

Apply for a CanLII API key

Submit the form at canlii.org/en/feedback. Approval typically takes a few business days.
2

Get an MCP gate token

The hosted endpoint is gated by a bearer token to keep load predictable. Email contact@vaquill.ai to request access, or self-host (see below) if you would rather skip the gate.
3

Point your client at the hosted endpoint

URL: https://canlii-mcp.vaquill.ai/mcpHeaders:
  • Authorization: Bearer <MCP_AUTH_TOKEN>
  • X-CanLII-Token: <your-canlii-key>
4

Ask your assistant

Try: “List all federal courts in Canada, then find Supreme Court of Canada decisions on Charter section 7 from 2023.”

Client setup

{
  "mcpServers": {
    "canlii": {
      "url": "https://canlii-mcp.vaquill.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_MCP_TOKEN",
        "X-CanLII-Token": "YOUR_CANLII_API_KEY"
      }
    }
  }
}
Any client that supports MCP streamable HTTP with custom headers works. For stdio-only clients use mcp-remote to proxy the hosted endpoint, or run locally via npx.

Tools

Seven tools across case law and legislation:

Case law

ToolDescription
list_case_databasesList all courts and tribunals in the CanLII collection (federal, provincial, territorial)
list_casesBrowse decisions from a specific court or tribunal database
get_caseMetadata for a single case - title, citation, date, language, keywords
get_case_citationsCitation graph - cases cited by, cases citing it, and legislation referenced

Legislation

ToolDescription
list_legislation_databasesList all statute and regulation databases
list_legislationBrowse statutes or regulations from a specific database
get_legislationMetadata for a single piece of legislation

Authentication

ModeHeader / envWhen
BYOK (preferred)X-CanLII-Token: <key>Hosted or shared deployments
Server fallbackCANLII_API env varSelf-hosted single-tenant. Required for stdio.
MCP gateAuthorization: Bearer <MCP_AUTH_TOKEN>Restricts who may use the hosted endpoint
The hosted endpoint requires both the bearer gate token and your CanLII key. Calls hit your own CanLII quota, not Vaquill’s.

Self-hosting

Requires Node.js 22+.

stdio (from source)

git clone https://github.com/Vaquill-AI/canlii-mcp.git
cd canlii-mcp
npm install
npm run build
CANLII_API=your_api_key node dist/index.js

HTTP server

PORT=3000 CANLII_API=your_api_key node dist/index.js --transport http
# MCP endpoint at http://localhost:3000/mcp
The server runs stateless - each request is self-contained, no session ID or initialize handshake required. Test directly with curl:
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_case_databases","arguments":{"language":"en"}}}'

Docker

docker run \
  -e CANLII_API=your_api_key \
  -e MCP_AUTH_TOKEN=your_secret \
  -p 3000:3000 \
  ghcr.io/tomilashy/canlii-mcp
Or with Docker Compose:
services:
  canlii-mcp:
    image: ghcr.io/tomilashy/canlii-mcp
    environment:
      CANLII_API: your_api_key
      MCP_AUTH_TOKEN: your_secret  # optional
    ports:
      - "3000:3000"

Cloudflare Workers

The repo ships a Workers-compatible entry point (src/worker.ts).
npx wrangler secret put CANLII_API
npx wrangler secret put MCP_AUTH_TOKEN   # optional
npx wrangler deploy
For dashboard / Git-connected deploys, see the README.

Environment variables

VariableRequiredDefaultDescription
CANLII_APIYes (server-side)-Your CanLII API key. Not needed when callers send X-CanLII-Token.
PORTNo3000HTTP server port (HTTP mode only)
MCP_AUTH_TOKENNo-Bearer token for HTTP authentication. If set, all HTTP requests must include Authorization: Bearer <token>. If unset, the server runs without auth.

Rate limits

The server enforces CanLII’s published limits automatically:
  • 1 concurrent request
  • 2 requests per second
  • 5,000 requests per day (hard cap)
Requests beyond the daily cap return an error instead of hitting the upstream API.

Usage examples

Type these to any connected AI assistant:
“List all federal courts and tribunals in Canada.” “Find Supreme Court of Canada decisions on Charter section 7 from 2023.” “Get the citation network for R v Jordan 2016 SCC 27 - which cases cite it and what legislation does it reference?”
For US versus Canada comparison work:
“For each Charter section 8 case in the last five years, find the closest US Fourth Amendment analogue using the CourtListener MCP.”
“Pull the metadata for the federal Criminal Code, then list the most recent amendments.”

MCP overview

All Vaquill MCP servers at a glance

Vaquill MCP

Cross-jurisdiction wrapper over the Vaquill API

CourtListener MCP

US federal and state case law and eCFR

Integrations

Chatbots, widgets, browser extensions, automation

Authentication

How Vaquill handles auth across products