CanLII

io.github.Vaquill-AI由 GitHub 账号 Vaquill-AI 发布v0.1.1更新于 Oct 26, 2026

MCP for CanLII: Canadian case law and legislation metadata (federal, provincial, territorial).

已验证Streamable HTTP可网页运行网页搜索与抓取知识与记忆

概览

AI 生成的概览

面向 CanLII API 的远程 MCP 服务器,让助手浏览加拿大联邦、省和地区的判例法与立法元数据。

可以做什么
  • 列出 CanLII 收录的法院、法庭以及法规和规章数据库
  • 按指定法院或法庭数据库浏览判决,按指定立法数据库浏览法规或规章
  • 获取特定案件或立法的元数据:标题、引注、日期、关键词
  • 查询引注关系:某判决引用的案件、引用它的案件,以及它涉及的立法
适用场景
适合查询加拿大法律引注、查找特定法院的判决,或沿引注关系在案件与法规之间追溯。它只是元数据索引而非全文来源,适合研究定位,不适合通读判决全文。
运行要求
需要一个 CanLII API 密钥,通过 X-CanLII-Token 请求头或托管端点上的 token 查询参数按请求提供。使用托管端点无需安装;自托管需要 Node.js 22+ 和 CANLII_API 环境变量,可选 MCP_AUTH_TOKEN 作为 Bearer 校验。
安装前请注意
CanLII API 密钥属于凭据:URL 参数方式会把密钥放进端点地址,私密性不如请求头。每次调用都计入你自己的 CanLII 配额(约每秒 2 次、每天 5,000 次),超限会返回错误。请求会发往第三方托管端点并进一步转发给 CanLII。

安装

在 SourceWeft 中

  1. 打开 控制台中的 CanLII,将其添加到工作区。
  2. 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.Vaquill-AI%2Fcanlii-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "canlii": {
      "type": "http",
      "url": "https://canlii-mcp.vaquill.ai/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

canlii-mcp

An MCP (Model Context Protocol) server for the CanLII Canadian legal information API. Gives AI assistants access to Canadian case law and legislation metadata across all federal, provincial, and territorial jurisdictions.

Forked from tomilashy/canlii-mcp. This fork adds bring-your-own-key (BYOK) auth, a /health route, and a hosted endpoint at canlii-mcp.vaquill.ai. Tools are unchanged.

Note: The CanLII API provides metadata only — titles, citations, dates, keywords, and citation relationships. Full document text is not available through the API.

[Discord]

Use the hosted endpoint (no install)

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

The hosted instance is public. No Vaquill token is required. Provide your own CanLII key one of two ways:

  • Header (recommended, keeps the key out of the URL): X-CanLII-Token: <your_canlii_api_key>

  • URL parameter (simplest; works in header-less clients like the Claude Desktop connector UI and claude.ai web): append ?token=<your_canlii_api_key> to the URL:

    https://canlii-mcp.vaquill.ai/mcp?token=YOUR_CANLII_API_KEY

Apply for a key via the CanLII API request form. The server never stores your key, and there is no server-side fallback key, so every call counts against your own CanLII quota.

Claude Desktop / Claude Code

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

Cursor / VS Code / Windsurf

Same pattern: any client supporting MCP streamable HTTP with custom headers works. For stdio-only clients use mcp-remote to proxy.

Authentication

ModeHeaderWhen
BYOK header (preferred)X-CanLII-Token: <key>Hosted / shared deployments
BYOK URL param?token=<key> (or ?canlii_token=)Header-less clients: Claude Desktop connector UI, claude.ai web
Server fallback(env CANLII_API)Self-hosted single-tenant. Required for stdio.
MCP gateAuthorization: Bearer <MCP_AUTH_TOKEN>Optional, self-host only. The public hosted endpoint at canlii-mcp.vaquill.ai does not use it, so no bearer token is required.

Tools

ToolDescription
list_case_databasesList all courts and tribunals in the CanLII collection
list_casesBrowse decisions from a specific court/tribunal database
get_caseGet metadata for a specific case (title, citation, date, keywords)
get_case_citationsGet cases cited by a case, cases citing it, or legislation it references
list_legislation_databasesList all statute and regulation databases
list_legislationBrowse statutes or regulations from a specific database
get_legislationGet metadata for a specific piece of legislation

Requirements

Usage

stdio via npx (quickest)

json
{  "mcpServers": {    "canlii": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@tomilashy/canlii-mcp"],      "env": {        "CANLII_API": "your_api_key"      }    }  }}

stdio (from source)

bash
npm installnpm run buildnode dist/index.js

Add to your MCP config:

json
{  "mcpServers": {    "canlii": {      "command": "node",      "args": ["/path/to/canlii-mcp/dist/index.js"],      "env": {        "CANLII_API": "your_api_key"      }    }  }}

HTTP server

bash
PORT=3000 CANLII_API=your_api_key node dist/index.js --transport http

The MCP endpoint is available at http://localhost:3000/mcp. The server runs in stateless mode — each request is self-contained, no session ID or initialize handshake required. Clients can call tools directly:

bash
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

bash
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:

yaml
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 server includes a Workers-compatible entry point (src/worker.ts).

CLI deploy
bash
npx wrangler secret put CANLII_APInpx wrangler secret put MCP_AUTH_TOKEN  # optionalnpx wrangler deploy
Dashboard deploy (Connect to Git)
  1. Go to Cloudflare Dashboard → Workers & Pages → Create → Connect to Git
  2. Select your tomilashy/canlii-mcp repository
  3. On the Set up your application page:
    • Project name: canlii-mcp
    • Build command: npm install && npm run build
    • Deploy command: npx wrangler deploy (pre-filled)
  4. Expand Advanced settings:
    • Variable name: CANLII_API
    • Variable value: your CanLII API key
    • Check Encrypt to store it as a secret
  5. Click Deploy

The MCP endpoint will be at https://canlii-mcp.<your-subdomain>.workers.dev/mcp.

Configuration

Environment VariableRequiredDefaultDescription
CANLII_APIOnly for stdio and self-hosted single-tenant—Your CanLII API key. Not needed in HTTP mode, where clients bring their own key per request.
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 not set, the server runs without authentication.

Rate Limits

The server enforces CanLII's API limits automatically, per CanLII key, so one caller's usage never throttles another's:

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

These mirror CanLII's own per-key limits. Each X-CanLII-Token gets its own independent budget (keyed by a hash of the key; raw keys are never retained). Requests that exceed the daily limit return an error rather than hitting the API.

Development

bash
npm installnpm run build      # compile TypeScriptnpm run watch      # watch mode

Release

This project uses Semantic Versioning via semantic-release. Commit messages follow the Conventional Commits spec:

Commit prefixRelease type
fix:Patch (1.0.0 → 1.0.1)
feat:Minor (1.0.0 → 1.1.0)
feat!: or BREAKING CHANGEMajor (1.0.0 → 2.0.0)

Pushing to main triggers the release workflow. If a release is cut, the Docker image is automatically built and published to ghcr.io.

License

MIT

Community

Questions, ideas, or want to contribute? Join the Vaquill community on Discord.

来源:README.md,提交 fad5aa1

工具

0
该服务器需要 API 密钥等凭据,因此 SourceWeft 无法在没有凭据的情况下读取其工具,也未收录。

版本历史

2
  1. v0.1.1最新Oct 26, 2026
  2. v0.1.0Sep 16, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分