home / mcp / south africa law mcp server

South Africa Law MCP Server

Provides full‑text search and structured access to South African legislation and case law, including POPIA, the Cybercrimes Act, ECTA, and more.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ansvar-systems-southafrica-law-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ansvar/southafrica-law-mcp"
      ]
    }
  }
}

This MCP server provides fast full‑text search and structured access to South African legislation and case law, including POPIA, the Cybercrimes Act, ECTA, the Companies Act, the Consumer Protection Act, and more, enabling developers and researchers to query and cross‑reference legal texts efficiently.

How to use

You can access this MCP server through a local, standard MCP client workflow. Start by running the server via the official runtime method, then use search and retrieval tools to locate acts, sections, provisions, and related case law. You can perform full‑text searches across legislation, inspect act structures, retrieve specific provisions by act and section, and cross‑reference provisions with related EU or international instruments.

How to install

Prerequisites: ensure you have Node.js and npm installed on your system.

Install the MCP package globally using npm.

npm install -g @ansvar/southafrica-law-mcp

Run the MCP server directly with npx to avoid a global install.

npx @ansvar/southafrica-law-mcp

If you are integrating with Claude Desktop, configure your MCP server entry to use npx with the package name.

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

Configuration and usage notes

The following configuration demonstrates the standard runtime approach used for this MCP server. You can start it using npm if you build from source, or use npx for quick usage.

// Quick start (no install required):
npx @ansvar/southafrica-law-mcp

If you are building from source, you will run the build and then start the server with npm.

git clone https://github.com/Ansvar-Systems/southafrica-law-mcp.git
cd southafrica-law-mcp
npm install
npm run build
npm run build:db      # Build the full database
npm run build:db:free # Build the free-tier database
npm start             # Start the server

Deployment and data sources

This MCP uses multiple data sources to provide comprehensive coverage of South African law. The free tier includes core national legislation, while the professional tier adds full case law coverage.

Data sources include SAFLII for national acts and case law, the Government of South Africa for government gazette and policy documents, and the Department of Justice for constitution and justice‑related legislation.

Tools and endpoints

You gain access to a set of tools that let you retrieve provisions, search legislation, search case law, list Acts, inspect act structures, and cross‑reference provisions with EU or international instruments.

Security and maintenance

Follow standard security practices for server deployments. Review the vulnerability disclosure policy and report data errors by opening issues when you discover problems.

Available tools

get_provision

Retrieve a specific section/article from a South African Act by law identifier and article number

search_legislation

Full-text search across all South African legislation

search_case_law

Full-text search across Constitutional Court, Supreme Court of Appeal, and High Court decisions

list_acts

List all available Acts in the database

get_act_structure

Get the table of contents / structure of a specific Act

get_provision_eu_basis

Cross-reference a South African provision with related EU/international instruments (GDPR, Budapest Convention, NIS2)