QLD Legislation MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@QLD Legislation MCP Serversearch Queensland legislation for provisions on tenant rights"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Australian Legislation & Caselaw MCP
Semantic legal research over primary Australian sources, with citations you can actually rely on.
An end-to-end pipeline that extracts current, in-force legislation and court decisions from official sources, parses their native structure (no OCR, no PDF scraping, no layout guessing), embeds them into local vector stores, and serves them to any MCP client — Claude, or anything else that speaks the protocol.
Every search hit carries a cite_as string with the consolidation currency date or paragraph pinpoint built in:
Work Health and Safety Act 2011 (Qld) s 175 (current as at 2026-03-29) Cromwell Corporation Ltd v ARA Real Estate Investors XXI Pte Ltd [2020] FCA 1492 [12]–[16]
Coverage
Corpus | Source | Format | Scale |
Queensland legislation | Authorised QuILLS XML | ~570 Acts + ~430 regulations | |
Commonwealth legislation | Compilation Epub (OPC drafting styles) | ~1,250 in-force principal Acts | |
Federal Court caselaw | Born-digital HTML → text | ~63,700 decisions | |
NSW caselaw | Open Australian Legal Corpus | Born-digital HTML → text | ~117,000 decisions |
Each corpus lives in its own ChromaDB directory — independently portable (copy a folder to move a corpus), independently updatable, and re-ingestable while the others stay served. Cross-corpus search embeds the query once and fans out across the stores' HNSW indexes (~ms each), so searching everything costs about the same as searching one.
Related MCP server: mcp-context
Why the retrieval is precise
The section is the chunk. Legislation is parsed from its structural markup — chapter/part/division/section, schedules, dictionary definitions — so retrieval returns the exact provision a lawyer would cite, with its full structural path (
Part 9 > Division 3 > s 175 Power to seize evidence).The paragraph is the pinpoint. Modern FCA judgments number their paragraphs in the text; chunking is sequence-checked (a numbered line only opens paragraph n at last + 1), so quoted statutes can't fake a paragraph break and pinpoints like
[12]–[18]are trustworthy. Where numbering genuinely isn't recoverable (old decisions, OALC's NSW text), chunks cite at case level rather than inventing pinpoints.Dates are part of the citation. Every legislation hit carries the reprint's currency date; the server instructs clients to cite with it. A consolidated store is not a substitute for checking amendments after that date — the tooling makes that explicit instead of hiding it.
Definitions are first-class. Dictionary definitions become their own retrievable chunks, so "how does this Act define worker?" is a direct lookup, and one tool compares a term's definition across every instrument in the corpus.
MCP tools
Legislation (all searches take jurisdiction='qld'|'cth'|'all' and doc_type='act'|'sl'|'all'):
Tool | Purpose |
| Semantic search; filter by Act, kind, exact substring; optional cross-encoder rerank |
| Exact-substring search, no embedding — near-instant |
| "Which Act governs X?" — triage over one vector per instrument, then drill in |
| A provision verbatim, optionally with neighbouring sections and the definitions it uses |
| An instrument's table of provisions |
| Every provision in one chapter/part/division/schedule, in order, in one call |
| One instrument's dictionary (or one term) |
| A term's definition across the whole corpus, side by side |
| Where a provision or instrument is cited, internally and by other instruments |
| Everything in the store, with type and currency date |
Caselaw (corpus='fca'|'nsw'|'all'):
Tool | Purpose |
| Semantic search over decisions; filter by court, year; hits carry paragraph pinpoints |
| A decision's catchwords/orders coverpage, or a paragraph range of its reasons |
Ops:
Tool | Purpose |
| What's loaded, chunk counts, currency-date ranges per corpus |
Quick start
python3 -m venv .venv && source .venv/bin/activate
pip install -e '.[mcp]' # extract + ingest + MCP server
# Queensland: enumerate -> download authorised XML -> embed
qld-legis enumerate --out data/manifest.json
qld-legis fetch --manifest data/manifest.json --out-dir data/xml
qld-legis-ingest data/xml --reset # bge-m3 embeddings; --device mps on Apple silicon
qld-legis-ingest-acts data/xml # small "which Act governs X?" triage index
qld-legis-mcp # stdio MCP server, ready for Claude DesktopClaude Desktop config:
{
"mcpServers": {
"au-legislation": {
"command": "/path/to/.venv/bin/qld-legis-mcp",
"env": { "QLD_SETTINGS": "/path/to/repo/config/settings.json" }
}
}
}Everything is resumable and idempotent: fetches skip existing files, ingests skip unchanged documents by content hash, and chunk ids are deterministic so re-ingesting an amended Act updates it in place.
Add the Commonwealth
qld-legis-cth enumerate # in-force principal Acts via the FRL OData API
qld-legis-cth fetch # compilation Epubs (resumable)
qld-legis-cth ingest # embeds into its own collection/storeThe Epub's XHTML preserves the Office of Parliamentary Counsel's drafting styles (ActHead1..5, subsection, Definition, Penalty), so Commonwealth structure parses natively too — stdlib only, no extra dependencies.
Add caselaw
qld-legis-caselaw fetch --source federal_court_of_australia --source nsw_caselaw
qld-legis-caselaw ingest # FCA -> its own store
qld-legis-caselaw ingest --source nsw_caselaw # NSW -> its own storeDecisions bootstrap from the Open Australian Legal Corpus (Isaacus) — text already extracted from the courts' born-digital HTML. The multi-GB corpus file is streamed and filtered on the fly, never held in memory or stored whole. For decisions newer than OALC's last update, Isaacus's corpus creator emits the same JSONL shape, which ingest consumes unchanged.
Keeping it current
qld-legis-update # differential: fetch + re-embed only what changed
qld-legis-update --include-sl # regulations too
qld-legis-update --dry-run # show the diff firstThe updater diffs the official in-force list against saved state: new documents are ingested, changed ones re-ingested (old chunks deleted first, so renumbered provisions don't linger), repealed ones removed. Byte-identical XML skips the re-embed even when the version id churns. State saves after every document, so interrupted runs resume.
Performance
Embeddings: bge-m3 (multilingual, 1024-dim, 8k-token window). Optional ONNX int8 backend (
qld-legis-export-onnx) runs queries ~4× faster on CPUs with VNNI — vectors stay compatible with a torch-built store (cosine ≥ 0.99 measured).Triage-first search: broad questions hit a tiny one-vector-per-instrument index before touching the full section corpus.
Optional reranking: a cross-encoder (
bge-reranker-v2-m3) re-scores top candidates when precision matters more than latency.Query-time embedding is one string at a time — CPU is fine for serving; no GPU needed.
Deployment
The included Dockerfile bakes the models in (starts offline; no runtime downloads) and docker-compose.yml mounts the stores as volumes:
docker compose up -d --buildTo share the server, put it behind an HTTPS tunnel (Tailscale Funnel, Cloudflare Tunnel) and serve the endpoint at an unguessable path — the URL itself becomes the shared key, which suits MCP clients whose connector UI only accepts a URL:
qld-legis-mcp --http --host 127.0.0.1 --port 8000 --path "/mcp-<random>/mcp"Bind to localhost and let the tunnel terminate TLS. QLD_MCP_TOKEN adds optional bearer-token auth for programmatic clients; QLD_MCP_ALLOWED_HOSTS re-enables Host pinning if you want it. All configuration works via env vars (QLD_DB_PATH, QLD_CTH_DB_PATH, QLD_FCA_DB_PATH, ...) or config/settings.json.
Sensible caveats
This is a research tool, not legal advice. The stores hold consolidated reprints as at their currency date — always check for amendments after the as_at date in the citation before relying on a provision. Caselaw coverage runs to the corpus's last update; verify anything decided since.
Data licensing
Material | Licence |
Queensland legislation | © State of Queensland, CC BY 4.0 |
Commonwealth legislation | © Commonwealth of Australia, CC BY 4.0 |
FCA judgments | Reproducible unaltered (incl. commercially) with acknowledgment to the Court |
NSW Caselaw / OALC | See the OALC licence; OALC itself is CC BY 4.0 |
Redistribution of downloaded material must retain the required attributions. High Court material (not enabled by default) is personal/non-commercial only. This repository's own code is MIT.
Development
pip install -e . pytest
pytest tests/ # pure-logic tests: parsers, chunkers, diffing - no network, no ML depsIngest CLIs all have --dry-run modes that parse and report chunk statistics without writing anything, and the repo's source-endpoint documentation (browse-data expressions, XML rendition URLs, the QuILLS DTD walk, FRL OData quirks) lives in the module docstrings next to the code that uses it.
Roadmap
Other state legislation (NSW/WA/SA/Tas are already in OALC with text extracted; Victoria needs its own extractor)
NSW paragraph pinpoints via direct NSW Caselaw HTML (its pages carry proper paragraph anchors; OALC's text loses the numbering)
High Court decisions (licence limits: personal/non-commercial)
Point-in-time / amendment-history indexing
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceMCP server for document ingestion and semantic search on Qdrant. Enables ingesting local documents, generating embeddings with OpenAI, and performing vector search with metadata filters.Last updatedApache 2.0
- Flicense-qualityDmaintenanceLocal MCP server that provides semantic search (RAG) over code repositories, enabling AI clients like Claude and Gemini to access project context without manual re-upload.Last updated
- AlicenseAqualityBmaintenanceLocal-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.Last updated39MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables saving, retrieving, and managing research content using ChromaDB vector storage and semantic search.Last updated5MIT
Related MCP Connectors
Remote ChromaDB vector database MCP server with streamable HTTP transport
Local-first RAG engine with MCP server for AI agent integration.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/callmemitch27/Legislation-QLD-Cth-Retrieval-Augmented-Generation-'
If you have feedback or need assistance with the MCP directory API, please join our Discord server