npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ansvar/newzealand-law-mcp

v1.1.1

Published

New Zealand law database covering privacy, digital communications, electronic transactions, companies, and commerce law with full-text search

Downloads

132

Readme

New Zealand Law MCP

New Zealand law database for the Model Context Protocol, covering privacy, harmful digital communications, electronic transactions, companies, commerce, and publications classification legislation with full-text search.

MCP Registry: eu.ansvar/newzealand-law-mcp npm: @ansvar/newzealand-law-mcp License: Apache-2.0


Deployment Tier

SMALL -- single tier, bundled. New Zealand has a smaller legislative corpus that fits comfortably within Vercel and npm size limits.

| Tier | Platform | Database | Content | |------|----------|----------|---------| | Bundled | Vercel (Hobby) / npm (stdio) / Docker | Full database (~100-200 MB) | All NZ Acts, regulations, FTS search, international cross-references |

No tiering is required. The full New Zealand legislative database fits within the Vercel 250 MB function bundle limit, similar to the Swedish and Slovenian Law MCPs.


Data Sources

| Source | Authority | Method | Update Frequency | License | Coverage | |--------|-----------|--------|-----------------|---------|----------| | New Zealand Legislation | NZ Government, Parliamentary Counsel Office | XML Download | Weekly | CC BY 4.0 | All NZ Acts, legislative instruments, regulations | | NZLII | AustLII / University of Canterbury | HTML Scrape | Weekly | NZLII Terms of Use | Case law, tribunal decisions, law reform reports |

Full provenance metadata: sources.yml


Quick Start

Claude Desktop / Cursor (stdio)

{
  "mcpServers": {
    "newzealand-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/newzealand-law-mcp"]
    }
  }
}

Vercel Streamable HTTP (ChatGPT / Claude.ai)

Once deployed, the public endpoint will be available at:

https://newzealand-law-mcp.vercel.app/api/mcp

Tools

| Tool | Description | |------|-------------| | get_provision | Retrieve a specific section/article from a New Zealand Act | | search_legislation | Full-text search across all NZ legislation | | list_acts | List all available Acts with metadata | | get_act_structure | Get table of contents / structure of an Act | | get_provision_eu_basis | Cross-reference NZ law to EU/international equivalents | | search_case_law | Search case law from NZ courts (via NZLII) |

All tools are available in the single bundled tier -- no upgrade gating required.


Key Legislation Covered

| Act | Year | Domain | Key Topics | |-----|------|--------|------------| | Privacy Act | 2020 | Data Protection | Information Privacy Principles (IPPs), personal information, data breach notification, Privacy Commissioner | | Harmful Digital Communications Act | 2015 | Digital Safety | Online harm, communication principles, safe harbour for ISPs, Netsafe approved agency | | Electronic Transactions Act | 2002 | Digital | Electronic signatures, electronic contracts, validity of electronic information | | Companies Act | 1993 | Corporate Law | Company incorporation, directors' duties, shareholder rights, liquidation | | Commerce Act | 1986 | Competition | Anti-competitive practices, mergers, market dominance, Commerce Commission | | Films Videos and Publications Classification Act | 1993 | Content Regulation | Classification of publications, objectionable material, Chief Censor |


Languages

New Zealand legislation is primarily in English. Some legislation includes provisions in te reo Maori (the Maori language), particularly:

  • Te Ture Whenua Maori Act 1993 (Maori Land Act)
  • Treaty of Waitangi related legislation
  • Maori Language Act 2016

The MCP indexes both English (en) and Maori (mi) text where available.


Database Estimates

| Component | Size Estimate | |-----------|---------------| | NZ Acts and regulations | ~80-120 MB | | Case law (via NZLII) | ~30-60 MB | | Cross-references and metadata | ~5 MB | | Total | ~100-200 MB |

Delivery strategy: Full database bundled in npm package (same approach as Swedish and Slovenian Law MCPs). No tiering or runtime download needed.


Development

# Clone the repository
git clone https://github.com/Ansvar-Systems/newzealand-law-mcp.git
cd newzealand-law-mcp

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Run contract tests
npm run test:contract

# Build database (requires raw data in data/ directory)
npm run build:db

# Run drift detection
npm run drift:detect

# Full validation
npm run validate

Architecture

newzealand-law-mcp/
├── .github/
│   ├── workflows/
│   │   ├── ci.yml                    # Test + lint + security scan
│   │   ├── publish.yml               # npm publish on version tags
│   │   ├── check-source-updates.yml  # Data freshness monitoring
│   │   └── drift-detect.yml          # Upstream drift detection
│   ├── SECURITY.md
│   ├── SECURITY-SETUP.md
│   └── ISSUE_TEMPLATE/
│       └── data-error.md
├── data/
│   └── .gitkeep
├── fixtures/
│   ├── golden-tests.json             # 12 contract tests
│   ├── golden-hashes.json            # 6 drift detection anchors
│   └── README.md
├── scripts/
│   ├── build-db.ts
│   ├── ingest.ts
│   ├── drift-detect.ts
│   └── check-source-updates.ts
├── src/
│   ├── server.ts
│   ├── db.ts
│   └── tools/
│       ├── get-provision.ts
│       ├── search-legislation.ts
│       ├── list-acts.ts
│       ├── get-act-structure.ts
│       ├── get-provision-eu-basis.ts
│       └── search-case-law.ts
├── __tests__/
│   ├── unit/
│   ├── contract/
│   │   └── golden.test.ts
│   └── integration/
├── sources.yml
├── server.json
├── package.json
├── tsconfig.json
├── CHANGELOG.md
├── LICENSE
└── README.md

Related Documents


Security

Report vulnerabilities to [email protected] (48-hour acknowledgment SLA).

See SECURITY.md for full disclosure policy.


Maintained by: Ansvar Systems Engineering Contact: [email protected]