meridian-mcp 0.3.0__tar.gz
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.
- meridian_mcp-0.3.0/.github/brand/logo-full.svg +63 -0
- meridian_mcp-0.3.0/.gitignore +36 -0
- meridian_mcp-0.3.0/LICENSE +201 -0
- meridian_mcp-0.3.0/PKG-INFO +321 -0
- meridian_mcp-0.3.0/README.md +288 -0
- meridian_mcp-0.3.0/pyproject.toml +51 -0
- meridian_mcp-0.3.0/requirements.txt +17 -0
- meridian_mcp-0.3.0/src/meridian/__init__.py +0 -0
- meridian_mcp-0.3.0/src/meridian/ast_parser.py +261 -0
- meridian_mcp-0.3.0/src/meridian/cache.py +106 -0
- meridian_mcp-0.3.0/src/meridian/cli.py +162 -0
- meridian_mcp-0.3.0/src/meridian/config.py +288 -0
- meridian_mcp-0.3.0/src/meridian/evaluator.py +334 -0
- meridian_mcp-0.3.0/src/meridian/licensing.py +115 -0
- meridian_mcp-0.3.0/src/meridian/models.py +216 -0
- meridian_mcp-0.3.0/src/meridian/prompts.py +285 -0
- meridian_mcp-0.3.0/src/meridian/scanner.py +146 -0
- meridian_mcp-0.3.0/src/meridian/security.py +73 -0
- meridian_mcp-0.3.0/src/meridian/server.py +389 -0
- meridian_mcp-0.3.0/tests/sample_bad_app.py +59 -0
- meridian_mcp-0.3.0/tests/test_core.py +346 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 200" width="800" height="200">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="arcGradD" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" style="stop-color:#818CF8"/>
|
|
5
|
+
<stop offset="100%" style="stop-color:#A78BFA"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="dotGradD" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
8
|
+
<stop offset="0%" style="stop-color:#C4B5FD"/>
|
|
9
|
+
<stop offset="100%" style="stop-color:#818CF8"/>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
<filter id="glow2" x="-30%" y="-30%" width="160%" height="160%">
|
|
12
|
+
<feGaussianBlur stdDeviation="4" result="blur"/>
|
|
13
|
+
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
|
|
14
|
+
</filter>
|
|
15
|
+
<radialGradient id="bgGlow" cx="50%" cy="50%" r="50%">
|
|
16
|
+
<stop offset="0%" style="stop-color:#1E1B4B;stop-opacity:1"/>
|
|
17
|
+
<stop offset="100%" style="stop-color:#0A0A14;stop-opacity:1"/>
|
|
18
|
+
</radialGradient>
|
|
19
|
+
</defs>
|
|
20
|
+
|
|
21
|
+
<!-- Dark background -->
|
|
22
|
+
<rect width="800" height="200" fill="url(#bgGlow)" rx="12"/>
|
|
23
|
+
|
|
24
|
+
<!-- Subtle grid dots in background -->
|
|
25
|
+
<circle cx="650" cy="40" r="1.5" fill="#6366F1" opacity="0.15"/>
|
|
26
|
+
<circle cx="680" cy="60" r="1.5" fill="#6366F1" opacity="0.1"/>
|
|
27
|
+
<circle cx="720" cy="35" r="1.5" fill="#6366F1" opacity="0.12"/>
|
|
28
|
+
<circle cx="700" cy="80" r="1" fill="#8B5CF6" opacity="0.1"/>
|
|
29
|
+
<circle cx="740" cy="60" r="1.5" fill="#6366F1" opacity="0.08"/>
|
|
30
|
+
<circle cx="760" cy="90" r="1" fill="#8B5CF6" opacity="0.1"/>
|
|
31
|
+
|
|
32
|
+
<!-- Outer circle -->
|
|
33
|
+
<circle cx="100" cy="100" r="62" fill="none" stroke="#818CF8" stroke-width="1.5" opacity="0.2"/>
|
|
34
|
+
|
|
35
|
+
<!-- Equator line -->
|
|
36
|
+
<line x1="38" y1="100" x2="162" y2="100" stroke="#818CF8" stroke-width="1.2" opacity="0.25"/>
|
|
37
|
+
|
|
38
|
+
<!-- Primary meridian arc — bright -->
|
|
39
|
+
<path d="M100 38 A62 62 0 0 1 100 162" fill="none" stroke="url(#arcGradD)" stroke-width="3.5" stroke-linecap="round" filter="url(#glow2)"/>
|
|
40
|
+
<path d="M100 38 A62 62 0 0 0 100 162" fill="none" stroke="#818CF8" stroke-width="1.2" opacity="0.2" stroke-linecap="round"/>
|
|
41
|
+
|
|
42
|
+
<!-- Side meridian arcs -->
|
|
43
|
+
<path d="M138 52 A62 62 0 0 1 62 148" fill="none" stroke="#A78BFA" stroke-width="1.8" opacity="0.4" stroke-linecap="round"/>
|
|
44
|
+
<path d="M62 52 A62 62 0 0 1 138 148" fill="none" stroke="#A78BFA" stroke-width="1.8" opacity="0.4" stroke-linecap="round"/>
|
|
45
|
+
|
|
46
|
+
<!-- North pole dot -->
|
|
47
|
+
<circle cx="100" cy="38" r="6" fill="url(#dotGradD)" filter="url(#glow2)"/>
|
|
48
|
+
|
|
49
|
+
<!-- Center dot -->
|
|
50
|
+
<circle cx="100" cy="100" r="3.5" fill="#818CF8" opacity="0.5"/>
|
|
51
|
+
|
|
52
|
+
<!-- MERIDIAN wordmark — white -->
|
|
53
|
+
<text x="188" y="115"
|
|
54
|
+
font-family="'Inter', 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif"
|
|
55
|
+
font-size="52" font-weight="700" letter-spacing="-1.5"
|
|
56
|
+
fill="#F0EFFE">MERIDIAN</text>
|
|
57
|
+
|
|
58
|
+
<!-- Tagline -->
|
|
59
|
+
<text x="190" y="140"
|
|
60
|
+
font-family="'Inter', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif"
|
|
61
|
+
font-size="13.5" font-weight="400" letter-spacing="4"
|
|
62
|
+
fill="#818CF8" opacity="0.9">AI COMPLIANCE INTELLIGENCE</text>
|
|
63
|
+
</svg>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.so
|
|
5
|
+
*.egg
|
|
6
|
+
*.egg-info/
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
.eggs/
|
|
10
|
+
|
|
11
|
+
# Virtual envs
|
|
12
|
+
.venv/
|
|
13
|
+
venv/
|
|
14
|
+
env/
|
|
15
|
+
|
|
16
|
+
# Meridian cache
|
|
17
|
+
~/.meridian/
|
|
18
|
+
|
|
19
|
+
# Secrets — NEVER commit these
|
|
20
|
+
.env
|
|
21
|
+
*.env
|
|
22
|
+
.env.local
|
|
23
|
+
|
|
24
|
+
# IDE
|
|
25
|
+
.vscode/
|
|
26
|
+
.idea/
|
|
27
|
+
*.swp
|
|
28
|
+
|
|
29
|
+
# Test artifacts
|
|
30
|
+
.pytest_cache/
|
|
31
|
+
.coverage
|
|
32
|
+
htmlcov/
|
|
33
|
+
|
|
34
|
+
# OS
|
|
35
|
+
.DS_Store
|
|
36
|
+
Thumbs.db
|
|
@@ -0,0 +1,201 @@
|
|
|
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 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 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 those 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
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: meridian-mcp
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Meridian — Local-first AI compliance scanner. DPDPA 2023 · RBI FREE-AI · SEBI AI/ML · EU AI Act. Works with any LLM provider.
|
|
5
|
+
Project-URL: Homepage, https://meridiancompliance.framer.website
|
|
6
|
+
Project-URL: Repository, https://github.com/KNambiarDJsc/Meridian
|
|
7
|
+
Project-URL: Issues, https://github.com/KNambiarDJsc/Meridian/issues
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
|
+
Requires-Dist: fastmcp>=2.0
|
|
12
|
+
Requires-Dist: litellm>=1.40
|
|
13
|
+
Requires-Dist: pydantic>=2.0
|
|
14
|
+
Requires-Dist: pyyaml>=6.0
|
|
15
|
+
Requires-Dist: tenacity>=8.0
|
|
16
|
+
Provides-Extra: all-providers
|
|
17
|
+
Requires-Dist: anthropic>=0.40; extra == 'all-providers'
|
|
18
|
+
Requires-Dist: boto3>=1.34; extra == 'all-providers'
|
|
19
|
+
Requires-Dist: groq>=0.9; extra == 'all-providers'
|
|
20
|
+
Requires-Dist: openai>=1.40; extra == 'all-providers'
|
|
21
|
+
Provides-Extra: anthropic
|
|
22
|
+
Requires-Dist: anthropic>=0.40; extra == 'anthropic'
|
|
23
|
+
Provides-Extra: bedrock
|
|
24
|
+
Requires-Dist: boto3>=1.34; extra == 'bedrock'
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
28
|
+
Provides-Extra: groq
|
|
29
|
+
Requires-Dist: groq>=0.9; extra == 'groq'
|
|
30
|
+
Provides-Extra: openai
|
|
31
|
+
Requires-Dist: openai>=1.40; extra == 'openai'
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
<p align="center">
|
|
35
|
+
<img src=".github/brand/logo-full.svg" alt="Meridian — AI Compliance Intelligence" width="720">
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
# Meridian
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
**Local-first AI compliance scanner via Model Context Protocol.**
|
|
42
|
+
Scan your codebase for violations of DPDPA 2023, RBI FREE-AI, SEBI AI/ML, and the EU AI Act — directly inside Cursor, Claude Desktop, or Windsurf.
|
|
43
|
+
|
|
44
|
+
[](https://www.python.org/downloads/)
|
|
45
|
+
[](LICENSE)
|
|
46
|
+
[](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689)
|
|
47
|
+
[](https://www.meity.gov.in/dpdpa)
|
|
48
|
+
[](#privacy)
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## What it does
|
|
53
|
+
|
|
54
|
+
Meridian exposes six MCP tools that any AI coding assistant can call:
|
|
55
|
+
|
|
56
|
+
| Tool | Description |
|
|
57
|
+
|---|---|
|
|
58
|
+
| `scan_repository` | Scan a local repo for compliance violations — returns a Markdown report with line numbers, regulatory citations, and fixes |
|
|
59
|
+
| `evaluate_policy` | Check a privacy policy, DPA, or model card for compliance gaps |
|
|
60
|
+
| `explain_violation` | Get a plain-English explanation of any regulatory clause with exact penalties |
|
|
61
|
+
| `show_models` | List all supported LLM providers and configuration instructions |
|
|
62
|
+
| `cache_status` | Show or clear the local SQLite scan cache |
|
|
63
|
+
| `check_health` | Verify server config, detected API keys, and licence status |
|
|
64
|
+
|
|
65
|
+
### How scanning works
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Your code → AST slicer → Stage 1 (Evaluator LLM) → candidate violations
|
|
69
|
+
→ Stage 2 (Critic LLM) → confirmed violations
|
|
70
|
+
→ SHA-256 SQLite cache → zero cost on re-scan
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
- **Stage 1** finds candidate violations across all file × framework pairs concurrently
|
|
74
|
+
- **Stage 2** runs a second LLM to disprove HIGH/CRITICAL findings, eliminating false positives
|
|
75
|
+
- **Cache** skips re-evaluation of unchanged files — only new or modified code is sent to the API
|
|
76
|
+
|
|
77
|
+
### Supported frameworks
|
|
78
|
+
|
|
79
|
+
| Framework | Tier | Key penalties |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| `dpdpa` — DPDPA 2023 + Rules 2025 | **Free** | ₹250 Cr security failure · ₹200 Cr breach notification · ₹200 Cr children's data |
|
|
82
|
+
| `rbi` — RBI FREE-AI Aug 2025 | Pro | 7 Sutras — fairness, explainability, security, accountability |
|
|
83
|
+
| `eu` — EU AI Act Art. 9 | Pro | €30M / 6% global turnover for high-risk system failures |
|
|
84
|
+
| `sebi` — SEBI AI/ML Guidelines Jun 2025 | Pro | SEBI §5.1–§5.5 pillars |
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Supported LLM providers
|
|
89
|
+
|
|
90
|
+
Meridian uses [litellm](https://github.com/BerriAI/litellm) — **you bring your own API key, Meridian never touches your credentials.**
|
|
91
|
+
|
|
92
|
+
| Provider | Key env var | Example models |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| Anthropic | `ANTHROPIC_API_KEY` | `claude-opus-4-8`, `claude-haiku-4-5` |
|
|
95
|
+
| OpenAI | `OPENAI_API_KEY` | `gpt-5.4-pro`, `gpt-5.4-nano` |
|
|
96
|
+
| Gemini | `GEMINI_API_KEY` | `gemini/gemini-3.5-flash` |
|
|
97
|
+
| Groq | `GROQ_API_KEY` | `groq/meta-llama/llama-4-maverick-17b-128e-instruct` |
|
|
98
|
+
| OpenRouter | `OPENROUTER_API_KEY` | `openrouter/anthropic/claude-opus-4-8` |
|
|
99
|
+
| AWS Bedrock | `AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY` + `AWS_REGION_NAME` | `bedrock/anthropic.claude-opus-4-8-20260501-v1:0` |
|
|
100
|
+
| Ollama (local) | *(none)* | `ollama/llama4:scout`, `ollama/mistral` |
|
|
101
|
+
|
|
102
|
+
You can mix providers — e.g. Anthropic for Stage 1 and Groq for Stage 2 (cheapest critic):
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
MERIDIAN_EVALUATOR_MODEL=claude-opus-4-8
|
|
106
|
+
MERIDIAN_CRITIC_MODEL=groq/llama-3.1-8b-instant
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Installation
|
|
112
|
+
|
|
113
|
+
**Requirements:** Python 3.11+
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Clone and create virtual environment
|
|
117
|
+
git clone https://github.com/KNambiarDJsc/Meridian.git
|
|
118
|
+
cd Meridian
|
|
119
|
+
python -m venv .venv
|
|
120
|
+
.venv\Scripts\activate # Windows
|
|
121
|
+
# source .venv/bin/activate # macOS / Linux
|
|
122
|
+
|
|
123
|
+
# Install (runtime only)
|
|
124
|
+
pip install -e .
|
|
125
|
+
|
|
126
|
+
# Install with dev/test tools
|
|
127
|
+
pip install -e ".[dev]"
|
|
128
|
+
|
|
129
|
+
# Install with a specific provider SDK
|
|
130
|
+
pip install -e ".[anthropic]" # Claude
|
|
131
|
+
pip install -e ".[openai]" # GPT
|
|
132
|
+
pip install -e ".[groq]" # Groq / Llama
|
|
133
|
+
pip install -e ".[bedrock]" # AWS Bedrock
|
|
134
|
+
pip install -e ".[all-providers]" # everything
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## MCP server setup
|
|
140
|
+
|
|
141
|
+
### Cursor (`~/.cursor/mcp.json`)
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"mcpServers": {
|
|
146
|
+
"meridian-compliance": {
|
|
147
|
+
"command": "python",
|
|
148
|
+
"args": ["-m", "meridian.server"],
|
|
149
|
+
"cwd": "/absolute/path/to/Meridian",
|
|
150
|
+
"env": {
|
|
151
|
+
"ANTHROPIC_API_KEY": "sk-ant-...",
|
|
152
|
+
"MERIDIAN_EVALUATOR_MODEL": "claude-opus-4-8",
|
|
153
|
+
"MERIDIAN_CRITIC_MODEL": "claude-haiku-4-5"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Claude Desktop (`claude_desktop_config.json`)
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"mcpServers": {
|
|
165
|
+
"meridian-compliance": {
|
|
166
|
+
"command": "python",
|
|
167
|
+
"args": ["-m", "meridian.server"],
|
|
168
|
+
"cwd": "/absolute/path/to/Meridian",
|
|
169
|
+
"env": {
|
|
170
|
+
"ANTHROPIC_API_KEY": "sk-ant-..."
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### OpenAI / Groq / other providers
|
|
178
|
+
|
|
179
|
+
```json
|
|
180
|
+
"env": {
|
|
181
|
+
"OPENAI_API_KEY": "sk-...",
|
|
182
|
+
"MERIDIAN_EVALUATOR_MODEL": "gpt-5.4-pro",
|
|
183
|
+
"MERIDIAN_CRITIC_MODEL": "gpt-5.4-nano"
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Local models (Ollama, no API key needed)
|
|
188
|
+
|
|
189
|
+
```json
|
|
190
|
+
"env": {
|
|
191
|
+
"MERIDIAN_EVALUATOR_MODEL": "ollama/llama4:scout",
|
|
192
|
+
"MERIDIAN_CRITIC_MODEL": "ollama/mistral"
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### AWS Bedrock (air-gapped / India data residency)
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
"env": {
|
|
200
|
+
"AWS_ACCESS_KEY_ID": "AKIA...",
|
|
201
|
+
"AWS_SECRET_ACCESS_KEY": "...",
|
|
202
|
+
"AWS_REGION_NAME": "ap-south-1",
|
|
203
|
+
"MERIDIAN_EVALUATOR_MODEL": "bedrock/anthropic.claude-opus-4-8-20260501-v1:0",
|
|
204
|
+
"MERIDIAN_CRITIC_MODEL": "bedrock/anthropic.claude-haiku-4-5-20251001-v1:0"
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Environment variables
|
|
211
|
+
|
|
212
|
+
| Variable | Default | Description |
|
|
213
|
+
|---|---|---|
|
|
214
|
+
| `MERIDIAN_EVALUATOR_MODEL` | `claude-opus-4-8` | Stage 1 model — finds violations |
|
|
215
|
+
| `MERIDIAN_CRITIC_MODEL` | `claude-haiku-4-5` | Stage 2 model — disproves false positives |
|
|
216
|
+
| `MERIDIAN_MAX_CONCURRENT` | `5` | Max concurrent LLM requests (semaphore cap) |
|
|
217
|
+
| `MERIDIAN_LICENSE_KEY` | *(none)* | Pro licence key — unlocks RBI, EU, SEBI frameworks |
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## CI/CD gate (`meridian-ci`)
|
|
222
|
+
|
|
223
|
+
Block PR merges on CRITICAL violations with a single step:
|
|
224
|
+
|
|
225
|
+
```yaml
|
|
226
|
+
# .github/workflows/compliance.yml
|
|
227
|
+
- name: Meridian Compliance Gate
|
|
228
|
+
run: meridian-ci --dir . --frameworks dpdpa --fail-on critical
|
|
229
|
+
env:
|
|
230
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
231
|
+
MERIDIAN_EVALUATOR_MODEL: claude-opus-4-8
|
|
232
|
+
MERIDIAN_CRITIC_MODEL: claude-haiku-4-5
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Exit codes:**
|
|
236
|
+
|
|
237
|
+
| Code | Meaning |
|
|
238
|
+
|---|---|
|
|
239
|
+
| `0` | All checks passed |
|
|
240
|
+
| `1` | Violations at or above `--fail-on` threshold found |
|
|
241
|
+
| `2` | Configuration error (missing API key, bad env var) |
|
|
242
|
+
|
|
243
|
+
**Options:**
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
meridian-ci --dir .
|
|
247
|
+
--frameworks dpdpa,rbi
|
|
248
|
+
--fail-on critical|high|medium|low
|
|
249
|
+
--max-files 80
|
|
250
|
+
--output text|markdown|json
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Quick start (inside your AI assistant)
|
|
256
|
+
|
|
257
|
+
Once the MCP server is connected:
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
check_health() # verify setup and detected keys
|
|
261
|
+
show_models() # see all providers and config options
|
|
262
|
+
scan_repository(path=".", frameworks="dpdpa") # scan current repo
|
|
263
|
+
evaluate_policy(policy_text="...") # check a privacy policy
|
|
264
|
+
explain_violation(statutory_clause="DPDPA §6(1)") # plain-English explanation
|
|
265
|
+
cache_status() # view cache stats
|
|
266
|
+
cache_status(clear=True) # wipe cache
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Project structure
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
src/meridian/
|
|
275
|
+
├── server.py # MCP server — 6 tools exposed via FastMCP
|
|
276
|
+
├── scanner.py # Async orchestrator — file × framework concurrency
|
|
277
|
+
├── evaluator.py # Dual-stage litellm evaluator with cache and retry
|
|
278
|
+
├── config.py # Multi-provider LLM config (load_config, validate_config)
|
|
279
|
+
├── ast_parser.py # Language-aware code slicer (Python, JS/TS, SQL, YAML)
|
|
280
|
+
├── prompts.py # Regulatory prompts for all four frameworks
|
|
281
|
+
├── models.py # Pydantic models — Violation, FileScanResult, ScanReport
|
|
282
|
+
├── cache.py # SQLite SHA-256 scan cache (~/.meridian/cache.db)
|
|
283
|
+
├── security.py # Secret redactor — strips API keys/JWTs before LLM calls
|
|
284
|
+
├── licensing.py # Licence gate — free (DPDPA) vs Pro (RBI, EU, SEBI)
|
|
285
|
+
└── cli.py # meridian-ci — CI/CD gate binary
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Running tests
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
pip install -e ".[dev]"
|
|
294
|
+
pytest tests/ -v
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
47 tests covering models, AST parsing, security redaction, cache, licensing, prompts, scanner, and config — all pass without any API calls.
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## Privacy
|
|
302
|
+
|
|
303
|
+
- **Zero telemetry.** Meridian sends no usage data anywhere.
|
|
304
|
+
- **Keys never leave your machine.** API keys are read from your environment and passed directly to the provider SDK — Meridian has no server, no proxy, no logging of credentials.
|
|
305
|
+
- **Code stays local until you call a tool.** The secret redactor (`security.py`) strips API keys, JWTs, and high-entropy strings from code slices before they are sent to any LLM.
|
|
306
|
+
- **Cache is local.** Scan results are stored in `~/.meridian/cache.db` on your machine only.
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Pricing / licence
|
|
311
|
+
|
|
312
|
+
| Tier | Frameworks | How to get |
|
|
313
|
+
|---|---|---|
|
|
314
|
+
| **Free** (Apache 2.0) | DPDPA 2023 | Use immediately, no key needed |
|
|
315
|
+
| **Pro** | DPDPA + RBI FREE-AI + EU AI Act + SEBI AI/ML | Set `MERIDIAN_LICENSE_KEY` — [meridian.so/pro](https://meridian.so/pro) |
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## License
|
|
320
|
+
|
|
321
|
+
Apache 2.0 — see [LICENSE](LICENSE).
|