paara-connector-audit 1.2.2__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vivek Kumar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.4
2
+ Name: paara-connector-audit
3
+ Version: 1.2.2
4
+ Summary: PAARA Connector Audit MCP server (stdio, stdlib only) — score AI/MCP connectors on seven risk factors (F1-F7) and look up the published 13-connector audit.
5
+ Author-email: Vivek Kumar <vkktaskusa@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/vkktask/paara-connector-audit-kit
8
+ Project-URL: Repository, https://github.com/vkktask/paara-connector-audit-kit
9
+ Project-URL: Methodology paper (SSRN), https://doi.org/10.2139/ssrn.6784078
10
+ Project-URL: Archived dataset (Zenodo), https://doi.org/10.5281/zenodo.24325766
11
+ Keywords: mcp,model-context-protocol,ai-governance,connector-audit,risk-assessment,paara
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Information Technology
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Security
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Dynamic: license-file
23
+
24
+ # PAARA Connector Audit — MCP Server
25
+
26
+ A dependency-free (Python 3.9+ standard library only) MCP server that
27
+ exposes the **PAARA seven-factor connector scoring rule** and the
28
+ published **13-connector audit** as tools any MCP client can call.
29
+
30
+ PAARA (Privacy-Aware AI Risk Architecture) treats the connector —
31
+ OAuth/API permissions, MCP servers, retrieval pipelines — as the unit
32
+ of AI governance. Each connector is coded **Y / N / U** on seven
33
+ factors and scored as a band (lower bound: undocumented = absent;
34
+ upper bound: undocumented = present), because undocumented is not
35
+ evidence of absence.
36
+
37
+ | Factor | Meaning |
38
+ |---|---|
39
+ | F1 | Sensitive-data reach |
40
+ | F2 | Cross-system aggregation |
41
+ | F3 | Non-user-bound credentials |
42
+ | F4 | Absent logging (N = logging documented) |
43
+ | F5 | Prompt-injection exposure |
44
+ | F6 | External sharing |
45
+ | F7 | Agentic action capability (write / send / delete / execute) |
46
+
47
+ ## Tools
48
+
49
+ - `score_connector` — score any connector from its F1–F7 codes.
50
+ - `lookup_connector` — look up one of the 13 coded connectors by name.
51
+ - `list_connectors` — list the 13 coded connectors with their bands.
52
+
53
+ In the published audit (documentation retrieved 9 Nov 2026), **9 of 13
54
+ connectors score Critical** on the favourable assumption and **12 of
55
+ 13** on the unfavourable one; none reaches Low.
56
+
57
+ ## Run
58
+
59
+ ```bash
60
+ pip install paara-connector-audit
61
+ paara-connector-audit # stdio MCP server
62
+ # or
63
+ uvx paara-connector-audit
64
+ ```
65
+
66
+ Example client configuration:
67
+
68
+ ```json
69
+ {
70
+ "mcpServers": {
71
+ "paara-connector-audit": {
72
+ "command": "uvx",
73
+ "args": ["paara-connector-audit"]
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ ## Method and sources
80
+
81
+ - Kumar, V., "Privacy-Aware AI Risk Architecture (PAARA)", SSRN,
82
+ DOI 10.2139/ssrn.6784078.
83
+ - Full kit (scanner, checklist, DPIA template, coding sheet):
84
+ https://github.com/vkktask/paara-connector-audit-kit
85
+ - Archived kit and dataset (Zenodo concept DOI):
86
+ https://doi.org/10.5281/zenodo.24325766
87
+
88
+ Scores describe **documentation**, not behaviour; coding of the
89
+ 13-connector dataset is single-coder with no inter-rater reliability
90
+ reported. See the kit README for the full limitations list.
91
+
92
+ ## Licence
93
+
94
+ MIT
@@ -0,0 +1,71 @@
1
+ # PAARA Connector Audit — MCP Server
2
+
3
+ A dependency-free (Python 3.9+ standard library only) MCP server that
4
+ exposes the **PAARA seven-factor connector scoring rule** and the
5
+ published **13-connector audit** as tools any MCP client can call.
6
+
7
+ PAARA (Privacy-Aware AI Risk Architecture) treats the connector —
8
+ OAuth/API permissions, MCP servers, retrieval pipelines — as the unit
9
+ of AI governance. Each connector is coded **Y / N / U** on seven
10
+ factors and scored as a band (lower bound: undocumented = absent;
11
+ upper bound: undocumented = present), because undocumented is not
12
+ evidence of absence.
13
+
14
+ | Factor | Meaning |
15
+ |---|---|
16
+ | F1 | Sensitive-data reach |
17
+ | F2 | Cross-system aggregation |
18
+ | F3 | Non-user-bound credentials |
19
+ | F4 | Absent logging (N = logging documented) |
20
+ | F5 | Prompt-injection exposure |
21
+ | F6 | External sharing |
22
+ | F7 | Agentic action capability (write / send / delete / execute) |
23
+
24
+ ## Tools
25
+
26
+ - `score_connector` — score any connector from its F1–F7 codes.
27
+ - `lookup_connector` — look up one of the 13 coded connectors by name.
28
+ - `list_connectors` — list the 13 coded connectors with their bands.
29
+
30
+ In the published audit (documentation retrieved 9 Nov 2026), **9 of 13
31
+ connectors score Critical** on the favourable assumption and **12 of
32
+ 13** on the unfavourable one; none reaches Low.
33
+
34
+ ## Run
35
+
36
+ ```bash
37
+ pip install paara-connector-audit
38
+ paara-connector-audit # stdio MCP server
39
+ # or
40
+ uvx paara-connector-audit
41
+ ```
42
+
43
+ Example client configuration:
44
+
45
+ ```json
46
+ {
47
+ "mcpServers": {
48
+ "paara-connector-audit": {
49
+ "command": "uvx",
50
+ "args": ["paara-connector-audit"]
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ ## Method and sources
57
+
58
+ - Kumar, V., "Privacy-Aware AI Risk Architecture (PAARA)", SSRN,
59
+ DOI 10.2139/ssrn.6784078.
60
+ - Full kit (scanner, checklist, DPIA template, coding sheet):
61
+ https://github.com/vkktask/paara-connector-audit-kit
62
+ - Archived kit and dataset (Zenodo concept DOI):
63
+ https://doi.org/10.5281/zenodo.24325766
64
+
65
+ Scores describe **documentation**, not behaviour; coding of the
66
+ 13-connector dataset is single-coder with no inter-rater reliability
67
+ reported. See the kit README for the full limitations list.
68
+
69
+ ## Licence
70
+
71
+ MIT
@@ -0,0 +1,9 @@
1
+ """PAARA Connector Audit MCP server package.
2
+
3
+ The server module is ``paara_connector_audit.server`` (the kit's
4
+ ``mcp-server/paara_mcp_server.py``, staged into this package by
5
+ ``build_mcp_package.sh``). It speaks JSON-RPC 2.0 over stdio and has
6
+ no dependencies beyond the Python 3.9+ standard library.
7
+ """
8
+
9
+ __version__ = "1.2.2"
@@ -0,0 +1,6 @@
1
+ """Allow ``python -m paara_connector_audit`` to start the MCP server."""
2
+
3
+ from .server import main
4
+
5
+ if __name__ == "__main__":
6
+ main()
@@ -0,0 +1,14 @@
1
+ connector,F1,F2,F3,F4,F5,F6,F7,default_lower,default_upper,restricted_lower,restricted_upper,documentation_retrieved
2
+ MCP Filesystem,U,N,U,U,Y,N,Y,High,Crit,Mod,High,2026-11-09
3
+ MCP Git,N,N,U,U,Y,N,Y,High,Crit,,,2026-11-09
4
+ MCP Memory,Y,N,Y,U,N,N,Y,Crit,Crit,,,2026-11-09
5
+ MCP Fetch,U,N,U,U,Y,Y,N,Mod,High,,,2026-11-09
6
+ GitHub MCP,Y,N,N,U,Y,Y,Y,Crit,Crit,High,High,2026-11-09
7
+ Notion MCP,U,Y,Y,U,Y,N,Y,Crit,Crit,High,High,2026-11-09
8
+ Atlassian MCP,U,Y,Y,U,Y,Y,Y,Crit,Crit,High,High,2026-11-09
9
+ Linear MCP,N,N,Y,U,Y,N,Y,Crit,Crit,High,High,2026-11-09
10
+ Sentry MCP,N,N,U,U,Y,N,U,Mod,Crit,,,2026-11-09
11
+ Stripe MCP,Y,N,Y,N,Y,Y,Y,Crit,Crit,,,2026-11-09
12
+ Slack MCP,Y,N,N,N,Y,Y,Y,Crit,Crit,High,High,2026-11-09
13
+ MS Graph perms.,Y,Y,Y,U,Y,U,Y,Crit,Crit,High,High,2026-11-09
14
+ Claude connectors,Y,Y,Y,U,Y,Y,Y,Crit,Crit,High,High,2026-11-09
@@ -0,0 +1,860 @@
1
+ #!/usr/bin/env python3
2
+ """PAARA Connector Audit — thin MCP server wrapper (stdio, stdlib only).
3
+
4
+ Exposes the PAARA seven-factor connector scoring rule and the published
5
+ 13-connector audit dataset as MCP tools, speaking JSON-RPC 2.0 over
6
+ stdin/stdout (newline-delimited), with no third-party dependencies.
7
+
8
+ Tools:
9
+ score_connector Score any connector from its F1-F7 codes (Y/N/U).
10
+ lookup_connector Look up one of the 13 coded connectors by name.
11
+ list_connectors List the 13 coded connectors with their bands.
12
+
13
+ Scoring: if the PAARA Connector Audit Kit's `paara_scanner` package is
14
+ importable (via $PAARA_KIT_SRC or a sibling ../paara-repo checkout), its
15
+ scoring module is used directly. Otherwise an exact local replica of the
16
+ kit's scoring rule (src/paara_scanner/scoring.py) is used, so this file
17
+ also works standalone. The test suite verifies the replica against the
18
+ published bands for all 13 connectors.
19
+
20
+ Methodology: Kumar, V. (2026). Privacy-Aware AI Risk Architecture
21
+ (PAARA). SSRN. https://doi.org/10.2139/ssrn.6784078
22
+ Kit: https://github.com/vkktask/paara-connector-audit-kit
23
+ Archived kit + dataset: https://doi.org/10.5281/zenodo.24325766
24
+ """
25
+
26
+ from __future__ import annotations
27
+
28
+ import csv
29
+ import difflib
30
+ import json
31
+ import os
32
+ import sys
33
+ from pathlib import Path
34
+
35
+ SERVER_NAME = "paara-connector-audit"
36
+ SERVER_VERSION = "1.2.2" # matches PAARA Connector Audit Kit v1.2.2
37
+ DEFAULT_PROTOCOL = "2025-03-26"
38
+ HERE = Path(__file__).resolve().parent
39
+ DATASET_CSV = HERE / "data" / "coding-sheet.csv"
40
+ FACTORS = ("F1", "F2", "F3", "F4", "F5", "F6", "F7")
41
+ HIGH_FACTORS = ("F1", "F2", "F3", "F4", "F5")
42
+ MEDIUM_FACTORS = ("F6",)
43
+
44
+ # Human-readable factor labels and scoring weights, matching the kit's
45
+ # paara_scanner.models.FACTOR_LABELS / FACTOR_WEIGHTS. Included in tool
46
+ # payloads so results are self-describing (codes plus names, not codes alone).
47
+ FACTOR_LABELS = {
48
+ "F1": "Sensitive-data reach",
49
+ "F2": "Cross-system aggregation",
50
+ "F3": "Non-user-bound credentials",
51
+ "F4": "Absent logging",
52
+ "F5": "Prompt-injection exposure",
53
+ "F6": "External sharing",
54
+ "F7": "Agentic action capability",
55
+ }
56
+ FACTOR_WEIGHTS = {
57
+ "F1": "High",
58
+ "F2": "High",
59
+ "F3": "High",
60
+ "F4": "High",
61
+ "F5": "High",
62
+ "F6": "Medium",
63
+ "F7": "Critical",
64
+ }
65
+ CODE_MEANINGS = {
66
+ "Y": "documented present",
67
+ "N": "documented absent",
68
+ "U": "documentation silent (unknown)",
69
+ }
70
+ BAND_MEANINGS = {
71
+ "Low": (
72
+ "No High-weighted factor (F1-F5) is present and the connector has "
73
+ "no agentic action capability (F7)."
74
+ ),
75
+ "Moderate": (
76
+ "Exactly one High-weighted factor (one of F1-F5) is present and "
77
+ "the connector has no agentic action capability (F7)."
78
+ ),
79
+ "High": (
80
+ "Agentic action capability (F7) on its own, or two or more "
81
+ "High-weighted factors (F1-F5)."
82
+ ),
83
+ "Critical": (
84
+ "Agentic action capability (F7) combined with sensitive-data "
85
+ "reach (F1), non-user-bound credentials (F3), or absent logging "
86
+ "(F4)."
87
+ ),
88
+ }
89
+ # All three tools only read bundled data / compute scores locally: they
90
+ # never mutate anything, never call external services, and the same input
91
+ # always yields the same output.
92
+ READ_ONLY_ANNOTATIONS = {
93
+ "readOnlyHint": True,
94
+ "destructiveHint": False,
95
+ "idempotentHint": True,
96
+ "openWorldHint": False,
97
+ }
98
+
99
+
100
+ def factor_details(codes: dict[str, str]) -> list[dict]:
101
+ """Per-factor breakdown pairing each code with its name and meaning."""
102
+ return [
103
+ {
104
+ "factor": f,
105
+ "name": FACTOR_LABELS[f],
106
+ "weight": FACTOR_WEIGHTS[f],
107
+ "code": codes[f],
108
+ "code_meaning": CODE_MEANINGS[codes[f]],
109
+ }
110
+ for f in FACTORS
111
+ ]
112
+
113
+ # ---------------------------------------------------------------------------
114
+ # Scoring rule — exact replica of paara_scanner/scoring.py (kit), used when
115
+ # the kit package itself is not importable. Highest-severity condition met,
116
+ # not a sum. Every score is a band: lower bound (U as N), upper (U as Y).
117
+ # ---------------------------------------------------------------------------
118
+
119
+
120
+ def _resolve(codes: dict[str, str], unknown_as_yes: bool) -> dict[str, bool]:
121
+ return {
122
+ f: (c == "Y" or (c == "U" and unknown_as_yes)) for f, c in codes.items()
123
+ }
124
+
125
+
126
+ def _score_single(resolved: dict[str, bool]) -> tuple[str, str]:
127
+ if resolved["F7"] and (resolved["F1"] or resolved["F3"] or resolved["F4"]):
128
+ triggers = [x for x in ("F1", "F3", "F4") if resolved[x]]
129
+ return "Critical", f"F7 (write/action) with {', '.join(triggers)}"
130
+ if resolved["F7"]:
131
+ return "High", "F7 (write/action) alone"
132
+ high = [x for x in HIGH_FACTORS if resolved[x]]
133
+ if len(high) >= 2:
134
+ return "High", f"{len(high)} High-weighted factors: {', '.join(high)}"
135
+ if len(high) == 1:
136
+ return "Moderate", f"one High-weighted factor: {high[0]}"
137
+ medium = [x for x in MEDIUM_FACTORS if resolved[x]]
138
+ if len(medium) >= 2: # unreachable with one Medium factor; kept for parity
139
+ return "Moderate", "multiple Medium-weighted factors"
140
+ return "Low", "no High-weighted factor and no write/action capability"
141
+
142
+
143
+ def score_codes_local(
144
+ codes: dict[str, str], restricted: bool = False
145
+ ) -> dict:
146
+ """Score F1-F7 codes with the local replica. Returns bands + reasons."""
147
+ lower, lower_reason = _score_single(_resolve(codes, False))
148
+ upper, upper_reason = _score_single(_resolve(codes, True))
149
+ out = {
150
+ "default_lower": lower,
151
+ "default_upper": upper,
152
+ "restricted_lower": None,
153
+ "restricted_upper": None,
154
+ "reasons": [
155
+ f"lower bound (U as N): {lower} — {lower_reason}",
156
+ f"upper bound (U as Y): {upper} — {upper_reason}",
157
+ ],
158
+ "unknowns": [f for f in FACTORS if codes[f] == "U"],
159
+ }
160
+ if restricted:
161
+ rcodes = dict(codes)
162
+ rcodes["F7"] = "N"
163
+ r_lower, r_lo_reason = _score_single(_resolve(rcodes, False))
164
+ r_upper, r_up_reason = _score_single(_resolve(rcodes, True))
165
+ out["restricted_lower"] = r_lower
166
+ out["restricted_upper"] = r_upper
167
+ out["reasons"].append(
168
+ f"restricted (F7=N): {r_lower} -> {r_upper} "
169
+ f"— lower: {r_lo_reason}; upper: {r_up_reason}"
170
+ )
171
+ return out
172
+
173
+
174
+ # ---------------------------------------------------------------------------
175
+ # Prefer the kit's own scoring module when it is importable by path.
176
+ # ---------------------------------------------------------------------------
177
+
178
+ _kit_score = None
179
+
180
+
181
+ def _load_kit_scoring():
182
+ global _kit_score
183
+ if _kit_score is not None:
184
+ return _kit_score
185
+ candidates = []
186
+ if os.environ.get("PAARA_KIT_SRC"):
187
+ candidates.append(Path(os.environ["PAARA_KIT_SRC"]))
188
+ candidates.append(HERE.parent / "paara-repo" / "src")
189
+ candidates.append(HERE / "paara_scanner_src")
190
+ for src in candidates:
191
+ if (src / "paara_scanner" / "scoring.py").is_file():
192
+ sys.path.insert(0, str(src))
193
+ try:
194
+ from paara_scanner.models import Connector
195
+ from paara_scanner.scoring import score_connector as kit_score
196
+
197
+ _kit_score = (Connector, kit_score)
198
+ return _kit_score
199
+ except Exception:
200
+ sys.path.remove(str(src))
201
+ _kit_score = False
202
+ return _kit_score
203
+
204
+
205
+ def score_codes(codes: dict[str, str], restricted: bool = False) -> dict:
206
+ """Score with the kit module when available, else the local replica."""
207
+ kit = _load_kit_scoring()
208
+ if kit:
209
+ Connector, kit_score = kit
210
+ connector = Connector.from_code_string(
211
+ "adhoc", "".join(codes[f] for f in FACTORS),
212
+ has_write_limiting_control=restricted,
213
+ )
214
+ result = kit_score(connector)
215
+ return {
216
+ "default_lower": result.lower.value,
217
+ "default_upper": result.upper.value,
218
+ "restricted_lower": (
219
+ result.restricted_lower.value if result.restricted_lower else None
220
+ ),
221
+ "restricted_upper": (
222
+ result.restricted_upper.value if result.restricted_upper else None
223
+ ),
224
+ "reasons": list(result.reasons),
225
+ "unknowns": [f.value for f in result.unknowns],
226
+ "engine": "paara_scanner (kit)",
227
+ }
228
+ out = score_codes_local(codes, restricted)
229
+ out["engine"] = "local replica of paara_scanner.scoring"
230
+ return out
231
+
232
+
233
+ # ---------------------------------------------------------------------------
234
+ # Bundled dataset (the published 13-connector audit, snapshot 9 Nov 2026)
235
+ # ---------------------------------------------------------------------------
236
+
237
+ _ABBREV = {"Crit": "Critical", "Mod": "Moderate", "High": "High", "Low": "Low"}
238
+
239
+
240
+ def _full(value: str) -> str | None:
241
+ value = (value or "").strip()
242
+ return _ABBREV.get(value, value) if value else None
243
+
244
+
245
+ def load_dataset() -> list[dict]:
246
+ rows = []
247
+ with DATASET_CSV.open(newline="", encoding="utf-8") as fh:
248
+ for row in csv.DictReader(fh):
249
+ name = (row.get("connector") or "").strip()
250
+ if not name:
251
+ continue
252
+ rows.append(
253
+ {
254
+ "name": name,
255
+ "codes": {f: row[f].strip().upper() for f in FACTORS},
256
+ "published_default_lower": _full(row["default_lower"]),
257
+ "published_default_upper": _full(row["default_upper"]),
258
+ "published_restricted_lower": _full(row["restricted_lower"]),
259
+ "published_restricted_upper": _full(row["restricted_upper"]),
260
+ "documentation_retrieved": (
261
+ row.get("documentation_retrieved") or ""
262
+ ).strip(),
263
+ }
264
+ )
265
+ return rows
266
+
267
+
268
+ DATASET = load_dataset()
269
+
270
+
271
+ def _norm(text: str) -> str:
272
+ return " ".join(text.lower().replace(".", " ").split())
273
+
274
+
275
+ def find_connector(query: str) -> dict | None:
276
+ q = _norm(query)
277
+ for row in DATASET:
278
+ if _norm(row["name"]) == q:
279
+ return row
280
+ for row in DATASET:
281
+ n = _norm(row["name"])
282
+ if q in n or n in q:
283
+ return row
284
+ names = {_norm(r["name"]): r for r in DATASET}
285
+ close = difflib.get_close_matches(q, list(names), n=1, cutoff=0.5)
286
+ if close:
287
+ return names[close[0]]
288
+ tokens = set(q.split())
289
+ best, best_overlap = None, 0
290
+ for row in DATASET:
291
+ overlap = len(tokens & set(_norm(row["name"]).split()))
292
+ if overlap > best_overlap:
293
+ best, best_overlap = row, overlap
294
+ return best
295
+
296
+
297
+ # ---------------------------------------------------------------------------
298
+ # Tools
299
+ # ---------------------------------------------------------------------------
300
+
301
+
302
+ def tool_score_connector(args: dict) -> dict:
303
+ codes = {}
304
+ for f in FACTORS:
305
+ value = str(args.get(f, "")).strip().upper()
306
+ if value not in ("Y", "N", "U"):
307
+ raise ValueError(f"{f} must be one of Y, N, U (got {args.get(f)!r})")
308
+ codes[f] = value
309
+ restricted = bool(args.get("restricted", False))
310
+ scored = score_codes(codes, restricted)
311
+ return {
312
+ "name": args.get("name") or "adhoc connector",
313
+ "codes": codes,
314
+ "code_string": "".join(codes[f] for f in FACTORS),
315
+ "factors": factor_details(codes),
316
+ "band_meanings": BAND_MEANINGS,
317
+ **scored,
318
+ "note": (
319
+ "Bands, not points: U (documentation silent) is not evidence of "
320
+ "absence, so the lower bound treats U as N and the upper as Y. "
321
+ "Restricted bands apply only where a documented write-limiting "
322
+ "control exists (restricted=true sets F7 to N)."
323
+ ),
324
+ }
325
+
326
+
327
+ def tool_lookup_connector(args: dict) -> dict:
328
+ query = str(args.get("name", "")).strip()
329
+ if not query:
330
+ raise ValueError("name is required")
331
+ row = find_connector(query)
332
+ if row is None:
333
+ return {
334
+ "found": False,
335
+ "query": query,
336
+ "known_connectors": [r["name"] for r in DATASET],
337
+ "note": (
338
+ "No connector in the published 13-connector audit matches "
339
+ "the query. Retry with one of known_connectors, or score "
340
+ "the connector directly with score_connector."
341
+ ),
342
+ }
343
+ restricted = row["published_restricted_lower"] is not None
344
+ scored = score_codes(row["codes"], restricted)
345
+ return {
346
+ "found": True,
347
+ "name": row["name"],
348
+ "codes": row["codes"],
349
+ "code_string": "".join(row["codes"][f] for f in FACTORS),
350
+ "factors": factor_details(row["codes"]),
351
+ "band_meanings": BAND_MEANINGS,
352
+ "default_lower": scored["default_lower"],
353
+ "default_upper": scored["default_upper"],
354
+ "restricted_lower": scored["restricted_lower"],
355
+ "restricted_upper": scored["restricted_upper"],
356
+ "published_bands_match": (
357
+ scored["default_lower"] == row["published_default_lower"]
358
+ and scored["default_upper"] == row["published_default_upper"]
359
+ and scored["restricted_lower"] == row["published_restricted_lower"]
360
+ and scored["restricted_upper"] == row["published_restricted_upper"]
361
+ ),
362
+ "documentation_retrieved": row["documentation_retrieved"],
363
+ "source": "PAARA 13-connector audit (documentation snapshot, 9 Nov 2026)",
364
+ }
365
+
366
+
367
+ def tool_list_connectors(_args: dict) -> dict:
368
+ return {
369
+ "count": len(DATASET),
370
+ "snapshot": "documentation retrieved 2026-11-09",
371
+ "source": "PAARA 13-connector audit (documentation snapshot, 9 Nov 2026)",
372
+ "factors": [
373
+ {"factor": f, "name": FACTOR_LABELS[f], "weight": FACTOR_WEIGHTS[f]}
374
+ for f in FACTORS
375
+ ],
376
+ "band_meanings": BAND_MEANINGS,
377
+ "bands_explained": (
378
+ "Each connector carries a band range, not a point score: "
379
+ "default_lower treats unknown (U) codes as N, default_upper "
380
+ "treats them as Y. restricted_lower/restricted_upper are the "
381
+ "same range with a documented write-limiting control applied "
382
+ "(F7 set to N); null when no such control is documented."
383
+ ),
384
+ "connectors": [
385
+ {
386
+ "name": r["name"],
387
+ "codes": r["codes"],
388
+ "code_string": "".join(r["codes"][f] for f in FACTORS),
389
+ "default_lower": r["published_default_lower"],
390
+ "default_upper": r["published_default_upper"],
391
+ "restricted_lower": r["published_restricted_lower"],
392
+ "restricted_upper": r["published_restricted_upper"],
393
+ }
394
+ for r in DATASET
395
+ ],
396
+ }
397
+
398
+
399
+ _FACTOR_INPUT_DESCRIPTIONS = {
400
+ "F1": (
401
+ "F1 Sensitive-data reach: 'Y' if the documentation shows the "
402
+ "connector can reach sensitive data (message bodies, files, "
403
+ "records), 'N' if documented as unable to, 'U' if silent."
404
+ ),
405
+ "F2": (
406
+ "F2 Cross-system aggregation: 'Y' if the connector aggregates or "
407
+ "correlates data across multiple systems or sources, 'N' if "
408
+ "documented as single-system only, 'U' if silent."
409
+ ),
410
+ "F3": (
411
+ "F3 Non-user-bound credentials: 'Y' if calls run on service or "
412
+ "app credentials not bound to the acting user (e.g. a bot token), "
413
+ "'N' if calls run on the user's own tokens, 'U' if silent."
414
+ ),
415
+ "F4": (
416
+ "F4 Absent logging: 'Y' if audit logging of connector activity "
417
+ "is documented as absent, 'N' if audit logging is documented, "
418
+ "'U' if silent. Note the polarity: Y means logging is absent."
419
+ ),
420
+ "F5": (
421
+ "F5 Prompt-injection exposure: 'Y' if the connector retrieves "
422
+ "content authored by other people or external sources that could "
423
+ "carry injected instructions, 'N' if it only processes the user's "
424
+ "own content, 'U' if silent."
425
+ ),
426
+ "F6": (
427
+ "F6 External sharing: 'Y' if the connector can send or share "
428
+ "content outside the organisation (post messages, share files), "
429
+ "'N' if documented as internal-only, 'U' if silent."
430
+ ),
431
+ "F7": (
432
+ "F7 Agentic action capability: 'Y' if the connector exposes "
433
+ "write/action tools (send, create, modify, delete, execute), "
434
+ "'N' if read-only, 'U' if silent."
435
+ ),
436
+ }
437
+
438
+ _BAND_SCHEMA = {"type": "string", "enum": ["Low", "Moderate", "High", "Critical"]}
439
+ _BAND_OR_NULL_SCHEMA = {
440
+ "type": ["string", "null"],
441
+ "enum": ["Low", "Moderate", "High", "Critical", None],
442
+ "description": (
443
+ "A score band, or null when no documented write-limiting control "
444
+ "exists so no restricted band applies."
445
+ ),
446
+ }
447
+ _CODES_SCHEMA = {
448
+ "type": "object",
449
+ "description": "The connector's F1-F7 factor codes (Y/N/U per factor).",
450
+ "properties": {
451
+ f: {"type": "string", "enum": ["Y", "N", "U"]} for f in FACTORS
452
+ },
453
+ "required": list(FACTORS),
454
+ }
455
+ _FACTORS_SCHEMA = {
456
+ "type": "array",
457
+ "description": (
458
+ "Per-factor breakdown pairing each F1-F7 code with the factor's "
459
+ "name, scoring weight, and what the code means, so results are "
460
+ "readable without a separate codebook."
461
+ ),
462
+ "items": {
463
+ "type": "object",
464
+ "properties": {
465
+ "factor": {"type": "string", "enum": list(FACTORS)},
466
+ "name": {"type": "string", "description": "Human-readable factor name."},
467
+ "weight": {"type": "string", "enum": ["High", "Medium", "Critical"]},
468
+ "code": {"type": "string", "enum": ["Y", "N", "U"]},
469
+ "code_meaning": {
470
+ "type": "string",
471
+ "description": "What the code means (documented present / absent / silent).",
472
+ },
473
+ },
474
+ "required": ["factor", "name", "weight", "code", "code_meaning"],
475
+ },
476
+ }
477
+ _BAND_MEANINGS_SCHEMA = {
478
+ "type": "object",
479
+ "description": "Plain-language meaning of each score band under the PAARA rule.",
480
+ "properties": {
481
+ band: {"type": "string"}
482
+ for band in ("Low", "Moderate", "High", "Critical")
483
+ },
484
+ }
485
+
486
+ TOOLS = [
487
+ {
488
+ "name": "score_connector",
489
+ "title": "Score a connector with the PAARA rule",
490
+ "description": (
491
+ "Score any AI/MCP connector with the PAARA seven-factor risk "
492
+ "rule and get a risk band (Low / Moderate / High / Critical).\n\n"
493
+ "WHEN TO USE: Use this when you have coded a connector's "
494
+ "documentation yourself — for example when auditing a connector "
495
+ "that is NOT one of the 13 in the published dataset (for those, "
496
+ "use lookup_connector instead), or when testing how a "
497
+ "connector's band changes under different assumptions.\n\n"
498
+ "INPUT: All seven factor codes F1-F7 are required. Code each "
499
+ "factor from the connector's documentation: 'Y' = documented "
500
+ "present, 'N' = documented absent, 'U' = documentation silent "
501
+ "(unknown). The factors are F1 sensitive-data reach, F2 "
502
+ "cross-system aggregation, F3 non-user-bound credentials, F4 "
503
+ "absent logging (note: Y means logging is absent), F5 "
504
+ "prompt-injection exposure, F6 external sharing, F7 agentic "
505
+ "action capability. Optionally pass 'name' (a label echoed back "
506
+ "in the result) and 'restricted': set restricted=true only when "
507
+ "a documented write-limiting control applies to this connector; "
508
+ "the result then also includes restricted bands (scored with "
509
+ "F7 forced to N).\n\n"
510
+ "RETURNS: A band range, not a point score: default_lower "
511
+ "(unknowns treated as N) and default_upper (unknowns treated "
512
+ "as Y), restricted_lower/restricted_upper when requested (null "
513
+ "otherwise), a per-factor breakdown with factor names and "
514
+ "weights, the reason for each bound, the list of unknown (U) "
515
+ "factors, and the plain-language meaning of every band.\n\n"
516
+ "EXAMPLE: {\"name\": \"Example Chat MCP\", \"F1\": \"Y\", "
517
+ "\"F2\": \"N\", \"F3\": \"N\", \"F4\": \"N\", \"F5\": \"Y\", "
518
+ "\"F6\": \"Y\", \"F7\": \"Y\"} scores Critical/Critical; adding "
519
+ "\"restricted\": true gives a restricted band of High/High."
520
+ ),
521
+ "annotations": {
522
+ "title": "Score a connector (read-only)",
523
+ "readOnlyHint": True,
524
+ "destructiveHint": False,
525
+ "idempotentHint": True,
526
+ "openWorldHint": False,
527
+ },
528
+ "inputSchema": {
529
+ "type": "object",
530
+ "properties": {
531
+ "name": {
532
+ "type": "string",
533
+ "description": (
534
+ "Optional label for the connector being scored; "
535
+ "echoed back as 'name' in the result. Defaults to "
536
+ "'adhoc connector'."
537
+ ),
538
+ },
539
+ **{
540
+ f: {
541
+ "type": "string",
542
+ "enum": ["Y", "N", "U"],
543
+ "description": _FACTOR_INPUT_DESCRIPTIONS[f],
544
+ }
545
+ for f in FACTORS
546
+ },
547
+ "restricted": {
548
+ "type": "boolean",
549
+ "description": (
550
+ "Set to true only if a documented write-limiting "
551
+ "control applies to this connector (e.g. read-only "
552
+ "scopes enforced). When true, the result also "
553
+ "includes restricted_lower/restricted_upper bands "
554
+ "scored with F7 forced to N. Defaults to false."
555
+ ),
556
+ },
557
+ },
558
+ "required": list(FACTORS),
559
+ },
560
+ "outputSchema": {
561
+ "type": "object",
562
+ "description": "PAARA score for one connector, as a band range with full reasoning.",
563
+ "properties": {
564
+ "name": {"type": "string", "description": "The connector label that was scored."},
565
+ "codes": _CODES_SCHEMA,
566
+ "code_string": {
567
+ "type": "string",
568
+ "description": "The seven factor codes as one string in F1-F7 order, e.g. 'YNNNYYY'.",
569
+ },
570
+ "factors": _FACTORS_SCHEMA,
571
+ "band_meanings": _BAND_MEANINGS_SCHEMA,
572
+ "default_lower": {**_BAND_SCHEMA, "description": "Lower bound of the default band (unknown U codes treated as N)."},
573
+ "default_upper": {**_BAND_SCHEMA, "description": "Upper bound of the default band (unknown U codes treated as Y)."},
574
+ "restricted_lower": _BAND_OR_NULL_SCHEMA,
575
+ "restricted_upper": _BAND_OR_NULL_SCHEMA,
576
+ "reasons": {
577
+ "type": "array",
578
+ "items": {"type": "string"},
579
+ "description": "Human-readable reason for each band bound, naming the triggering factors.",
580
+ },
581
+ "unknowns": {
582
+ "type": "array",
583
+ "items": {"type": "string", "enum": list(FACTORS)},
584
+ "description": "Factors coded U (documentation silent); these drive the gap between the lower and upper bounds.",
585
+ },
586
+ "engine": {
587
+ "type": "string",
588
+ "description": "Which scoring engine produced the result (the kit's paara_scanner module, or the built-in exact replica).",
589
+ },
590
+ "note": {
591
+ "type": "string",
592
+ "description": "Method note explaining why results are band ranges rather than point scores.",
593
+ },
594
+ },
595
+ "required": [
596
+ "name", "codes", "code_string", "factors", "default_lower",
597
+ "default_upper", "reasons", "unknowns",
598
+ ],
599
+ },
600
+ },
601
+ {
602
+ "name": "lookup_connector",
603
+ "title": "Look up a connector in the published PAARA audit",
604
+ "description": (
605
+ "Look up one of the 13 connectors in the published PAARA audit "
606
+ "(documentation snapshot, 9 Nov 2026) and get its coded factors "
607
+ "and score bands.\n\n"
608
+ "WHEN TO USE: Use this when you need the audited result for a "
609
+ "known connector (e.g. Slack MCP, Stripe MCP, GitHub MCP, MS "
610
+ "Graph permissions) instead of coding it yourself. To score a "
611
+ "connector that is not in the dataset, use score_connector; to "
612
+ "see all 13 connectors at once, use list_connectors.\n\n"
613
+ "INPUT: 'name' — the connector's name. Matching is forgiving: "
614
+ "exact names, substrings, and close spellings all work (e.g. "
615
+ "'slack', 'Stripe MCP', 'graph').\n\n"
616
+ "RETURNS: If found: found=true, the connector's canonical "
617
+ "name, its F1-F7 codes with a per-factor breakdown (names, "
618
+ "weights, code meanings), its default and restricted score "
619
+ "bands (restricted bands are null when no write-limiting "
620
+ "control was documented), published_bands_match confirming the "
621
+ "live score reproduces the published audit, the meaning of "
622
+ "every band, and the documentation retrieval date. If not "
623
+ "found: found=false, the query echoed back, and "
624
+ "known_connectors listing the 13 valid names.\n\n"
625
+ "EXAMPLE: {\"name\": \"slack\"} returns Slack MCP with codes "
626
+ "YNNNYYY, default band Critical/Critical and restricted band "
627
+ "High/High."
628
+ ),
629
+ "annotations": {
630
+ "title": "Look up an audited connector (read-only)",
631
+ "readOnlyHint": True,
632
+ "destructiveHint": False,
633
+ "idempotentHint": True,
634
+ "openWorldHint": False,
635
+ },
636
+ "inputSchema": {
637
+ "type": "object",
638
+ "properties": {
639
+ "name": {
640
+ "type": "string",
641
+ "description": (
642
+ "Name of a connector from the published "
643
+ "13-connector PAARA audit, e.g. 'Slack MCP', "
644
+ "'Stripe MCP' or 'MS Graph perms.'. Matching is "
645
+ "case-insensitive and fuzzy: substrings and close "
646
+ "spellings are accepted."
647
+ ),
648
+ },
649
+ },
650
+ "required": ["name"],
651
+ },
652
+ "outputSchema": {
653
+ "type": "object",
654
+ "description": "One audited connector's codes and published bands, or a not-found result listing the valid names.",
655
+ "properties": {
656
+ "found": {"type": "boolean", "description": "True when a dataset connector matched the query."},
657
+ "query": {"type": "string", "description": "The query as received (present when found is false)."},
658
+ "known_connectors": {
659
+ "type": "array",
660
+ "items": {"type": "string"},
661
+ "description": "The 13 valid connector names (present when found is false).",
662
+ },
663
+ "note": {"type": "string", "description": "Guidance when no connector matched."},
664
+ "name": {"type": "string", "description": "The connector's canonical dataset name (present when found is true)."},
665
+ "codes": _CODES_SCHEMA,
666
+ "code_string": {
667
+ "type": "string",
668
+ "description": "The seven factor codes as one string in F1-F7 order, e.g. 'YNNNYYY'.",
669
+ },
670
+ "factors": _FACTORS_SCHEMA,
671
+ "band_meanings": _BAND_MEANINGS_SCHEMA,
672
+ "default_lower": {**_BAND_SCHEMA, "description": "Published lower bound of the default band (unknown U codes treated as N)."},
673
+ "default_upper": {**_BAND_SCHEMA, "description": "Published upper bound of the default band (unknown U codes treated as Y)."},
674
+ "restricted_lower": _BAND_OR_NULL_SCHEMA,
675
+ "restricted_upper": _BAND_OR_NULL_SCHEMA,
676
+ "published_bands_match": {
677
+ "type": "boolean",
678
+ "description": "True when re-scoring the stored codes reproduces the published bands exactly.",
679
+ },
680
+ "documentation_retrieved": {
681
+ "type": "string",
682
+ "description": "Date the connector's documentation was retrieved for the audit (ISO date).",
683
+ },
684
+ "source": {"type": "string", "description": "Provenance of the dataset row."},
685
+ },
686
+ "required": ["found"],
687
+ },
688
+ },
689
+ {
690
+ "name": "list_connectors",
691
+ "title": "List the connectors in the published PAARA audit",
692
+ "description": (
693
+ "List all 13 connectors in the published PAARA audit "
694
+ "(documentation snapshot, 9 Nov 2026) with their factor codes "
695
+ "and score bands.\n\n"
696
+ "WHEN TO USE: Use this to browse or compare the whole audited "
697
+ "set — for example to see which connectors score Critical, or "
698
+ "to find the exact canonical name to pass to lookup_connector. "
699
+ "For one connector's full detail use lookup_connector; to "
700
+ "score a connector outside the dataset use score_connector.\n\n"
701
+ "INPUT: No arguments.\n\n"
702
+ "RETURNS: count (13), the snapshot date and source, the F1-F7 "
703
+ "factor legend (factor code, name, and scoring weight for "
704
+ "each), the plain-language meaning of every band, an "
705
+ "explanation of how the band ranges are derived, and one entry "
706
+ "per connector with its name, F1-F7 codes, code string, and "
707
+ "default/restricted band ranges (restricted bands are null "
708
+ "when no write-limiting control was documented).\n\n"
709
+ "EXAMPLE: {} returns 13 connectors; the first entry is MCP "
710
+ "Filesystem with code string UNUUYNY and default band "
711
+ "High to Critical."
712
+ ),
713
+ "annotations": {
714
+ "title": "List audited connectors (read-only)",
715
+ "readOnlyHint": True,
716
+ "destructiveHint": False,
717
+ "idempotentHint": True,
718
+ "openWorldHint": False,
719
+ },
720
+ "inputSchema": {
721
+ "type": "object",
722
+ "properties": {},
723
+ "description": "Takes no arguments; call with an empty object.",
724
+ },
725
+ "outputSchema": {
726
+ "type": "object",
727
+ "description": "The full published 13-connector audit dataset with codes, bands, and the factor/band legends.",
728
+ "properties": {
729
+ "count": {"type": "integer", "description": "Number of connectors in the dataset (13)."},
730
+ "snapshot": {"type": "string", "description": "When the underlying documentation was retrieved."},
731
+ "source": {"type": "string", "description": "Provenance of the dataset."},
732
+ "factors": {
733
+ "type": "array",
734
+ "description": "Legend for the seven PAARA factors.",
735
+ "items": {
736
+ "type": "object",
737
+ "properties": {
738
+ "factor": {"type": "string", "enum": list(FACTORS)},
739
+ "name": {"type": "string"},
740
+ "weight": {"type": "string", "enum": ["High", "Medium", "Critical"]},
741
+ },
742
+ "required": ["factor", "name", "weight"],
743
+ },
744
+ },
745
+ "band_meanings": _BAND_MEANINGS_SCHEMA,
746
+ "bands_explained": {
747
+ "type": "string",
748
+ "description": "How the lower/upper band ranges and restricted bands are derived.",
749
+ },
750
+ "connectors": {
751
+ "type": "array",
752
+ "description": "One entry per audited connector.",
753
+ "items": {
754
+ "type": "object",
755
+ "properties": {
756
+ "name": {"type": "string"},
757
+ "codes": _CODES_SCHEMA,
758
+ "code_string": {"type": "string"},
759
+ "default_lower": _BAND_SCHEMA,
760
+ "default_upper": _BAND_SCHEMA,
761
+ "restricted_lower": _BAND_OR_NULL_SCHEMA,
762
+ "restricted_upper": _BAND_OR_NULL_SCHEMA,
763
+ },
764
+ "required": [
765
+ "name", "codes", "code_string",
766
+ "default_lower", "default_upper",
767
+ ],
768
+ },
769
+ },
770
+ },
771
+ "required": ["count", "factors", "band_meanings", "connectors"],
772
+ },
773
+ },
774
+ ]
775
+
776
+ TOOL_FUNCS = {
777
+ "score_connector": tool_score_connector,
778
+ "lookup_connector": tool_lookup_connector,
779
+ "list_connectors": tool_list_connectors,
780
+ }
781
+
782
+ # ---------------------------------------------------------------------------
783
+ # MCP JSON-RPC over stdio (newline-delimited)
784
+ # ---------------------------------------------------------------------------
785
+
786
+
787
+ def _result(req_id, payload) -> dict:
788
+ return {"jsonrpc": "2.0", "id": req_id, "result": payload}
789
+
790
+
791
+ def _error(req_id, code: int, message: str) -> dict:
792
+ return {"jsonrpc": "2.0", "id": req_id, "error": {"code": code, "message": message}}
793
+
794
+
795
+ def handle(request: dict) -> dict | None:
796
+ method = request.get("method", "")
797
+ req_id = request.get("id")
798
+ params = request.get("params") or {}
799
+
800
+ if method == "initialize":
801
+ client_version = params.get("protocolVersion")
802
+ return _result(
803
+ req_id,
804
+ {
805
+ "protocolVersion": client_version or DEFAULT_PROTOCOL,
806
+ "capabilities": {"tools": {}},
807
+ "serverInfo": {"name": SERVER_NAME, "version": SERVER_VERSION},
808
+ },
809
+ )
810
+ if method == "ping":
811
+ return _result(req_id, {})
812
+ if method == "tools/list":
813
+ return _result(req_id, {"tools": TOOLS})
814
+ if method == "tools/call":
815
+ name = params.get("name", "")
816
+ func = TOOL_FUNCS.get(name)
817
+ if func is None:
818
+ return _error(req_id, -32602, f"unknown tool: {name}")
819
+ try:
820
+ payload = func(params.get("arguments") or {})
821
+ except Exception as exc: # tool errors are reported, not fatal
822
+ return _result(
823
+ req_id,
824
+ {
825
+ "content": [{"type": "text", "text": f"Error: {exc}"}],
826
+ "isError": True,
827
+ },
828
+ )
829
+ text = json.dumps(payload, indent=2)
830
+ return _result(
831
+ req_id,
832
+ {"content": [{"type": "text", "text": text}], "structuredContent": payload},
833
+ )
834
+ if req_id is None: # notification (e.g. notifications/initialized)
835
+ return None
836
+ return _error(req_id, -32601, f"method not found: {method}")
837
+
838
+
839
+ def main() -> None:
840
+ stdin = sys.stdin.buffer
841
+ stdout = sys.stdout.buffer
842
+ for line in stdin:
843
+ line = line.strip()
844
+ if not line:
845
+ continue
846
+ try:
847
+ request = json.loads(line)
848
+ except json.JSONDecodeError:
849
+ response = _error(None, -32700, "parse error")
850
+ stdout.write(json.dumps(response).encode() + b"\n")
851
+ stdout.flush()
852
+ continue
853
+ response = handle(request)
854
+ if response is not None:
855
+ stdout.write(json.dumps(response).encode() + b"\n")
856
+ stdout.flush()
857
+
858
+
859
+ if __name__ == "__main__":
860
+ main()
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.4
2
+ Name: paara-connector-audit
3
+ Version: 1.2.2
4
+ Summary: PAARA Connector Audit MCP server (stdio, stdlib only) — score AI/MCP connectors on seven risk factors (F1-F7) and look up the published 13-connector audit.
5
+ Author-email: Vivek Kumar <vkktaskusa@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/vkktask/paara-connector-audit-kit
8
+ Project-URL: Repository, https://github.com/vkktask/paara-connector-audit-kit
9
+ Project-URL: Methodology paper (SSRN), https://doi.org/10.2139/ssrn.6784078
10
+ Project-URL: Archived dataset (Zenodo), https://doi.org/10.5281/zenodo.24325766
11
+ Keywords: mcp,model-context-protocol,ai-governance,connector-audit,risk-assessment,paara
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Information Technology
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Security
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Dynamic: license-file
23
+
24
+ # PAARA Connector Audit — MCP Server
25
+
26
+ A dependency-free (Python 3.9+ standard library only) MCP server that
27
+ exposes the **PAARA seven-factor connector scoring rule** and the
28
+ published **13-connector audit** as tools any MCP client can call.
29
+
30
+ PAARA (Privacy-Aware AI Risk Architecture) treats the connector —
31
+ OAuth/API permissions, MCP servers, retrieval pipelines — as the unit
32
+ of AI governance. Each connector is coded **Y / N / U** on seven
33
+ factors and scored as a band (lower bound: undocumented = absent;
34
+ upper bound: undocumented = present), because undocumented is not
35
+ evidence of absence.
36
+
37
+ | Factor | Meaning |
38
+ |---|---|
39
+ | F1 | Sensitive-data reach |
40
+ | F2 | Cross-system aggregation |
41
+ | F3 | Non-user-bound credentials |
42
+ | F4 | Absent logging (N = logging documented) |
43
+ | F5 | Prompt-injection exposure |
44
+ | F6 | External sharing |
45
+ | F7 | Agentic action capability (write / send / delete / execute) |
46
+
47
+ ## Tools
48
+
49
+ - `score_connector` — score any connector from its F1–F7 codes.
50
+ - `lookup_connector` — look up one of the 13 coded connectors by name.
51
+ - `list_connectors` — list the 13 coded connectors with their bands.
52
+
53
+ In the published audit (documentation retrieved 9 Nov 2026), **9 of 13
54
+ connectors score Critical** on the favourable assumption and **12 of
55
+ 13** on the unfavourable one; none reaches Low.
56
+
57
+ ## Run
58
+
59
+ ```bash
60
+ pip install paara-connector-audit
61
+ paara-connector-audit # stdio MCP server
62
+ # or
63
+ uvx paara-connector-audit
64
+ ```
65
+
66
+ Example client configuration:
67
+
68
+ ```json
69
+ {
70
+ "mcpServers": {
71
+ "paara-connector-audit": {
72
+ "command": "uvx",
73
+ "args": ["paara-connector-audit"]
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ ## Method and sources
80
+
81
+ - Kumar, V., "Privacy-Aware AI Risk Architecture (PAARA)", SSRN,
82
+ DOI 10.2139/ssrn.6784078.
83
+ - Full kit (scanner, checklist, DPIA template, coding sheet):
84
+ https://github.com/vkktask/paara-connector-audit-kit
85
+ - Archived kit and dataset (Zenodo concept DOI):
86
+ https://doi.org/10.5281/zenodo.24325766
87
+
88
+ Scores describe **documentation**, not behaviour; coding of the
89
+ 13-connector dataset is single-coder with no inter-rater reliability
90
+ reported. See the kit README for the full limitations list.
91
+
92
+ ## Licence
93
+
94
+ MIT
@@ -0,0 +1,12 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ paara_connector_audit/__init__.py
5
+ paara_connector_audit/__main__.py
6
+ paara_connector_audit/server.py
7
+ paara_connector_audit.egg-info/PKG-INFO
8
+ paara_connector_audit.egg-info/SOURCES.txt
9
+ paara_connector_audit.egg-info/dependency_links.txt
10
+ paara_connector_audit.egg-info/entry_points.txt
11
+ paara_connector_audit.egg-info/top_level.txt
12
+ paara_connector_audit/data/coding-sheet.csv
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ paara-connector-audit = paara_connector_audit.server:main
@@ -0,0 +1 @@
1
+ paara_connector_audit
@@ -0,0 +1,49 @@
1
+ # Packaging template for the PAARA Connector Audit MCP server.
2
+ # build_mcp_package.sh copies this file into the staging tree; do not
3
+ # run a build from this directory directly.
4
+ [build-system]
5
+ requires = ["setuptools>=61"]
6
+ build-backend = "setuptools.build_meta"
7
+
8
+ [project]
9
+ name = "paara-connector-audit"
10
+ version = "1.2.2"
11
+ description = "PAARA Connector Audit MCP server (stdio, stdlib only) — score AI/MCP connectors on seven risk factors (F1-F7) and look up the published 13-connector audit."
12
+ readme = "README.md"
13
+ license = { text = "MIT" }
14
+ requires-python = ">=3.9"
15
+ authors = [
16
+ { name = "Vivek Kumar", email = "vkktaskusa@gmail.com" },
17
+ ]
18
+ keywords = [
19
+ "mcp",
20
+ "model-context-protocol",
21
+ "ai-governance",
22
+ "connector-audit",
23
+ "risk-assessment",
24
+ "paara",
25
+ ]
26
+ classifiers = [
27
+ "Development Status :: 4 - Beta",
28
+ "Intended Audience :: Developers",
29
+ "Intended Audience :: Information Technology",
30
+ "License :: OSI Approved :: MIT License",
31
+ "Operating System :: OS Independent",
32
+ "Programming Language :: Python :: 3",
33
+ "Topic :: Security",
34
+ ]
35
+
36
+ [project.urls]
37
+ Homepage = "https://github.com/vkktask/paara-connector-audit-kit"
38
+ Repository = "https://github.com/vkktask/paara-connector-audit-kit"
39
+ "Methodology paper (SSRN)" = "https://doi.org/10.2139/ssrn.6784078"
40
+ "Archived dataset (Zenodo)" = "https://doi.org/10.5281/zenodo.24325766"
41
+
42
+ [project.scripts]
43
+ paara-connector-audit = "paara_connector_audit.server:main"
44
+
45
+ [tool.setuptools.packages.find]
46
+ include = ["paara_connector_audit*"]
47
+
48
+ [tool.setuptools.package-data]
49
+ paara_connector_audit = ["data/*.csv"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+