
CanLII
io.github.Vaquill-AIv0.1.0更新於 Oct 9, 2026
MCP for CanLII: Canadian case law and legislation metadata (federal, provincial, territorial).
概覽
讓助理透過 CanLII API 依法院、法庭或法規資料庫查詢加拿大判例法與立法中介資料。
- 功能
- 封裝 CanLII 加拿大法律資訊 API,提供列出法院與法庭、瀏覽指定資料庫中的判決,以及取得特定案件中介資料(標題、引註、日期、關鍵字)的工具。也可列出法規與條例資料庫、瀏覽立法,並回傳引註關係,例如某案引用的案件、引用該案的案件及其引用的立法。此 API 僅提供中介資料,不提供全文。
- 適用情境
- 當助理需要查找或引用加拿大聯邦、省或地區的判例法與立法時適用,例如定位某判決、核對其引註,或追蹤哪些案件引用了它。若需要判決或法規全文,則不適用。
- 執行需求
- 可使用託管的 streamable HTTP 端點,也可自行部署(Node.js 22+、Docker 或 Cloudflare Workers)。需要 CanLII API 金鑰,依請求透過 X-CanLII-Token 標頭或 token URL 參數提供,或在 stdio 與自架單租戶模式下透過 CANLII_API 環境變數提供。選用的 MCP_AUTH_TOKEN 承載權杖僅用於自架部署。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 CanLII,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"canlii-mcp": {
"type": "http",
"url": "https://canlii-mcp.vaquill.ai/mcp"
}
}
}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
/healthroute, and a hosted endpoint atcanlii-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.
Use the hosted endpoint (no install)
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:
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
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
Tools
Requirements
- Node.js 22+
- A CanLII API key — apply here
Usage
stdio via npx (quickest)
stdio (from source)
Add to your MCP config:
HTTP server
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:
Docker
Or with Docker Compose:
Cloudflare Workers
The server includes a Workers-compatible entry point (src/worker.ts).
CLI deploy
Dashboard deploy (Connect to Git)
- Go to Cloudflare Dashboard → Workers & Pages → Create → Connect to Git
- Select your
tomilashy/canlii-mcprepository - 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)
- Project name:
- Expand Advanced settings:
- Variable name:
CANLII_API - Variable value: your CanLII API key
- Check Encrypt to store it as a secret
- Variable name:
- Click Deploy
The MCP endpoint will be at https://canlii-mcp.<your-subdomain>.workers.dev/mcp.
Configuration
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
Release
This project uses Semantic Versioning via semantic-release. Commit messages follow the Conventional Commits spec:
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版本歷史
1- v0.1.0最新Sep 16, 2026
