@ansvar/zimbabwe-law-mcp 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/LICENSE +110 -0
- package/README.md +151 -0
- package/data/.gitkeep +0 -0
- package/data/database.db +0 -0
- package/data/seed/zw-access-information-privacy.json +1087 -0
- package/data/seed/zw-broadcasting-services.json +1150 -0
- package/data/seed/zw-companies-business-entities.json +4128 -0
- package/data/seed/zw-constitution-2013.json +2783 -0
- package/data/seed/zw-criminal-law-codification.json +2857 -0
- package/data/seed/zw-cyber-data-protection-2021.json +389 -0
- package/data/seed/zw-freedom-of-information-2020.json +382 -0
- package/data/seed/zw-interception-communications-2007.json +335 -0
- package/data/seed/zw-money-laundering-proceeds-crime.json +1432 -0
- package/data/seed/zw-postal-telecommunications.json +1361 -0
- package/dist/capabilities.d.ts +16 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +43 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/constants.d.ts +7 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +7 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/about.d.ts +37 -0
- package/dist/tools/about.d.ts.map +1 -0
- package/dist/tools/about.js +46 -0
- package/dist/tools/about.js.map +1 -0
- package/dist/tools/build-legal-stance.d.ts +21 -0
- package/dist/tools/build-legal-stance.d.ts.map +1 -0
- package/dist/tools/build-legal-stance.js +46 -0
- package/dist/tools/build-legal-stance.js.map +1 -0
- package/dist/tools/check-currency.d.ts +20 -0
- package/dist/tools/check-currency.d.ts.map +1 -0
- package/dist/tools/check-currency.js +41 -0
- package/dist/tools/check-currency.js.map +1 -0
- package/dist/tools/format-citation.d.ts +19 -0
- package/dist/tools/format-citation.d.ts.map +1 -0
- package/dist/tools/format-citation.js +33 -0
- package/dist/tools/format-citation.js.map +1 -0
- package/dist/tools/get-eu-basis.d.ts +25 -0
- package/dist/tools/get-eu-basis.d.ts.map +1 -0
- package/dist/tools/get-eu-basis.js +56 -0
- package/dist/tools/get-eu-basis.js.map +1 -0
- package/dist/tools/get-provision-eu-basis.d.ts +20 -0
- package/dist/tools/get-provision-eu-basis.d.ts.map +1 -0
- package/dist/tools/get-provision-eu-basis.js +45 -0
- package/dist/tools/get-provision-eu-basis.js.map +1 -0
- package/dist/tools/get-provision.d.ts +24 -0
- package/dist/tools/get-provision.d.ts.map +1 -0
- package/dist/tools/get-provision.js +80 -0
- package/dist/tools/get-provision.js.map +1 -0
- package/dist/tools/get-zimbabwean-implementations.d.ts +27 -0
- package/dist/tools/get-zimbabwean-implementations.d.ts.map +1 -0
- package/dist/tools/get-zimbabwean-implementations.js +48 -0
- package/dist/tools/get-zimbabwean-implementations.js.map +1 -0
- package/dist/tools/list-sources.d.ts +25 -0
- package/dist/tools/list-sources.d.ts.map +1 -0
- package/dist/tools/list-sources.js +44 -0
- package/dist/tools/list-sources.js.map +1 -0
- package/dist/tools/registry.d.ts +13 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +365 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/search-eu-implementations.d.ts +25 -0
- package/dist/tools/search-eu-implementations.d.ts.map +1 -0
- package/dist/tools/search-eu-implementations.js +59 -0
- package/dist/tools/search-eu-implementations.js.map +1 -0
- package/dist/tools/search-legislation.d.ts +24 -0
- package/dist/tools/search-legislation.d.ts.map +1 -0
- package/dist/tools/search-legislation.js +54 -0
- package/dist/tools/search-legislation.js.map +1 -0
- package/dist/tools/validate-citation.d.ts +26 -0
- package/dist/tools/validate-citation.d.ts.map +1 -0
- package/dist/tools/validate-citation.js +118 -0
- package/dist/tools/validate-citation.js.map +1 -0
- package/dist/tools/validate-eu-compliance.d.ts +20 -0
- package/dist/tools/validate-eu-compliance.d.ts.map +1 -0
- package/dist/tools/validate-eu-compliance.js +98 -0
- package/dist/tools/validate-eu-compliance.js.map +1 -0
- package/dist/utils/as-of-date.d.ts +9 -0
- package/dist/utils/as-of-date.d.ts.map +1 -0
- package/dist/utils/as-of-date.js +25 -0
- package/dist/utils/as-of-date.js.map +1 -0
- package/dist/utils/fts-query.d.ts +19 -0
- package/dist/utils/fts-query.d.ts.map +1 -0
- package/dist/utils/fts-query.js +47 -0
- package/dist/utils/fts-query.js.map +1 -0
- package/dist/utils/metadata.d.ts +16 -0
- package/dist/utils/metadata.d.ts.map +1 -0
- package/dist/utils/metadata.js +23 -0
- package/dist/utils/metadata.js.map +1 -0
- package/dist/utils/statute-id.d.ts +15 -0
- package/dist/utils/statute-id.d.ts.map +1 -0
- package/dist/utils/statute-id.js +39 -0
- package/dist/utils/statute-id.js.map +1 -0
- package/fixtures/golden-hashes.json +56 -0
- package/fixtures/golden-tests.json +180 -0
- package/package.json +77 -0
- package/server.json +22 -0
- package/sources.yml +64 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [1.0.0] - 2026-XX-XX
|
|
11
|
+
### Added
|
|
12
|
+
- Initial release of Zimbabwe Law MCP
|
|
13
|
+
- `search_legislation` tool for full-text search across all Zimbabwean statutes
|
|
14
|
+
- `get_provision` tool for retrieving specific articles/sections
|
|
15
|
+
- `get_provision_eu_basis` tool for international framework cross-references
|
|
16
|
+
- `validate_citation` tool for legal citation validation
|
|
17
|
+
- `check_statute_currency` tool for checking statute amendment status
|
|
18
|
+
- `list_laws` tool for browsing available legislation
|
|
19
|
+
- Contract tests with 12 golden test cases
|
|
20
|
+
- Drift detection with 6 stable provision anchors
|
|
21
|
+
- Health and version endpoints
|
|
22
|
+
- Vercel deployment (single tier bundled)
|
|
23
|
+
- npm package with stdio transport
|
|
24
|
+
- MCP Registry publishing
|
|
25
|
+
|
|
26
|
+
[Unreleased]: https://github.com/Ansvar-Systems/zimbabwe-law-mcp/compare/v1.0.0...HEAD
|
|
27
|
+
[1.0.0]: https://github.com/Ansvar-Systems/zimbabwe-law-mcp/releases/tag/v1.0.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work.
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship.
|
|
43
|
+
|
|
44
|
+
"Contribution" shall mean any work of authorship, including
|
|
45
|
+
the original version of the Work and any modifications or additions
|
|
46
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
47
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
48
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
49
|
+
the copyright owner.
|
|
50
|
+
|
|
51
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
52
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
53
|
+
subsequently incorporated within the Work.
|
|
54
|
+
|
|
55
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
56
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
57
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
58
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
59
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
60
|
+
Work and such Derivative Works in Source or Object form.
|
|
61
|
+
|
|
62
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
63
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
64
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
65
|
+
(except as stated in this section) patent license to make, have made,
|
|
66
|
+
use, offer to sell, sell, import, and otherwise transfer the Work.
|
|
67
|
+
|
|
68
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
69
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
70
|
+
modifications, and in Source or Object form, provided that You
|
|
71
|
+
meet the following conditions:
|
|
72
|
+
|
|
73
|
+
(a) You must give any other recipients of the Work or
|
|
74
|
+
Derivative Works a copy of this License; and
|
|
75
|
+
|
|
76
|
+
(b) You must cause any modified files to carry prominent notices
|
|
77
|
+
stating that You changed the files; and
|
|
78
|
+
|
|
79
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
80
|
+
that You distribute, all copyright, patent, trademark, and
|
|
81
|
+
attribution notices from the Source form of the Work; and
|
|
82
|
+
|
|
83
|
+
(d) If the Work includes a "NOTICE" text file, You must include
|
|
84
|
+
a readable copy of the attribution notices contained
|
|
85
|
+
within such NOTICE file.
|
|
86
|
+
|
|
87
|
+
5. Submission of Contributions.
|
|
88
|
+
|
|
89
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
90
|
+
names, trademarks, service marks, or product names of the Licensor.
|
|
91
|
+
|
|
92
|
+
7. Disclaimer of Warranty.
|
|
93
|
+
|
|
94
|
+
8. Limitation of Liability.
|
|
95
|
+
|
|
96
|
+
9. Accepting Warranty or Additional Liability.
|
|
97
|
+
|
|
98
|
+
Copyright 2024 Ansvar Systems AB
|
|
99
|
+
|
|
100
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
101
|
+
you may not use this file except in compliance with the License.
|
|
102
|
+
You may obtain a copy of the License at
|
|
103
|
+
|
|
104
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
105
|
+
|
|
106
|
+
Unless required by applicable law or agreed to in writing, software
|
|
107
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
108
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
109
|
+
See the License for the specific language governing permissions and
|
|
110
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Zimbabwe Law MCP
|
|
2
|
+
|
|
3
|
+
[](https://github.com/Ansvar-Systems/zimbabwe-law-mcp/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@ansvar/zimbabwe-law-mcp)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://securityscorecards.dev/viewer/?uri=github.com/Ansvar-Systems/zimbabwe-law-mcp)
|
|
7
|
+
[](https://registry.modelcontextprotocol.io/)
|
|
8
|
+
|
|
9
|
+
A Model Context Protocol (MCP) server providing full-text search and structured access to Zimbabwean legislation, including the Cyber and Data Protection Act (2021), Postal and Telecommunications Act, AIPPA, Criminal Law Act, Companies Act, and more.
|
|
10
|
+
|
|
11
|
+
> **Note:** Zimbabwe's Cyber and Data Protection Act (2021) is one of Africa's most comprehensive pieces of legislation in this domain, covering data protection, cybersecurity, e-commerce, and cybercrime in a single act. It established the Postal and Telecommunications Regulatory Authority of Zimbabwe (POTRAZ) as the data protection authority.
|
|
12
|
+
|
|
13
|
+
## Deployment Tier
|
|
14
|
+
|
|
15
|
+
**SMALL** -- single tier, bundled database.
|
|
16
|
+
|
|
17
|
+
Zimbabwe has a relatively small legal corpus compared to larger common-law jurisdictions. All legislation and selected case law fit within a single bundled SQLite database.
|
|
18
|
+
|
|
19
|
+
| Tier | DB Size | Includes | Transport |
|
|
20
|
+
|------|---------|----------|-----------|
|
|
21
|
+
| **Bundled (single tier)** | ~60-100 MB | All Acts of Parliament, Statutory Instruments, selected case law | stdio (npm) |
|
|
22
|
+
|
|
23
|
+
## Data Sources
|
|
24
|
+
|
|
25
|
+
| Source | Authority | Method | Update Frequency | License | Coverage |
|
|
26
|
+
|--------|-----------|--------|-----------------|---------|----------|
|
|
27
|
+
| [ZimLII](https://zimlii.org) | ZimLII / AfricanLII | HTML Scrape | Weekly | Free Access | All Acts of Parliament, Statutory Instruments, selected case law |
|
|
28
|
+
| [Parliament of Zimbabwe](https://www.parlzim.gov.zw) | Parliament of Zimbabwe | HTML Scrape | On change | Government Public Domain | Bills, enacted Acts, Hansard |
|
|
29
|
+
| [Veritas Zimbabwe](https://www.veritaszim.net) | Veritas Zimbabwe | HTML Scrape | Weekly | Free Access (Civil Society) | Government Gazette mirrors, legislative analysis |
|
|
30
|
+
|
|
31
|
+
> Full provenance metadata: [`sources.yml`](./sources.yml)
|
|
32
|
+
|
|
33
|
+
## Key Legislation Covered
|
|
34
|
+
|
|
35
|
+
| Act | Identifier | Domain |
|
|
36
|
+
|-----|-----------|--------|
|
|
37
|
+
| **Cyber and Data Protection Act** | Act 5 of 2021 | Data protection, cybersecurity, cybercrime, e-commerce |
|
|
38
|
+
| **Postal and Telecommunications Act** | Chapter 12:05 | Telecommunications regulation, POTRAZ authority |
|
|
39
|
+
| **Access to Information and Protection of Privacy Act (AIPPA)** | Act 5 of 2002 | Access to information, privacy |
|
|
40
|
+
| **Criminal Law (Codification and Reform) Act** | Chapter 9:23 | Criminal offences including computer-related crimes |
|
|
41
|
+
| **Companies and Other Business Entities Act** | Chapter 24:31 | Corporate governance, company formation |
|
|
42
|
+
| **Interception of Communications Act** | Act 6 of 2007 | Lawful interception, communications surveillance |
|
|
43
|
+
| **Electronic Transactions Act** | Act 16 of 2004 | Electronic signatures, electronic contracts |
|
|
44
|
+
|
|
45
|
+
## Quick Start
|
|
46
|
+
|
|
47
|
+
### Install from npm
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm install -g @ansvar/zimbabwe-law-mcp
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Run via npx (no install)
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx @ansvar/zimbabwe-law-mcp
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Configure in Claude Desktop
|
|
60
|
+
|
|
61
|
+
Add to your `claude_desktop_config.json`:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"mcpServers": {
|
|
66
|
+
"zimbabwe-law": {
|
|
67
|
+
"command": "npx",
|
|
68
|
+
"args": ["-y", "@ansvar/zimbabwe-law-mcp"]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Build from Source
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
git clone https://github.com/Ansvar-Systems/zimbabwe-law-mcp.git
|
|
78
|
+
cd zimbabwe-law-mcp
|
|
79
|
+
npm install
|
|
80
|
+
npm run build
|
|
81
|
+
npm run build:db # Build the full database
|
|
82
|
+
npm start # Start the server
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Tools
|
|
86
|
+
|
|
87
|
+
| Tool | Description |
|
|
88
|
+
|------|-------------|
|
|
89
|
+
| `get_provision` | Retrieve a specific section/article from a Zimbabwean Act by law identifier and article number |
|
|
90
|
+
| `search_legislation` | Full-text search across all Zimbabwean legislation |
|
|
91
|
+
| `list_acts` | List all available Acts of Parliament in the database |
|
|
92
|
+
| `get_act_structure` | Get the table of contents / structure of a specific Act |
|
|
93
|
+
| `get_provision_eu_basis` | Cross-reference a Zimbabwean provision with related EU/international instruments (GDPR, Budapest Convention) |
|
|
94
|
+
|
|
95
|
+
## Contract Tests
|
|
96
|
+
|
|
97
|
+
This MCP includes 12 golden contract tests covering:
|
|
98
|
+
|
|
99
|
+
- **Article retrieval** (3 tests): CDPA Section 3, CDPA Section 29, Companies Act Section 1
|
|
100
|
+
- **Search** (3 tests): personal data, cybercrime, electronic transaction
|
|
101
|
+
- **Citation roundtrip** (2 tests): CDPA citation URL, AIPPA citation
|
|
102
|
+
- **Cross-reference** (2 tests): GDPR relationship, Budapest Convention relationship
|
|
103
|
+
- **Negative cases** (2 tests): non-existent Act, malformed section number
|
|
104
|
+
|
|
105
|
+
Run contract tests:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npm run test:contract
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Drift Detection
|
|
112
|
+
|
|
113
|
+
Golden hashes track 6 stable upstream provisions to detect silent content changes:
|
|
114
|
+
|
|
115
|
+
- Constitution of Zimbabwe (2013), Section 1
|
|
116
|
+
- Cyber and Data Protection Act 2021, Section 2 (definitions)
|
|
117
|
+
- Cyber and Data Protection Act 2021, Section 3 (objects)
|
|
118
|
+
- AIPPA Section 1
|
|
119
|
+
- Criminal Law Act Section 1
|
|
120
|
+
- Postal and Telecommunications Act Section 1
|
|
121
|
+
|
|
122
|
+
Run drift detection:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
npm run drift:detect
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Development
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
npm install # Install dependencies
|
|
132
|
+
npm run build # Compile TypeScript
|
|
133
|
+
npm test # Run all tests
|
|
134
|
+
npm run test:contract # Run contract tests only
|
|
135
|
+
npm run lint # Lint source code
|
|
136
|
+
npm run drift:detect # Check for upstream changes
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Security
|
|
140
|
+
|
|
141
|
+
See [SECURITY.md](.github/SECURITY.md) for vulnerability disclosure policy.
|
|
142
|
+
|
|
143
|
+
Report data errors: [Open an issue](https://github.com/Ansvar-Systems/zimbabwe-law-mcp/issues/new?template=data-error.md)
|
|
144
|
+
|
|
145
|
+
## License
|
|
146
|
+
|
|
147
|
+
Apache-2.0 -- see [LICENSE](LICENSE).
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
Built by [Ansvar Systems](https://ansvar.eu) -- Cybersecurity compliance through AI-powered legal intelligence.
|
package/data/.gitkeep
ADDED
|
File without changes
|
package/data/database.db
ADDED
|
Binary file
|