@ansvar/uae-law-mcp 1.1.2
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/LICENSE +190 -0
- package/README.md +359 -0
- package/data/database.db +0 -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 +40 -0
- package/dist/tools/about.d.ts.map +1 -0
- package/dist/tools/about.js +72 -0
- package/dist/tools/about.js.map +1 -0
- package/dist/tools/build-legal-stance.d.ts +24 -0
- package/dist/tools/build-legal-stance.d.ts.map +1 -0
- package/dist/tools/build-legal-stance.js +52 -0
- package/dist/tools/build-legal-stance.js.map +1 -0
- package/dist/tools/check-currency.d.ts +22 -0
- package/dist/tools/check-currency.d.ts.map +1 -0
- package/dist/tools/check-currency.js +44 -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 +38 -0
- package/dist/tools/format-citation.js.map +1 -0
- package/dist/tools/get-eu-basis.d.ts +26 -0
- package/dist/tools/get-eu-basis.d.ts.map +1 -0
- package/dist/tools/get-eu-basis.js +57 -0
- package/dist/tools/get-eu-basis.js.map +1 -0
- package/dist/tools/get-provision-eu-basis.d.ts +21 -0
- package/dist/tools/get-provision-eu-basis.d.ts.map +1 -0
- package/dist/tools/get-provision-eu-basis.js +46 -0
- package/dist/tools/get-provision-eu-basis.js.map +1 -0
- package/dist/tools/get-provision.d.ts +27 -0
- package/dist/tools/get-provision.d.ts.map +1 -0
- package/dist/tools/get-provision.js +88 -0
- package/dist/tools/get-provision.js.map +1 -0
- package/dist/tools/get-uae-implementations.d.ts +29 -0
- package/dist/tools/get-uae-implementations.d.ts.map +1 -0
- package/dist/tools/get-uae-implementations.js +50 -0
- package/dist/tools/get-uae-implementations.js.map +1 -0
- package/dist/tools/list-sources.d.ts +26 -0
- package/dist/tools/list-sources.d.ts.map +1 -0
- package/dist/tools/list-sources.js +63 -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 +387 -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 +27 -0
- package/dist/tools/search-legislation.d.ts.map +1 -0
- package/dist/tools/search-legislation.js +60 -0
- package/dist/tools/search-legislation.js.map +1 -0
- package/dist/tools/validate-citation.d.ts +29 -0
- package/dist/tools/validate-citation.d.ts.map +1 -0
- package/dist/tools/validate-citation.js +129 -0
- package/dist/tools/validate-citation.js.map +1 -0
- package/dist/tools/validate-eu-compliance.d.ts +22 -0
- package/dist/tools/validate-eu-compliance.d.ts.map +1 -0
- package/dist/tools/validate-eu-compliance.js +103 -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 +21 -0
- package/dist/utils/fts-query.d.ts.map +1 -0
- package/dist/utils/fts-query.js +49 -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 +25 -0
- package/dist/utils/metadata.js.map +1 -0
- package/dist/utils/statute-id.d.ts +21 -0
- package/dist/utils/statute-id.d.ts.map +1 -0
- package/dist/utils/statute-id.js +51 -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 +80 -0
- package/sources.yml +100 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
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
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding any notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 Ansvar Systems
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
# UAE Law MCP Server
|
|
2
|
+
|
|
3
|
+
**The MOJ alternative for the AI age.**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@ansvar/uae-law-mcp)
|
|
6
|
+
[](https://registry.modelcontextprotocol.io)
|
|
7
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
8
|
+
[](https://github.com/Ansvar-Systems/UAE-law-mcp)
|
|
9
|
+
[](https://github.com/Ansvar-Systems/UAE-law-mcp/actions/workflows/ci.yml)
|
|
10
|
+
|
|
11
|
+
Query **UAE legislation** -- covering data protection, cybersecurity, corporate law, and more -- directly from Claude, Cursor, or any MCP-compatible client.
|
|
12
|
+
|
|
13
|
+
If you're building legal tech, compliance tools, or doing UAE legal research, this is your verified reference database.
|
|
14
|
+
|
|
15
|
+
Built by [Ansvar Systems](https://ansvar.eu) -- Stockholm, Sweden
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Why This Exists
|
|
20
|
+
|
|
21
|
+
UAE legal research is scattered across official government databases, commercial legal platforms, and institutional archives. Whether you're:
|
|
22
|
+
- A **lawyer** validating citations in a brief or contract
|
|
23
|
+
- A **compliance officer** checking if a statute is still in force
|
|
24
|
+
- A **legal tech developer** building tools on UAE law
|
|
25
|
+
- A **researcher** tracing legislative history
|
|
26
|
+
|
|
27
|
+
...you shouldn't need dozens of browser tabs and manual PDF cross-referencing. Ask Claude. Get the exact provision. With context.
|
|
28
|
+
|
|
29
|
+
This MCP server makes UAE law **searchable, cross-referenceable, and AI-readable**.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
### Use Remotely (No Install Needed)
|
|
36
|
+
|
|
37
|
+
> Connect directly to the hosted version -- zero dependencies, nothing to install.
|
|
38
|
+
|
|
39
|
+
**Endpoint:** `https://uae-law-mcp.vercel.app/mcp`
|
|
40
|
+
|
|
41
|
+
| Client | How to Connect |
|
|
42
|
+
|--------|---------------|
|
|
43
|
+
| **Claude.ai** | Settings > Connectors > Add Integration > paste URL |
|
|
44
|
+
| **Claude Code** | `claude mcp add uae-law --transport http https://uae-law-mcp.vercel.app/mcp` |
|
|
45
|
+
| **Claude Desktop** | Add to config (see below) |
|
|
46
|
+
| **GitHub Copilot** | Add to VS Code settings (see below) |
|
|
47
|
+
|
|
48
|
+
**Claude Desktop** -- add to `claude_desktop_config.json`:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"mcpServers": {
|
|
53
|
+
"uae-law": {
|
|
54
|
+
"type": "url",
|
|
55
|
+
"url": "https://uae-law-mcp.vercel.app/mcp"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**GitHub Copilot** -- add to VS Code `settings.json`:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"github.copilot.chat.mcp.servers": {
|
|
66
|
+
"uae-law": {
|
|
67
|
+
"type": "http",
|
|
68
|
+
"url": "https://uae-law-mcp.vercel.app/mcp"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Use Locally (npm)
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npx @ansvar/uae-law-mcp
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Claude Desktop** -- add to `claude_desktop_config.json`:
|
|
81
|
+
|
|
82
|
+
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
83
|
+
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"mcpServers": {
|
|
88
|
+
"uae-law": {
|
|
89
|
+
"command": "npx",
|
|
90
|
+
"args": ["-y", "@ansvar/uae-law-mcp"]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Cursor / VS Code:**
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"mcp.servers": {
|
|
101
|
+
"uae-law": {
|
|
102
|
+
"command": "npx",
|
|
103
|
+
"args": ["-y", "@ansvar/uae-law-mcp"]
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Example Queries
|
|
112
|
+
|
|
113
|
+
Once connected, just ask naturally:
|
|
114
|
+
|
|
115
|
+
- *"What does the UAE data protection law say about consent?"*
|
|
116
|
+
- *"Search for cybersecurity requirements in UAE legislation"*
|
|
117
|
+
- *"Is this statute still in force?"*
|
|
118
|
+
- *"Find provisions about personal data in UAE law"*
|
|
119
|
+
- *"What EU directives does this UAE law implement?"*
|
|
120
|
+
- *"Which UAE laws implement the GDPR?"*
|
|
121
|
+
- *"Validate this legal citation"*
|
|
122
|
+
- *"Build a legal stance on data breach notification requirements"*
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Key Legislation Covered
|
|
127
|
+
|
|
128
|
+
| Law | Year | Significance |
|
|
129
|
+
|-----|------|-------------|
|
|
130
|
+
| **Federal Decree-Law No. 45/2021 (PDPL)** | 2021 | Comprehensive Personal Data Protection Law; overarching federal framework; UAE Data Office supervises implementation |
|
|
131
|
+
| **Federal Decree-Law No. 34/2021** | 2021 | Combatting Rumours and Cybercrimes; replaced the 2012 cybercrimes law with expanded digital offences |
|
|
132
|
+
| **Federal Decree-Law No. 46/2021** | 2021 | Electronic Transactions and Trust Services; governs e-signatures, e-commerce, and digital trust services |
|
|
133
|
+
| **Federal Law No. 2/2015** | 2015 | Commercial Companies Law; primary corporate governance framework |
|
|
134
|
+
| **DIFC Data Protection Law (Law No. 5/2020)** | 2020 | DIFC-specific data protection regime; common-law framework closely modeled on GDPR |
|
|
135
|
+
| **ADGM Data Protection Regulations 2021** | 2021 | ADGM-specific data protection regime; common-law framework aligned with international standards |
|
|
136
|
+
| **UAE Constitution** | 1971 (amended) | Foundational law establishing the federation of the emirates |
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Deployment Tier
|
|
141
|
+
|
|
142
|
+
**SMALL** -- Single tier, bundled SQLite database shipped with the npm package.
|
|
143
|
+
|
|
144
|
+
**Estimated database size:** ~80-150 MB (full corpus of UAE federal legislation plus DIFC and ADGM free zone laws)
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Available Tools (13)
|
|
149
|
+
|
|
150
|
+
### Core Legal Research Tools (8)
|
|
151
|
+
|
|
152
|
+
| Tool | Description |
|
|
153
|
+
|------|-------------|
|
|
154
|
+
| `search_legislation` | FTS5 full-text search across all provisions with BM25 ranking |
|
|
155
|
+
| `get_provision` | Retrieve specific provision by statute + chapter/section |
|
|
156
|
+
| `check_currency` | Check if statute is in force, amended, or repealed |
|
|
157
|
+
| `validate_citation` | Validate citation against database (zero-hallucination check) |
|
|
158
|
+
| `build_legal_stance` | Aggregate citations from statutes for a legal topic |
|
|
159
|
+
| `format_citation` | Format citations per UAE conventions (full/short/pinpoint) |
|
|
160
|
+
| `list_sources` | List all available statutes with metadata |
|
|
161
|
+
| `about` | Server info, capabilities, and coverage summary |
|
|
162
|
+
|
|
163
|
+
### EU/International Law Integration Tools (5)
|
|
164
|
+
|
|
165
|
+
| Tool | Description |
|
|
166
|
+
|------|-------------|
|
|
167
|
+
| `get_eu_basis` | Get EU directives/regulations for UAE statute |
|
|
168
|
+
| `get_uae_implementations` | Find UAE laws implementing EU act |
|
|
169
|
+
| `search_eu_implementations` | Search EU documents with UAE implementation counts |
|
|
170
|
+
| `get_provision_eu_basis` | Get EU law references for specific provision |
|
|
171
|
+
| `validate_eu_compliance` | Check implementation status of EU directives |
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Why This Works
|
|
176
|
+
|
|
177
|
+
**Verbatim Source Text (No LLM Processing):**
|
|
178
|
+
- All statute text is ingested from official UAE government sources
|
|
179
|
+
- Provisions are returned **unchanged** from SQLite FTS5 database rows
|
|
180
|
+
- Zero LLM summarization or paraphrasing -- the database contains regulation text, not AI interpretations
|
|
181
|
+
|
|
182
|
+
**Smart Context Management:**
|
|
183
|
+
- Search returns ranked provisions with BM25 scoring (safe for context)
|
|
184
|
+
- Provision retrieval gives exact text by statute identifier + chapter/section
|
|
185
|
+
- Cross-references help navigate without loading everything at once
|
|
186
|
+
|
|
187
|
+
**Technical Architecture:**
|
|
188
|
+
```
|
|
189
|
+
Official Sources --> Parse --> SQLite --> FTS5 snippet() --> MCP response
|
|
190
|
+
^ ^
|
|
191
|
+
Provision parser Verbatim database query
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Traditional Research vs. This MCP
|
|
195
|
+
|
|
196
|
+
| Traditional Approach | This MCP Server |
|
|
197
|
+
|---------------------|-----------------|
|
|
198
|
+
| Search official databases by statute number | Search by plain language |
|
|
199
|
+
| Navigate multi-chapter statutes manually | Get the exact provision with context |
|
|
200
|
+
| Manual cross-referencing between laws | `build_legal_stance` aggregates across sources |
|
|
201
|
+
| "Is this statute still in force?" --> check manually | `check_currency` tool --> answer in seconds |
|
|
202
|
+
| Find EU basis --> dig through EUR-Lex | `get_eu_basis` --> linked EU directives instantly |
|
|
203
|
+
| No API, no integration | MCP protocol --> AI-native |
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Data Sources & Freshness
|
|
208
|
+
|
|
209
|
+
All content is sourced from authoritative UAE legal databases:
|
|
210
|
+
|
|
211
|
+
- **[Ministry of Justice](https://www.moj.gov.ae)** -- Official UAE government legal database
|
|
212
|
+
|
|
213
|
+
**Verified data only** -- every citation is validated against official sources. Zero LLM-generated content.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Security
|
|
218
|
+
|
|
219
|
+
This project uses multiple layers of automated security scanning:
|
|
220
|
+
|
|
221
|
+
| Scanner | What It Does | Schedule |
|
|
222
|
+
|---------|-------------|----------|
|
|
223
|
+
| **CodeQL** | Static analysis for security vulnerabilities | Weekly + PRs |
|
|
224
|
+
| **Semgrep** | SAST scanning (OWASP top 10, secrets, TypeScript) | Every push |
|
|
225
|
+
| **Gitleaks** | Secret detection across git history | Every push |
|
|
226
|
+
| **Trivy** | CVE scanning on filesystem and npm dependencies | Daily |
|
|
227
|
+
| **Socket.dev** | Supply chain attack detection | PRs |
|
|
228
|
+
| **Dependabot** | Automated dependency updates | Weekly |
|
|
229
|
+
|
|
230
|
+
See [SECURITY.md](SECURITY.md) for the full policy and vulnerability reporting.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Important Disclaimers
|
|
235
|
+
|
|
236
|
+
### Legal Advice
|
|
237
|
+
|
|
238
|
+
> **THIS TOOL IS NOT LEGAL ADVICE**
|
|
239
|
+
>
|
|
240
|
+
> Statute text is sourced from official UAE government publications. However:
|
|
241
|
+
> - This is a **research tool**, not a substitute for professional legal counsel
|
|
242
|
+
> - **Court case coverage is limited** -- do not rely solely on this for case law research
|
|
243
|
+
> - **Verify critical citations** against primary sources for court filings
|
|
244
|
+
> - **EU cross-references** are extracted from statute text, not EUR-Lex full text
|
|
245
|
+
|
|
246
|
+
**Before using professionally, read:** [DISCLAIMER.md](DISCLAIMER.md) | [SECURITY.md](SECURITY.md)
|
|
247
|
+
|
|
248
|
+
### Client Confidentiality
|
|
249
|
+
|
|
250
|
+
Queries go through the Claude API. For privileged or confidential matters, use on-premise deployment.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Development
|
|
255
|
+
|
|
256
|
+
### Setup
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
git clone https://github.com/Ansvar-Systems/UAE-law-mcp
|
|
260
|
+
cd UAE-law-mcp
|
|
261
|
+
npm install
|
|
262
|
+
npm run build
|
|
263
|
+
npm test
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Running Locally
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
npm run dev # Start MCP server
|
|
270
|
+
npx @anthropic/mcp-inspector node dist/index.js # Test with MCP Inspector
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Related Projects: Complete Compliance Suite
|
|
276
|
+
|
|
277
|
+
This server is part of **Ansvar's Compliance Suite** -- MCP servers that work together for end-to-end compliance coverage:
|
|
278
|
+
|
|
279
|
+
### [@ansvar/eu-regulations-mcp](https://github.com/Ansvar-Systems/EU_compliance_MCP)
|
|
280
|
+
**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`
|
|
281
|
+
|
|
282
|
+
### [@ansvar/us-regulations-mcp](https://github.com/Ansvar-Systems/US_Compliance_MCP)
|
|
283
|
+
**Query US federal and state compliance laws** -- HIPAA, CCPA, SOX, GLBA, FERPA, and more. `npx @ansvar/us-regulations-mcp`
|
|
284
|
+
|
|
285
|
+
### [@ansvar/security-controls-mcp](https://github.com/Ansvar-Systems/security-controls-mcp)
|
|
286
|
+
**Query 261 security frameworks** -- ISO 27001, NIST CSF, SOC 2, CIS Controls, SCF, and more. `npx @ansvar/security-controls-mcp`
|
|
287
|
+
|
|
288
|
+
### [@ansvar/automotive-cybersecurity-mcp](https://github.com/Ansvar-Systems/Automotive-MCP)
|
|
289
|
+
**Query UNECE R155/R156 and ISO 21434** -- Automotive cybersecurity compliance. `npx @ansvar/automotive-cybersecurity-mcp`
|
|
290
|
+
|
|
291
|
+
**30+ national law MCPs** covering Australia, Brazil, Canada, China, Denmark, Finland, France, Germany, Ghana, Iceland, India, Ireland, Israel, Italy, Japan, Kenya, Netherlands, Nigeria, Norway, Singapore, Slovenia, South Korea, Sweden, Switzerland, Thailand, UAE, UK, and more.
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Contributing
|
|
296
|
+
|
|
297
|
+
Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
298
|
+
|
|
299
|
+
Priority areas:
|
|
300
|
+
- Court case law expansion
|
|
301
|
+
- EU cross-reference improvements
|
|
302
|
+
- Historical statute versions and amendment tracking
|
|
303
|
+
- Additional statutory instruments and regulations
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## Roadmap
|
|
308
|
+
|
|
309
|
+
- [x] Core statute database with FTS5 search
|
|
310
|
+
- [x] EU/international law cross-references
|
|
311
|
+
- [x] Vercel Streamable HTTP deployment
|
|
312
|
+
- [x] npm package publication
|
|
313
|
+
- [ ] Court case law expansion
|
|
314
|
+
- [ ] Historical statute versions (amendment tracking)
|
|
315
|
+
- [ ] Preparatory works / explanatory memoranda
|
|
316
|
+
- [ ] Lower court and tribunal decisions
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Citation
|
|
321
|
+
|
|
322
|
+
If you use this MCP server in academic research:
|
|
323
|
+
|
|
324
|
+
```bibtex
|
|
325
|
+
@software{uae_law_mcp_2025,
|
|
326
|
+
author = {Ansvar Systems AB},
|
|
327
|
+
title = {UAE Law MCP Server: AI-Powered Legal Research Tool},
|
|
328
|
+
year = {2025},
|
|
329
|
+
url = {https://github.com/Ansvar-Systems/UAE-law-mcp},
|
|
330
|
+
note = {UAE legal database with full-text search and EU cross-references}
|
|
331
|
+
}
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## License
|
|
337
|
+
|
|
338
|
+
Apache License 2.0. See [LICENSE](./LICENSE) for details.
|
|
339
|
+
|
|
340
|
+
### Data Licenses
|
|
341
|
+
|
|
342
|
+
- **Statutes & Legislation:** UAE Government (public domain)
|
|
343
|
+
- **EU Metadata:** EUR-Lex (EU public domain)
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## About Ansvar Systems
|
|
348
|
+
|
|
349
|
+
We build AI-accelerated compliance and legal research tools for the global market. This MCP server started as our internal reference tool -- turns out everyone building compliance tools has the same research frustrations.
|
|
350
|
+
|
|
351
|
+
So we're open-sourcing it.
|
|
352
|
+
|
|
353
|
+
**[ansvar.eu](https://ansvar.eu)** -- Stockholm, Sweden
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
<p align="center">
|
|
358
|
+
<sub>Built with care in Stockholm, Sweden</sub>
|
|
359
|
+
</p>
|
package/data/database.db
ADDED
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime capability detection for UAE Law MCP.
|
|
3
|
+
* Detects which database tables are available to enable/disable features.
|
|
4
|
+
*/
|
|
5
|
+
import type Database from '@ansvar/mcp-sqlite';
|
|
6
|
+
export type Capability = 'core_legislation' | 'eu_references' | 'case_law' | 'preparatory_works';
|
|
7
|
+
export declare function detectCapabilities(db: InstanceType<typeof Database>): Set<Capability>;
|
|
8
|
+
export interface DbMetadata {
|
|
9
|
+
tier: string;
|
|
10
|
+
schema_version: string;
|
|
11
|
+
built_at?: string;
|
|
12
|
+
builder?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function readDbMetadata(db: InstanceType<typeof Database>): DbMetadata;
|
|
15
|
+
export declare function upgradeMessage(feature: string): string;
|
|
16
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAE/C,MAAM,MAAM,UAAU,GAClB,kBAAkB,GAClB,eAAe,GACf,UAAU,GACV,mBAAmB,CAAC;AASxB,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,YAAY,CAAC,OAAO,QAAQ,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,CAcrF;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,YAAY,CAAC,OAAO,QAAQ,CAAC,GAAG,UAAU,CAgB5E;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime capability detection for UAE Law MCP.
|
|
3
|
+
* Detects which database tables are available to enable/disable features.
|
|
4
|
+
*/
|
|
5
|
+
const TABLE_MAP = {
|
|
6
|
+
core_legislation: ['legal_documents', 'legal_provisions', 'provisions_fts'],
|
|
7
|
+
eu_references: ['eu_documents', 'eu_references'],
|
|
8
|
+
case_law: ['case_law'],
|
|
9
|
+
preparatory_works: ['preparatory_works'],
|
|
10
|
+
};
|
|
11
|
+
export function detectCapabilities(db) {
|
|
12
|
+
const caps = new Set();
|
|
13
|
+
const tables = new Set(db.prepare("SELECT name FROM sqlite_master WHERE type='table'").all()
|
|
14
|
+
.map(r => r.name));
|
|
15
|
+
for (const [cap, required] of Object.entries(TABLE_MAP)) {
|
|
16
|
+
if (required.every(t => tables.has(t))) {
|
|
17
|
+
caps.add(cap);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return caps;
|
|
21
|
+
}
|
|
22
|
+
export function readDbMetadata(db) {
|
|
23
|
+
const meta = {};
|
|
24
|
+
try {
|
|
25
|
+
const rows = db.prepare('SELECT key, value FROM db_metadata').all();
|
|
26
|
+
for (const row of rows) {
|
|
27
|
+
meta[row.key] = row.value;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
// db_metadata table may not exist
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
tier: meta.tier ?? 'free',
|
|
35
|
+
schema_version: meta.schema_version ?? '1.0',
|
|
36
|
+
built_at: meta.built_at,
|
|
37
|
+
builder: meta.builder,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export function upgradeMessage(feature) {
|
|
41
|
+
return `The "${feature}" feature requires a professional-tier database. Contact hello@ansvar.ai for access.`;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=capabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,MAAM,SAAS,GAAiC;IAC9C,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,CAAC;IAC3E,aAAa,EAAE,CAAC,cAAc,EAAE,eAAe,CAAC;IAChD,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,iBAAiB,EAAE,CAAC,mBAAmB,CAAC;CACzC,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,EAAiC;IAClE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAc,CAAC;IACnC,MAAM,MAAM,GAAG,IAAI,GAAG,CACnB,EAAE,CAAC,OAAO,CAAC,mDAAmD,CAAC,CAAC,GAAG,EAAyB;SAC1F,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CACpB,CAAC;IAEF,KAAK,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QACxD,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACvC,IAAI,CAAC,GAAG,CAAC,GAAiB,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AASD,MAAM,UAAU,cAAc,CAAC,EAAiC;IAC9D,MAAM,IAAI,GAA2B,EAAE,CAAC;IACxC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,CAAC,oCAAoC,CAAC,CAAC,GAAG,EAAsC,CAAC;QACxG,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC;QAC5B,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,kCAAkC;IACpC,CAAC;IACD,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,MAAM;QACzB,cAAc,EAAE,IAAI,CAAC,cAAc,IAAI,KAAK;QAC5C,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,OAAO,EAAE,IAAI,CAAC,OAAO;KACtB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,OAAO,QAAQ,OAAO,sFAAsF,CAAC;AAC/G,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const SERVER_NAME = "uae-law-mcp";
|
|
2
|
+
export declare const SERVER_VERSION = "1.1.0";
|
|
3
|
+
export declare const SERVER_LABEL = "UAE Law MCP";
|
|
4
|
+
export declare const PACKAGE_NAME = "@ansvar/uae-law-mcp";
|
|
5
|
+
export declare const REPOSITORY_URL = "https://github.com/Ansvar-Systems/uae-law-mcp";
|
|
6
|
+
export declare const DB_ENV_VAR = "UAE_LAW_DB_PATH";
|
|
7
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,cAAc,UAAU,CAAC;AACtC,eAAO,MAAM,YAAY,gBAAgB,CAAC;AAC1C,eAAO,MAAM,YAAY,wBAAwB,CAAC;AAClD,eAAO,MAAM,cAAc,kDAAkD,CAAC;AAC9E,eAAO,MAAM,UAAU,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const SERVER_NAME = 'uae-law-mcp';
|
|
2
|
+
export const SERVER_VERSION = '1.1.0';
|
|
3
|
+
export const SERVER_LABEL = 'UAE Law MCP';
|
|
4
|
+
export const PACKAGE_NAME = '@ansvar/uae-law-mcp';
|
|
5
|
+
export const REPOSITORY_URL = 'https://github.com/Ansvar-Systems/uae-law-mcp';
|
|
6
|
+
export const DB_ENV_VAR = 'UAE_LAW_DB_PATH';
|
|
7
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AACzC,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AACtC,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAC1C,MAAM,CAAC,MAAM,YAAY,GAAG,qBAAqB,CAAC;AAClD,MAAM,CAAC,MAAM,cAAc,GAAG,+CAA+C,CAAC;AAC9E,MAAM,CAAC,MAAM,UAAU,GAAG,iBAAiB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;GAIG"}
|