This server provides Australian legal research capabilities through the Model Context Protocol, specializing in case law and legislation searches with intelligent document retrieval.
Search Functions
Search Australian case law and legislation using natural language queries (e.g., "negligence duty of care" or "Privacy Act")
Intelligent sorting that auto-detects case name queries vs topic searches, applying relevance sorting for specific cases and date sorting for topics
Filter by jurisdiction (Commonwealth, Victoria, Federal, or other)
Customize result limits (1-50 results)
Primary sources only—filters out journal articles and commentary
Document Retrieval
Fetch full-text documents from case and legislation URLs
Extract text from HTML and PDF sources, including OCR support for scanned PDFs
Preserve paragraph numbers (
[N]) for accurate pinpoint citationsExtract neutral citations (e.g.,
[2025] HCA 26)
Output Options
Multiple formats available: JSON, plain text, markdown, or HTML
Structured results including case titles, URLs, citations, jurisdiction, and dates
AusLaw MCP
Model Context Protocol (MCP) server for Australian legal research. Searches AustLII for case law and legislation, retrieves full-text judgements with paragraph numbers preserved, and supports OCR for scanned PDFs.
Status: ✅ Working MVP with intelligent search relevance
Features
Current Capabilities
✅ Case law search: Natural language queries (e.g., "negligence duty of care")
✅ Intelligent search relevance: Auto-detects case name queries vs topic searches and applies appropriate sorting
Case name queries (e.g., "Donoghue v Stevenson") use relevance sorting to find the specific case
Topic queries (e.g., "negligence duty of care") use date sorting for recent cases
Manual override available via
sortByparameter
✅ Legislation search: Find Australian Commonwealth and State legislation
✅ Primary sources only: Filters out journal articles and commentary
✅ Citation extraction: Extracts neutral citations like
[2025] HCA 26✅ Paragraph preservation: Keeps
[N]paragraph numbers for pinpoint citations✅ Multiple formats: JSON, text, markdown, or HTML output
✅ Document retrieval: Full text from HTML and PDF sources
✅ OCR support: Tesseract OCR fallback for scanned PDFs
Roadmap
🔜 Multi-source: Will add jade.io for reported judgements
🔜 Page numbers: Will extract page numbers from reported versions
🔜 Authority ranking: Will prioritise reported over unreported judgements
See ROADMAP.md for detailed development plans.
Quick Start
To build for production:
Running Tests
The project includes comprehensive integration tests covering real-world legal search scenarios:
Test scenarios include:
Negligence and duty of care - Personal injury law searches
Contract disputes - Commercial law and breach of contract
Constitutional law - High Court constitutional matters
Employment law - Unfair dismissal and workplace relations
Property and land law - Native title and land rights disputes
Tests validate:
Results are properly formatted with required fields
Only primary sources are returned (no journal articles)
Recent cases are prioritized
Document fetching works for returned URLs
MCP Registration
Configure your MCP-compatible client (eg. Claude Desktop, Cursor) to launch the compiled server.
For Claude Desktop, edit ~/Library/Application Support/Claude/claude_desktop_config.json:
Replace /path/to/auslaw-mcp with the actual path to your installation.
Available Tools
Once registered, the following tools are available:
search_cases
Search Australian case law using natural language queries.
Parameters:
query(required): Search query in natural language (eg. "negligence duty of care", "Mabo")jurisdiction(optional): Filter by jurisdiction: "cth", "vic", "federal", "other"limit(optional): Maximum number of results (1-50, default 10)format(optional): Output format: "json", "text", "markdown", "html" (default "json")sortBy(optional): Sorting mode: "auto", "relevance", or "date" (default "auto")"auto"(recommended): Intelligently detects case name queries (e.g., "X v Y", "Re X", citations) and uses relevance sorting to find the specific case; uses date sorting for topic searches"relevance": Sort by relevance to query (best for finding specific cases by name)"date": Sort by date, most recent first (best for finding recent cases on a topic)
Examples:
Finding a specific case by name (auto mode):
Finding recent cases on a topic:
search_legislation
Search Australian legislation.
Parameters:
query(required): Search query in natural languagejurisdiction(optional): Filter by jurisdiction: "cth", "vic", "federal", "other"limit(optional): Maximum number of results (1-50, default 10)format(optional): Output format: "json", "text", "markdown", "html" (default "json")sortBy(optional): Sorting mode: "auto", "relevance", or "date" (default "auto")
Example:
fetch_document_text
Fetch full text from a legislation or case URL. Supports HTML and PDF with OCR fallback for scanned PDFs.
Parameters:
url(required): URL of the document to fetchformat(optional): Output format: "json", "text", "markdown", "html" (default "json")
Example:
Features Implemented
✅ AustLII search integration with HTML parsing for cases and legislation
✅ Natural language query support (eg. "negligence duty of care")
✅ Document text extraction for HTML documents
✅ PDF text extraction with OCR fallback for scanned documents (requires Tesseract)
✅ Neutral citation and jurisdiction extraction
✅ Multiple output formats (JSON, text, markdown, HTML)
Contributing
See AGENTS.md for AI agent instructions and development guidelines.
Key principles:
Primary sources only (no journal articles)
Citation accuracy is paramount
All tests must pass before committing
Real-world testing (hits live AustLII)
Project Structure
Roadmap
See docs/ROADMAP.md and Issue #2 for detailed development plans.
Next priorities:
✅
Fix search relevance for case name queries(Completed)Add jade.io integration for reported judgements
Extract page numbers for pinpoint citations
Implement authority-based result ranking
License
MIT