Skip to main content

CanLII MCP Server: Canadian Legal Research

A CanLII MCP server is a Model Context Protocol bridge that lets an AI assistant like Claude, Cursor, or VS Code query the CanLII API for Canadian court decisions, legislation, and citation relationships. You bring a CanLII API key, connect the server, and your assistant can list courts, pull case metadata, and look up what a case cites and what cites it from inside the editor.

This guide covers what the CanLII API actually returns (metadata, not full judgment text), how to install and configure a CanLII MCP in four editors, a real query-to-result example, the access and rate-limit caveats, and how the hosted Vaquill AI server compares to the DIY options.

Reviewed and corrected on 12 October 2026. This is general information, not legal advice. We tested the hosted server's tool list on that date. We did not run any call that needs a CanLII key.

TL;DR

  • A CanLII MCP gives an AI assistant structured access to metadata for Canadian court and tribunal decisions, plus federal and provincial legislation, through the CanLII API.
  • The catch most reviews skip: the CanLII API returns metadata and citation relationships, not full-text judgments. The value is finding related decisions and mapping jurisdictions, not reading the reasoning.
  • A 5,000-requests-per-day cap per key is the binding constraint for any automated workflow, according to the MCP server's README and a third-party client's README. CanLII's own API documentation does not state it. Plan citation walks accordingly.
  • Two real choices exist: a hosted bring-your-own-key server (no install) or a self-hosted stdio server you run yourself. Both hit the same CanLII quota.
  • If you need full judgment text inside the assistant, no CanLII-API wrapper can give it to you. Pair the MCP with pasted excerpts or a different full-text source.
Quick check

What is the hard daily request cap on the CanLII API, the binding constraint for automated workflows?

Part of our MCP and developer guide series.

For related MCP / API / developer coverage, see CourtListener MCP: US Federal & State Court Research and Composing Three Legal MCPs (CourtListener, CanLII, Vaquill AI) Into One Workflow.

After shipping a CourtListener MCP server for US law (see /blog/courtlistener-mcp-server-us-legal-research), we added a second jurisdiction: Canada via CanLII.

CanLII (Canadian Legal Information Institute, at canlii.org) is Canada's primary free legal research platform. It provides access to decisions from all federal and provincial courts, plus statutes and regulations from every Canadian jurisdiction.

The CanLII API (canlii.org/en/api) exposes this data programmatically.

The MCP server is a thin streamable-HTTP wrapper that you connect to with your own CanLII API key.

Hosted endpoint: https://canlii-mcp.vaquill.ai/mcp

Authentication: one header. X-CanLII-Token: <your CanLII API key> is forwarded to canlii.org so calls hit your CanLII quota, not ours. The hosted endpoint is public and needs no Vaquill token: on 12 October 2026 a request with only that header (and a deliberately invalid key) got through to the tool list, and a request with no key got a 401 asking for one. Clients that cannot set headers can append ?token=<your key> to the URL, which puts the key in the URL and any logs that record it.

The server's README says it never stores your key.

Understanding the Canadian Court System

Before diving into the tools, it helps to understand how Canadian courts are structured - since this directly maps to the databases you'll query through the MCP server.

Canada has a bijural legal system: common law applies in nine provinces and the three territories, while Quebec follows civil law (derived from the French tradition) for private matters.

All jurisdictions share the same criminal law under the federal Criminal Code.

The court hierarchy, from highest to lowest:

  1. Supreme Court of Canada (SCC) - the final court of appeal for all legal matters in Canada. Hears appeals mostly on leave (permission to appeal). Its decisions are binding on all courts below.
  2. Federal Court of Appeal & Provincial/Territorial Courts of Appeal - intermediate appellate courts. The Federal Court of Appeal handles appeals from the Federal Court and certain federal tribunals. Each province has its own Court of Appeal.
  3. Federal Court & Provincial/Territorial Superior Courts - trial-level courts of general jurisdiction. The Federal Court handles immigration, intellectual property, maritime law, and disputes involving the federal government. Provincial superior courts (called the Court of Queen's/King's Bench in some provinces, Superior Court in Quebec and Ontario) handle serious criminal cases, civil disputes above a threshold, and family law.
  4. Provincial Courts - handle the majority of criminal cases, family law, youth justice, traffic, and small claims. Not all provincial court decisions appear on CanLII.
  5. Federal and Provincial Tribunals - specialized bodies like the Immigration and Refugee Board, Canadian Human Rights Tribunal, labour relations boards, and securities commissions. CanLII covers many of these.

This hierarchy matters because when you use list_case_databases, you'll see entries for each of these courts, and you need to know which database ID corresponds to which level of authority.

What Is CanLII?

CanLII describes itself as a non-profit organization founded in 2001 by the Federation of Law Societies of Canada on behalf of its 14 member law societies, financed by the lawyers and notaries who belong to those societies (CanLII, What is CanLII).

Its mandate is open online access to judicial decisions and legislative documents from all Canadian jurisdictions. On coverage, CanLII says that for most courts and tribunals its collection is generally complete for cases decided after 2001. Earlier coverage varies by court and tribunal. Check CanLII's database list for the court you need, because we did not review per-court start dates.

CanLII provides free access to:

  • Court decisions from federal and provincial courts and many tribunals
  • Legislation: federal statutes and regulations, plus provincial and territorial statutes and regulations
  • English and French content, with the language available depending on the source document

Why Bilingual Matters

Section 133 of the Constitution Act, 1867 requires Acts of the federal Parliament to be printed and published in both English and French. Decisions in other courts appear in whichever language the court used.

For lawyers practicing in bilingual jurisdictions or dealing with federal matters, the ability to research in both languages matters. The MCP server's tools take a language parameter (en or fr). The get_case_citations tool says the CanLII API supports only English for citator data, so French requests fall back to English.

Canadian Citation Format

Canadian law uses a neutral citation system, which Canadian courts adopted around the turn of the millennium (we did not verify the exact year). Unlike the US system (where citations reference print reporters like "410 U.S. 113"), Canadian neutral citations are court-assigned and don't depend on any publisher:

  • 2016 SCC 27 = Supreme Court of Canada, 27th decision of 2016 (this is R v Jordan)
  • 2024 FCA 101 = Federal Court of Appeal, 101st decision of 2024
  • 2023 ONCA 456 = Ontario Court of Appeal, 456th decision of 2023
  • 2022 QCCS 789 = Quebec Superior Court, 789th decision of 2022

Older decisions still use traditional reporter citations: SCR (Supreme Court Reports), DLR (Dominion Law Reports), OR (Ontario Reports), etc. CanLII supports both formats.

The get_case tool returns a citation string for any decision. CanLII's own documentation shows it in the form [2008] 1 SCR 190, 2008 SCC 9 (CanLII). The get_case_citations tool looks up what a case cites and what cites it.

The CanLII API provides metadata access (case titles, citations, dates, keywords, citation relationships). Note that full-text document content is not available through the API, only metadata.

7 Tools Available

The CanLII MCP server exposes 7 tools:

Case Law Tools

ToolWhat It Does
list_case_databasesList all courts and tribunals in the CanLII system. Returns database IDs you'll need for other tools.
list_casesBrowse decisions from a specific court. Filter and paginate through a court's entire decision catalog.
get_caseGet case metadata - title, citation, date, docket number, keywords, and database info.
get_case_citationsGet citation information for a case. You choose one citationType per call: citedCases (cases this decision cites), citingCases (cases that cite it), or citedLegislations (legislation it references).

Legislation Tools

ToolWhat It Does
list_legislation_databasesList all statute and regulation databases - federal, provincial, and territorial.
list_legislationBrowse statutes and regulations from a specific database.
get_legislationGet legislation metadata, including title, citation, dates and repeal status.

Getting a CanLII API Key

Every CanLII MCP needs a CanLII API key. CanLII's API documentation says to apply by sending your contact information through its feedback form, and a university library guide advises explaining the scope of your project. We found no self-serve signup. We did not verify how CanLII decides requests or how long it takes, so apply before you plan to build.

A few terms worth reading before you commit a workflow to it:

  • Metadata access only. CanLII's API documentation describes the API as providing metadata about the collection, which is why no wrapper around it can hand you full judgment text. We did not review CanLII's API terms in October 2026, so read them before you store or redistribute anything CanLII returns.
  • The key is yours, the quota is yours. Whether you self-host or use a hosted server, calls count against the key you applied for.

Rate limits per key:

  • 1 request at a time
  • 2 requests per second
  • 5,000 requests per day

These figures come from the MCP server's README, which says they mirror CanLII's own per-key limits, and from a third-party CanLII client's README. CanLII's published API documentation (its GitHub EN.md) does not list them, so treat them as reported rather than confirmed by CanLII. The server enforces them per key, so one caller's usage does not throttle another's.

CanLII MCP Options Compared

Search "canlii mcp" and you will find several servers. They split into three shapes. Pick by whether you want to run anything yourself and whether you need full text.

OptionInstallTransportFull text?Notes
Hosted BYOK server (Vaquill AI)None, point at a URLStreamable HTTPNo (CanLII API limit)You bring a CanLII key via header or URL parameter; 7 tools (we confirmed the tool list on 12 October 2026), citation lookups
Self-hosted stdio server (open source)npm or Dockerstdio or HTTPNo (CanLII API limit)Several exist on GitHub and npm; you run and update it. We did not survey them in October 2026
A2AJ MCPNone, custom connectorStreamable HTTPYesNot a CanLII wrapper. Serves the A2AJ Canadian legal dataset and returns full case and legislation text; A2AJ says it is designed for small numbers of documents, not bulk (A2AJ, read 12 October 2026)

The honest read: if your assistant needs to read the actual reasoning, a CanLII-API server (hosted or self-hosted) cannot do it, and A2AJ's full-text MCP fits that one job. If you want CanLII's citation lookups and jurisdiction coverage across Canadian courts and tribunals, a CanLII MCP does that, and the question is whether you want to run it yourself.

Setup

Claude Desktop

This is a remote server, so you add it as a connector through your Claude account. Claude's support page says remote connectors are configured and brokered through your account, and that local servers in claude_desktop_config.json are a separate mechanism. In Settings > Connectors, choose Add custom connector, then:

  • URL: https://canlii-mcp.vaquill.ai/mcp?token=YOUR_CANLII_API_KEY
  • Authentication: no sign in

The server's README recommends the ?token= URL form for the Claude connector dialog. Claude's request headers field is the alternative, but Anthropic's documentation says it is in beta for a limited set of organizations and that header names are restricted to an allowlist (it names authorization, x-api-key and x-auth-token), so a custom name such as X-CanLII-Token may be refused. We did not test the dialog. The URL form puts your key in the URL, so treat that connector URL as a secret.

The key is your own CanLII key, forwarded to canlii.org so calls draw down your quota, not ours.

Claude Code

claude mcp add --transport http --scope user canlii \
  https://canlii-mcp.vaquill.ai/mcp \
  --header "X-CanLII-Token: YOUR_CANLII_API_KEY"

This follows the pattern in Claude Code's own documentation, with the header after the name and URL.

Cursor

Cursor reads servers from ~/.cursor/mcp.json (global) or .cursor/mcp.json in the project. Its documentation shows a remote entry as a url plus headers (Cursor Docs):

{
  "mcpServers": {
    "canlii": {
      "url": "https://canlii-mcp.vaquill.ai/mcp",
      "headers": {
        "X-CanLII-Token": "YOUR_CANLII_API_KEY"
      }
    }
  }
}

Then enable the server in Cursor's MCP settings.

VS Code (Copilot)

Add to .vscode/mcp.json (VS Code docs):

{
  "servers": {
    "canlii": {
      "type": "http",
      "url": "https://canlii-mcp.vaquill.ai/mcp",
      "headers": {
        "X-CanLII-Token": "YOUR_CANLII_API_KEY"
      }
    }
  }
}

For every workspace instead of one, run the MCP: Open User Configuration command from the Command Palette and use the same servers block.

Windsurf

Windsurf's documentation (read on 12 October 2026) gives the file as ~/.codeium/windsurf/mcp_config.json and shows remote servers with a serverUrl and headers. That page says it covers the legacy Cascade agent and that other agents configure MCP elsewhere, so confirm the location in the app's MCP settings:

{
  "mcpServers": {
    "canlii": {
      "serverUrl": "https://canlii-mcp.vaquill.ai/mcp",
      "headers": {
        "X-CanLII-Token": "YOUR_CANLII_API_KEY"
      }
    }
  }
}

Example Prompts

Once connected, try these in your AI editor:

  • "List all courts in the CanLII system"
  • "Find recent Supreme Court of Canada decisions"
  • "Get the case details for R v Jordan 2016 SCC 27"
  • "Show me the cases that cite this decision"
  • "List federal statutes in the CanLII database"
  • "Browse Ontario provincial legislation on employment standards"

Your AI assistant will call the CanLII tools and return structured metadata.

What a case lookup returns

Ask the assistant: "Get the case details for R v Jordan 2016 SCC 27." It calls get_case with the Supreme Court database ID (csc-scc) and the case ID (2016scc27). We did not run that call, because it needs a CanLII key. CanLII's own documentation shows what the underlying case-metadata call returns, using Dunsmuir v. New Brunswick as the example (copied from CanLII's API documentation, read on 12 October 2026, with the keyword separators changed):

{
  "databaseId": "csc-scc",
  "caseId": "2008scc9",
  "url": "http://canlii.ca/t/1vxsm",
  "title": "Dunsmuir v. New Brunswick",
  "citation": "[2008] 1 SCR 190, 2008 SCC 9 (CanLII)",
  "language": "en",
  "docketNumber": "31459",
  "decisionDate": "2008-03-07",
  "keywords": "adjudicator; review; reasonableness; administrative; procedural fairness",
  "concatenatedId": "2008csc-scc9"
}

Notice the url field. That is your bridge to the full text, since the API itself stops at metadata. The docket, date and keyword tags are enough for the assistant to confirm you have the right case before it spends another request.

Citation lookups

The get_case_citations tool takes a citationType and returns one list per call:

  1. citedCases - decisions this case cites in its reasoning
  2. citingCases - subsequent decisions that cite this case
  3. citedLegislations - statutes and regulations referenced in the decision

That gives your AI assistant case-to-case relationships to work with. Ask it to trace which decisions cite a case, and it can follow those links rather than guessing. The lists name the cases and give their citations. They do not say how a later court treated the earlier one.

The value of this tool is finding related decisions and mapping jurisdictions. It does not read the reasoning.

Practical Citation Graph Workflows

Finding later decisions that cite a case. Ask your AI assistant: "Get the citing cases for R v Jordan 2016 SCC 27 and list the Supreme Court of Canada decisions among them." The tool returns the citing cases with their citations. Whether any of them narrowed or distinguished Jordan is a question you answer by reading those decisions on CanLII, because the metadata does not say how a case was treated. This is not a good-law check.

Tracing a legal doctrine's development. Start with a foundational case like R v Oakes [1986] 1 SCR 103 (which set out the Oakes test for justifying limits on Charter rights under Section 1). Pull its citing cases, then read the decisions that apply it, such as R v Bryan 2007 SCC 12, which upheld s. 329 of the Canada Elections Act under s. 1.

Finding the legislative basis for a decision. The citedLegislations list shows which statutes and sections a decision references. Pull the legislation citations from several cases to see which provisions keep coming up, then read the cases themselves for how they were interpreted.

Landmark Cases You Can Research

To give you a sense of what a lookup can find, here are some frequently researched Canadian decisions. We checked the citations below on 12 October 2026 against SCC and CanLII pages, Wikipedia, or the opinion text, but did not look each one up through the MCP server:

CaseCitationSignificance
R v Oakes[1986] 1 SCR 103Established the Oakes test for Section 1 Charter analysis - the framework for determining when a government can justifiably limit a Charter right
R v Jordan2016 SCC 27, [2016] 1 SCR 631Set presumptive ceilings for trial delay under the Section 11(b) Charter right to be tried within a reasonable time: 18 months for cases going to trial in provincial court, and 30 months for superior court (or provincial court after a preliminary inquiry)
Carter v Canada (Attorney General)2015 SCC 5, [2015] 1 SCR 331Held that the criminal prohibition on assisted suicide violates the Charter (Section 7), in the circumstances the Court described
Reference re Secession of Quebec[1998] 2 SCR 217The SCC's landmark advisory opinion on whether Quebec could unilaterally secede - held that unilateral secession would be unconstitutional, but that a clear majority on a clear question in favour of secession would trigger a duty on the other participants to negotiate
Donoghue v Stevenson[1932] AC 562While a UK House of Lords decision, it's foundational to Canadian tort law (the "neighbour principle") and heavily cited in Canadian jurisprudence
R v Grant2009 SCC 32Reformulated the test for excluding evidence obtained in breach of Charter rights under Section 24(2)
Hryniak v Mauldin2014 SCC 7Summary judgment motions must be granted whenever there is no genuine issue requiring a trial

Combine with a US Stack

The real value is running multiple MCP servers together for cross-jurisdiction research. Both of these are hosted, so this block goes in ~/.cursor/mcp.json (or the equivalent in VS Code or Windsurf), not in claude_desktop_config.json. In Claude Desktop, add each one as its own custom connector (see the Claude Desktop section above for how headers are handled there):

{
  "mcpServers": {
    "courtlistener": {
      "url": "https://courtlistener-mcp.vaquill.ai/mcp/",
      "headers": {
        "X-CourtListener-Token": "YOUR_COURTLISTENER_TOKEN"
      }
    },
    "canlii": {
      "url": "https://canlii-mcp.vaquill.ai/mcp",
      "headers": {
        "X-CanLII-Token": "YOUR_CANLII_API_KEY"
      }
    }
  }
}

CourtListener US federal and state court research interface

With this config, your AI assistant has access to:

  • US (open data): Federal and state court opinions and dockets via CourtListener
  • Canada: Federal and provincial decision and legislation metadata, and citation lookups, via CanLII

Ask a cross-jurisdictional question like "How do the US and Canada approach the doctrine of promissory estoppel?" and your assistant will pull from both databases.

Loading diagram...

What "Metadata Only" Means in Practice

This is the most important limitation to understand. The CanLII API returns structured metadata about cases and legislation, but not the full text of judgments or statutes. Here's what you can and can't do:

What you get from the API (and the MCP server):

  • Case title, citation, date, docket number
  • Court and database identification
  • Keywords and subject matter tags
  • Citation lookups (cited cases, citing cases, cited legislation), one list per call
  • Legislation titles, citations, and types

What you don't get:

  • The full text of the judgment itself
  • Headnotes or summaries
  • The full text of statutes or regulations
  • Dissenting or concurring opinion text

Practical impact: Your AI assistant can identify the right cases, tell you what they cite and what cites them, and give you the metadata needed to assess relevance, but it can't read the actual decision for you.

Think of it as an index and citation navigator, and read the decisions themselves on CanLII.

For workflows where you need the AI to analyze judgment text, combine this with a workflow where you paste relevant excerpts into the conversation, or direct the AI to fetch the CanLII web page for specific cases.

Important Limitations

Since this wraps the CanLII API, it inherits CanLII's constraints:

  • Metadata only - the API returns case titles, citations, dates, and keywords, but not full-text judgment content. For full text, you'll need to visit CanLII directly.
  • 5,000 requests/day - reported as the per-key limit by the MCP server's README and a third-party client (not stated in CanLII's own API documentation). If you're building automated workflows, plan for it. A citation lookup is one request per list, so batch processing can add up quickly.
  • 1 request at a time - requests are serialized, so your AI assistant can only make one CanLII call at a time. Citation lookups across many cases will be sequential.
  • Your API key - bring your own CanLII API key and apply through CanLII's feedback form. (The hosted CourtListener endpoint follows a similar bring-your-own-key pattern.)
  • No full-text search - the tools list courts, list cases by court and date range, fetch metadata and look up citations. None searches case text for keywords. Use CanLII's website for keyword searches, then use the MCP server to look up citation relationships around the cases you find.

Self-Hosting

If you prefer to run your own instance, clone the canlii-mcp source, copy .env.example to .env with your CANLII_API key, then build and run it (the repository includes a Dockerfile; the HTTP server defaults to port 3000).

The server supports two transports:

  • streamable_http at /mcp (stateless, used by the hosted endpoint)
  • stdio for local process communication

Technical Details

  • Language: TypeScript with MCP SDK and Hono
  • Transport: Streamable HTTP (stateless)
  • Docker: Port 3000
  • Bilingual: English and French (citation lookups return English only)

FAQ

What is a CanLII MCP?

A CanLII MCP is a Model Context Protocol server that connects an AI assistant to the CanLII API. Once connected, the assistant can list Canadian courts, pull case metadata, browse legislation, and look up citations without you leaving the editor. It needs your own CanLII API key.

Does CanLII have an API?

Yes. CanLII maintains an API that returns metadata for its collection as JSON: case titles, citations, dates, keywords, citation relationships, and legislation records. You request a key by sending your contact information through CanLII's feedback form, as its API documentation describes.

Does the CanLII API return full case text?

No. The CanLII API returns metadata and citation data, not the full text of judgments, statutes, or regulations. Case metadata includes a canlii.org URL, so you can follow the link to read the document on the website. If you need full text inside the assistant, pair the MCP with pasted excerpts or use a full-text source like the A2AJ MCP.

Is CanLII free to use?

Browsing on canlii.org is free, and CanLII says it is financed by the lawyers and notaries who belong to Canada's law societies. We did not find any fee for the API, but it is access-gated: you apply for a key and the rate limits reported for it include 5,000 requests per day.

How do I get a CanLII API key?

Send your contact information through CanLII's feedback form, as its API documentation describes, and explain what your project will do. We did not verify turnaround or approval criteria, so request access before you plan your build.

What is the CanLII API rate limit?

The MCP server's README lists three per-key limits that it says mirror CanLII's own: 1 request at a time, 2 requests per second, and 5,000 requests per day. CanLII's own API documentation does not state them, so confirm them with CanLII. The daily cap is the binding constraint for batch work.

How do I connect CanLII to Claude?

Run claude mcp add in Claude Code with an X-CanLII-Token header carrying your own CanLII API key, or add the server as a custom connector in Claude using the ?token= URL form described above. The hosted server needs no other token. The setup section above has copy-paste blocks for Claude, Claude Code, Cursor, VS Code, and Windsurf. For a broader walkthrough of running legal MCPs in editors, see our legal research in Cursor and Claude Code guide.

Can I search Canadian case text by keyword through the CanLII MCP?

Not through the CanLII API as its documentation describes it, which supports browsing by court and date plus citation lookups, but no full-text keyword search. For keyword search, use the CanLII website, then use the MCP to look up citations around the cases you find.

Try It

Apply for a CanLII key, point your editor at https://canlii-mcp.vaquill.ai/mcp with the X-CanLII-Token header above, and ask your assistant to look up the cases that cite a decision. To see the wider stack this fits into, read the CourtListener MCP for US court research, the guide to composing CourtListener, CanLII, and Vaquill AI into one workflow, how to use Claude for US legal research over MCP, and the MCP registry guide for legal AI. For the US primary law corpus behind all of it, see the US primary law API, or email contact@vaquill.ai.

Connect our US primary law database.
Every US statute, regulation, constitution, and executive order via REST, MCP or SQL. 5.4M+ sections, section-level citations, and links to the official source. Plus a free open dataset.
Updated October 12, 202623 min read

New legal AI guides, weekly.

Priyansh Khodiyar

Priyansh Khodiyar

Co-Founder & CTO

Priyansh leads engineering and AI at Vaquill AI: the pipelines that pull statutes, regulations and court rules from every US jurisdiction's official publisher, and the REST API, MCP server and open dataset that serve them.

Cookie preferences

Choose what Vaquill may use on this browser. You can change this at any time from “Cookie settings” in the footer.

Details in the Cookie Policy.