New Zealand legislation via MCP — full-text search across statutes and provisions
New Zealand legislation via MCP — full-text search across statutes and provisions
Valid MCP server (2 strong, 2 medium validity signals). 3 known CVEs in dependencies (0 critical, 3 high severity) Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (141/142 approved).
5 files analyzed · 4 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Add this to your MCP configuration file:
{
"mcpServers": {
"eu-ansvar-newzealand-law-mcp": {
"args": [
"-y",
"@ansvar/newzealand-law-mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
The legislation.govt.nz alternative for the AI age.
Query 4,025 New Zealand public Acts -- from the Privacy Act 2020 and Companies Act 1993 to the Commerce Act 1986, Harmful Digital Communications Act 2015, and more -- directly from Claude, Cursor, or any MCP-compatible client.
If you're building legal tech, compliance tools, or doing New Zealand legal research, this is your verified reference database.
Built by Ansvar Systems -- Stockholm, Sweden
New Zealand legal research is scattered across legislation.govt.nz, NZLII, the New Zealand Gazette, and various government agency websites. Whether you're:
...you shouldn't need a dozen browser tabs and manual cross-referencing through the Parliamentary Counsel Office website. Ask Claude. Get the exact provision. With context.
This MCP server makes New Zealand law searchable, cross-referenceable, and AI-readable -- with 4,025 public Acts, 184,118 provisions, and 47,194 legal definitions covering 168 years of legislation.
Connect directly to the hosted version -- zero dependencies, nothing to install.
Endpoint: https://mcp.ansvar.eu/law-nz/mcp
| Client | How to Connect |
|---|---|
| Claude.ai | Settings > Connectors > Add Integration > paste URL |
| Claude Code | claude mcp add newzealand-law --transport http https://mcp.ansvar.eu/law-nz/mcp |
| Claude Desktop | Add to config (see below) |
| GitHub Copilot | Add to VS Code settings (see below) |
Claude Desktop -- add to claude_desktop_config.json:
{
"mcpServers": {
"newzealand-law": {
"type": "url",
"url": "https://mcp.ansvar.eu/law-nz/mcp"
}
}
}
GitHub Copilot -- add to VS Code settings.json:
{
"github.copilot.chat.mcp.servers": {
"newzealand-law": {
"type": "http",
"url": "https://mcp.ansvar.eu/law-nz/mcp"
}
}
}
npx @ansvar/newzealand-law-mcp
Claude Desktop -- add to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"newzealand-law": {
"command": "npx",
"args": ["-y", "@ansvar/newzealand-law-mcp"]
}
}
}
Cursor / VS Code:
{
"mcp.servers": {
"newzealand-law": {
"command": "npx",
"args": ["-y", "@ansvar/newzealand-law-mcp"]
}
}
}
Once connected, just ask naturally:
| Category | Count | Details |
|---|---|---|
| Acts | 4,025 public Acts | Census-first full corpus from PCO |
| Provisions | 184,118 sections | Full-text searchable with FTS5 |
| Legal Definitions | 47,194 definitions | Extracted from interpretation sections |
| Year Range | 1858--2026 | 168 years of continuous legislation |
| Languages | English + te reo Maori | Bilingual where available |
| Database Size | ~300 MB | Optimized SQLite, portable |
| Freshness Checks | Automated | Weekly drift detection against PCO |
Verified data only -- every provision is ingested verbatim from the Parliamentary Counsel Office's official XML. Zero LLM-generated content.
Verbatim Source Text (No LLM Processing):
Smart Context Management:
Technical Architecture:
PCO XML --> Parse --> SQLite --> FTS5 snippet() --> MCP response
| |
Provision parser Verbatim database query
| Traditional Approach | This MCP Server |
|---|---|
| Search legislation.govt.nz by Act title | Search by plain English: "data breach notification" |
| Navigate multi-part Acts manually | Get the exact provision with context |
| Manual cross-referencing between statutes | build_legal_stance aggregates across sources |
| "Is this Act still in force?" --> check manually | check_currency tool --> answer in seconds |
| Find EU alignment --> dig through policy papers | get_eu_basis --> linked EU directives instantly |
| Check government website for updates | Weekly automated freshness checks |
| No API, no integration | MCP protocol --> AI-native |
Traditional: Search legislation.govt.nz --> Browse Act --> Ctrl+F --> Cross-reference with other Acts --> Check New Zealand Gazette --> Repeat
This MCP: "What are the privacy breach notification requirements under s 114 Privacy Act 2020?" --> Done.
| Tool | Description |
|---|---|
search_legislation | FTS5 search across 184,118 provisions with BM25 ranking. Supports quoted phrases, boolean operators, and prefix wildcards |
get_provision | Retrieve specific provision by Act title + section (e.g., "Privacy Act 2020", section "22") |
validate_citation | Validate a citation against the database -- zero-hallucination check. Supports formats: "Section 22 Privacy Act 2020", "s 22 Privacy Act 2020" |
build_legal_stance | Aggregate citations from multiple statutes for a legal question |
format_citation | Format citations per NZ conventions (full/short/pinpoint) |
check_currency | Check if an Act is in force, amended, or repealed |
list_sources | Dataset provenance, statistics, and coverage metadata |
about | Server metadata, version, database fingerprint, and capability summary |
| Tool | Description |
|---|---|
get_eu_basis | Get EU directives/regulations that a NZ statute aligns with |
get_nz_implementations | Find NZ Acts that align with a specific EU directive or regulation |
search_eu_implementations | Search EU documents with NZ alignment counts |
get_provision_eu_basis | Get EU/international basis for a specific provision (pinpoint level) |
validate_eu_compliance | Check EU/international alignment status with warnings |
New Zealand is not an EU member state, but many NZ laws autonomously align with EU directives and regulations through trade agreements, mutual recognition arrangements, and independent policy adoption. The Privacy Act 2020, for example, was designed with GDPR-level protections -- enabling New Zealand's EU adequacy decision for cross-border data transfers.
This server maps those alignments bidirectionally:
| Capability | Description |
|---|---|
| NZ --> EU | Given an NZ statute, find the EU directives/regulations it aligns with |
| EU --> NZ | Given an EU directive, find NZ statutes that implement similar provisions |
| Provision-level | Pinpoint EU basis for specific sections, not just whole Acts |
| Compliance check | Detect references to repealed EU directives, missing alignment, outdated references |
| NZ Act | EU Equivalent | Nature |
|---|---|---|
| Privacy Act 2020 | GDPR (2016/679) | Autonomous alignment; NZ has EU adequacy decision |
| Commerce Act 1986 | EU Competition Law | Autonomous alignment with EU competition principles |
| Financial Markets Conduct Act 2013 | MiFID II, MAR | Autonomous alignment for financial regulation |
| Consumer Guarantees Act 1993 | Consumer Rights Directive | Similar consumer protection framework |
All content is sourced from the authoritative New Zealand legal database:
A weekly GitHub Actions workflow monitors the data source:
| Source | Check | Method |
|---|---|---|
| New Acts | PCO publication feed | Diffed against database |
| Amendments | PCO XML date comparison | All 4,025 Acts checked |
| Repeals | Status field monitoring | Flagged when Acts change status |
| Drift detection | Golden hash comparison | 6 anchor provisions verified |
Full provenance metadata:
sources.yml
This project uses multiple layers of automated security scanning:
| Scanner | What It Does | Schedule |
|---|---|---|
| CodeQL | Static analysis for security vulnerabilities | Weekly + PRs |
| Semgrep | SAST scanning (OWASP top 10, secrets, TypeScript) | Every push |
| Gitleaks | Secret detection across git history | Every push |
| Trivy | CVE scanning on filesystem and npm dependencies | Daily |
| Dependabot | Automated dependency updates | Weekly |
See SECURITY.md for the full policy and vulnerability reporting.
THIS TOOL IS NOT LEGAL ADVICE
Legislation text is sourced verbatim from the Parliamentary Counsel Office's official XML publications. However:
- This is a research tool, not a substitute for professional legal counsel
- Verify critical citations against the official legislation.govt.nz for court filings and formal legal opinions
- Check the New Zealand Gazette for the most recent amendments and commencement orders
- EU/international alignments are editorial cross-references, not official government positions
- Te reo Maori provisions are included where available in PCO data, but may not cover all bilingual enactments
Before using professionally, read: DISCLAIMER.md | PRIVACY.md
Queries go through the Claude API (or your chosen LLM provider). For privileged or confidential matters, use on-premise deployment via the npm package (npx @ansvar/newzealand-law-mcp). See PRIVACY.md for data handling guidance.
git clone https://github.com/Ansvar-Systems/newzealand-law-mcp
cd newzealand-law-mcp
npm install
npm run build
npm test
npm run dev # Start MCP server
npx @anthropic/mcp-inspector node dist/src/index.js # Test with MCP Inspector
npm run build:db # Rebuild SQLite database from raw data
npm run ingest # Ingest legislation from PCO
npm run drift:detect # Run drift detection against golden hashes
npm run check-updates # Check for amendments and new Acts
npm run validate # Full validation (lint + test + contract)
npm test # Run all tests
npm run test:contract # Run contract tests (golden file validation)
npm run lint # TypeScript type checking
This server is part of Ansvar's Compliance Suite -- MCP servers that work together for end-to-end compliance coverage:
Query 49 EU regulations directly from Claude -- GDPR, AI Act, DORA, NIS2, MiFID II, eIDAS, and more. Full regulatory text with article-level search. npx @ansvar/eu-regulations-mcp
Query 4,025 New Zealand public Acts directly from Claude -- Privacy Act, Companies Act, Commerce Act, and more. Full provision text with EU alignment cross-references. npx @ansvar/newzealand-law-mcp
Query Australian federal legislation directly from Claude -- Privacy Act, Corporations Act, Criminal Code, and more. Trans-Tasman legal research made easy. npx @ansvar/australian-law-mcp
Query UK legislation directly from Claude -- Data Protection Act, Companies Act, and more. Commonwealth legal tradition comparison. npx @ansvar/uk-law-mcp
Query US federal and state compliance laws -- HIPAA, CCPA, SOX, GLBA, FERPA, and more. npx @ansvar/us-regulations-mcp
Query 261 security frameworks and 1,451 controls -- ISO 27001, NIST CSF, SOC 2, CIS, and more. npx @ansvar/security-controls-mcp
Contributions welcome! See CONTRIBUTING.md for guidelines.
Priority areas:
If you use this MCP server in academic research:
@software{newzealand_law_mcp_2026,
author = {Ansvar Systems AB},
title = {New Zealand Law MCP Server: Production-Grade Legal Research Tool},
year = {2026},
url = {https://github.com/Ansvar-Systems/newzealand-law-mcp},
note = {Comprehensive New Zealand legal database with 4,025 public Acts, 184,118 provisions, and 47,194 definitions spanning 1858--2026}
}
Apache License 2.0. See LICENSE for details.
We build AI-accelerated compliance and legal research tools. This MCP server makes 168 years of New Zealand legislation -- from the earliest colonial statutes of 1858 to Acts passed in 2026 -- searchable, citable, and AI-readable.
4,025 public Acts. 184,118 provisions. 47,194 definitions. One MCP server.
ansvar.eu -- Stockholm, Sweden
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
by mcp-marketplace · Developer Tools
Scaffold, build, and publish TypeScript MCP servers to npm — conversationally
by mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.