mcpprobe-scanner 0.2.0__tar.gz → 0.3.1__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.
Files changed (97) hide show
  1. mcpprobe_scanner-0.3.1/CHANGELOG.md +273 -0
  2. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/CHECKS.md +143 -7
  3. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/PKG-INFO +63 -7
  4. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/README.md +58 -6
  5. mcpprobe_scanner-0.3.1/docs/benchmark.md +94 -0
  6. mcpprobe_scanner-0.3.1/docs/github-action.md +126 -0
  7. mcpprobe_scanner-0.3.1/docs/judges.md +62 -0
  8. mcpprobe_scanner-0.3.1/docs/marketplace-listing.md +80 -0
  9. mcpprobe_scanner-0.3.1/docs/mcp-registry.md +179 -0
  10. mcpprobe_scanner-0.3.1/docs/registry-report.md +344 -0
  11. mcpprobe_scanner-0.3.1/docs/report-schema.md +110 -0
  12. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/__init__.py +1 -1
  13. mcpprobe_scanner-0.3.1/mcpprobe/action.py +176 -0
  14. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/checks/__init__.py +17 -0
  15. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/checks/auth.py +8 -2
  16. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/checks/base.py +9 -2
  17. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/checks/capability.py +106 -0
  18. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/checks/metadata.py +10 -81
  19. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/checks/poisoning.py +164 -55
  20. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/checks/proof.py +9 -0
  21. mcpprobe_scanner-0.3.1/mcpprobe/checks/protocol_2026.py +749 -0
  22. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/checks/robustness.py +15 -8
  23. mcpprobe_scanner-0.3.1/mcpprobe/checks/tool_surface.py +339 -0
  24. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/checks/transport_conformance.py +6 -3
  25. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/cli.py +49 -1
  26. mcpprobe_scanner-0.3.1/mcpprobe/judges/__init__.py +31 -0
  27. mcpprobe_scanner-0.3.1/mcpprobe/judges/hf.py +125 -0
  28. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/models.py +41 -1
  29. mcpprobe_scanner-0.3.1/mcpprobe/readiness.py +341 -0
  30. mcpprobe_scanner-0.3.1/mcpprobe/registry/__init__.py +31 -0
  31. mcpprobe_scanner-0.3.1/mcpprobe/registry/__main__.py +5 -0
  32. mcpprobe_scanner-0.3.1/mcpprobe/registry/aggregate.py +629 -0
  33. mcpprobe_scanner-0.3.1/mcpprobe/registry/batch.py +449 -0
  34. mcpprobe_scanner-0.3.1/mcpprobe/registry/cli.py +326 -0
  35. mcpprobe_scanner-0.3.1/mcpprobe/registry/common.py +264 -0
  36. mcpprobe_scanner-0.3.1/mcpprobe/registry/fetch.py +249 -0
  37. mcpprobe_scanner-0.3.1/mcpprobe/registry/pipeline.py +432 -0
  38. mcpprobe_scanner-0.3.1/mcpprobe/registry/render.py +359 -0
  39. mcpprobe_scanner-0.3.1/mcpprobe/registry/select.py +153 -0
  40. mcpprobe_scanner-0.3.1/mcpprobe/registry/static.py +105 -0
  41. mcpprobe_scanner-0.3.1/mcpprobe/registry/template.py +169 -0
  42. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/scanner.py +58 -6
  43. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/transport/base.py +23 -0
  44. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/transport/fingerprint.py +7 -8
  45. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/transport/http.py +99 -1
  46. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/pyproject.toml +9 -1
  47. mcpprobe_scanner-0.3.1/scripts/benchmark_judge.py +363 -0
  48. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/conftest.py +2 -0
  49. mcpprobe_scanner-0.2.0/tests/test_meta01_corpus.py → mcpprobe_scanner-0.3.1/tests/data/meta01_corpus.json +9 -46
  50. mcpprobe_scanner-0.3.1/tests/data/meta01_heldout.json +67 -0
  51. mcpprobe_scanner-0.3.1/tests/data/meta01_real_benign.json +22579 -0
  52. mcpprobe_scanner-0.3.1/tests/data/registry/page-1.json +140 -0
  53. mcpprobe_scanner-0.3.1/tests/data/registry/page-2.json +125 -0
  54. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/fake_server.py +191 -22
  55. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/fake_stdio_server.py +11 -3
  56. mcpprobe_scanner-0.3.1/tests/test_checks_03.py +369 -0
  57. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/test_checks_meta.py +28 -9
  58. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/test_checks_transport.py +5 -1
  59. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/test_docs_and_action.py +33 -3
  60. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/test_fixture_outcomes.py +179 -5
  61. mcpprobe_scanner-0.3.1/tests/test_judges.py +151 -0
  62. mcpprobe_scanner-0.3.1/tests/test_meta01_corpus.py +116 -0
  63. mcpprobe_scanner-0.3.1/tests/test_registry_report.py +943 -0
  64. mcpprobe_scanner-0.2.0/CHANGELOG.md +0 -129
  65. mcpprobe_scanner-0.2.0/mcpprobe/action.py +0 -69
  66. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/.gitignore +0 -0
  67. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/LICENSE +0 -0
  68. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/NOTICE +0 -0
  69. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/SECURITY.md +0 -0
  70. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/authz.py +0 -0
  71. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/catalogue.py +0 -0
  72. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/chains.py +0 -0
  73. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/checks/_util.py +0 -0
  74. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/checks/active_stubs.py +0 -0
  75. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/checks/baseline.py +0 -0
  76. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/dnsutil.py +0 -0
  77. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/environment.py +0 -0
  78. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/governance.py +0 -0
  79. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/policy.py +0 -0
  80. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/py.typed +0 -0
  81. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/redact.py +0 -0
  82. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/report/__init__.py +0 -0
  83. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/report/json_report.py +0 -0
  84. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/report/sarif.py +0 -0
  85. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/report/terminal.py +0 -0
  86. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/transport/__init__.py +0 -0
  87. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/transport/evidence.py +0 -0
  88. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/transport/ratelimit.py +0 -0
  89. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/mcpprobe/transport/stdio.py +0 -0
  90. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/__init__.py +0 -0
  91. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/data/sarif-schema-2.1.0.json +0 -0
  92. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/test_checks_auth.py +0 -0
  93. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/test_checks_robustness.py +0 -0
  94. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/test_environment_and_evidence.py +0 -0
  95. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/test_gate_and_policy.py +0 -0
  96. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/test_reports_and_cli.py +0 -0
  97. {mcpprobe_scanner-0.2.0 → mcpprobe_scanner-0.3.1}/tests/test_transport.py +0 -0
@@ -0,0 +1,273 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
5
+ [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.3.1] - 2026-11-01
10
+
11
+ Fewer false tool-poisoning alarms. META-01 (tool poisoning) was flagging ordinary
12
+ documentation in real MCP servers: tool descriptions that say "call this tool first",
13
+ name a sibling tool, link to docs, or mention `~/.ssh` only to say such paths are
14
+ rejected. 0.3.1 retunes those rules. On real tool descriptions from published MCP
15
+ servers that were held out from the tuning, precision at medium or above rose from
16
+ 48.0% to 96.0% (false-positive rate 2.7% to 0.1%), and the share of server packages with at
17
+ least one medium-or-above META-01 finding fell from 22.5% to 2.2% on the tuning set
18
+ and from 25.6% to 2.6% on the held-out set. Recall on the project's poisoned texts is
19
+ unchanged (77.4% at medium or above). Known-bad cases such as the demo's `run_command`
20
+ and the 0.2.0 planted-instruction example are still High. Numbers and method:
21
+ [docs/benchmark.md](docs/benchmark.md).
22
+
23
+ ### Changed
24
+
25
+ - META-01 rules 0.3.1 (`RULES_VERSION`): usage guidance ("always use this tool to", "you
26
+ must call X first", "call this first when") is no longer an indicator on its own;
27
+ shadowing needs wording that changes what another tool does; dictionary-word tool names
28
+ count only when quoted; plain URLs and example.com addresses are not indicators; a
29
+ credential path is medium only after a read/send verb that is not negated; shadowing in
30
+ server instructions is low. On 3,762 real descriptions from 128 published MCP server
31
+ packages (`tests/data/meta01_real_benign.json`) the medium-or-above false-positive rate
32
+ fell from 2.8% to 0.1% (22.5% to 2.2% of packages); recall on the project's poisoned set
33
+ is unchanged at medium or above. See docs/benchmark.md.
34
+ - Registry survey disclosure queue: an open server is descriptive. A host qualifies only
35
+ for META-05 secrets (P1), META-03 high/critical without authentication or AUTH-04 (P2),
36
+ META-01 high from current rules (P3) or META-07 without authentication (P4).
37
+
38
+ ### Added
39
+
40
+ - `registry-report recheck` (re-run survey-profile checks on hosts with visible tools, or
41
+ `--from-queue`, under the same polite rules) and `registry-report reaggregate` (offline;
42
+ merges scan and recheck passes, re-runs static checks, prints before/after counts).
43
+ - `disclosure-summary.json` (counts only), survey cross-tabs (capability and trifecta by
44
+ authentication, tool-count distribution, open servers with write/exec-capable tools) in
45
+ `aggregates.json` and the report; derived labels (`meta01_rules`, `meta01_indicators`,
46
+ `capabilities`) in `scan.jsonl`.
47
+
48
+ - `mcpprobe registry-report fetch|scan|calibrate|aggregate|render` (also
49
+ `python -m mcpprobe.registry`): a resumable pipeline for an anonymised "State of MCP
50
+ server security" report over the official MCP Registry. It covers:
51
+ - paging the list API;
52
+ - remote and package-only selection;
53
+ - static META-01/06/07 on the tool definitions in registry entries;
54
+ - a passive survey-profile batch scan (opt-out first, 1 request/s per provider,
55
+ at most 8 hosts in parallel, public addresses only with pinned connections,
56
+ same origin only, stop on 429/403, no response bodies stored);
57
+ - aggregates with 95% Wilson intervals;
58
+ - a Markdown/SVG report that refuses to name third-party hosts.
59
+
60
+ See [docs/registry-report.md](docs/registry-report.md).
61
+
62
+ ## [0.3.0]
63
+
64
+ Directory readiness, the 2026-07-28 protocol rules, tool annotations and toxic flows.
65
+ Report schema 0.3 (additions only). 24 passive checks, up from 16.
66
+
67
+ ### Added
68
+
69
+ - **META-06 Tool annotation lint.** Missing `readOnlyHint`, `openWorldHint` and title on
70
+ every tool, `destructiveHint`/`idempotentHint` on every tool not marked read-only (the
71
+ spec says they only mean something then), non-boolean hints, and annotations that
72
+ contradict the tool's apparent capability (read-only or non-destructive on something
73
+ that executes, writes, deletes, sends or pays; closed-world on a network tool). Medium
74
+ when a dangerous-class tool is mislabelled, low when annotations are only missing;
75
+ one finding lists every tool. Fix text cites Anthropic's directory policy (5E) and
76
+ OpenAI's app review.
77
+ - **META-07 Toxic flow (lethal trifecta).** Warns when one server offers access to
78
+ private data, intake of untrusted content and a way to send data out, listing the
79
+ tools in each role. Medium; high when the endpoint needs no authentication. A tool
80
+ advertising arbitrary command execution counts for all three roles.
81
+ - **2026-07-28 checks**, each verified against the specification text on
82
+ modelcontextprotocol.io and not applicable (with the negotiated revision as the
83
+ reason) on servers that speak an earlier revision:
84
+ - TRANS-06 `server/discover` result: `supportedVersions` including 2026-07-28,
85
+ `capabilities`, `resultType: "complete"`; missing `serverInfo` is informational.
86
+ - TRANS-07 a protocol version the server does not list in `supportedVersions` is
87
+ served instead of rejected with HTTP 400 / `UnsupportedProtocolVersionError`
88
+ (-32022): downgrade acceptance. One request.
89
+ - TRANS-08 `Mcp-Method` header that differs from the body, or is missing, is not
90
+ rejected with HTTP 400 / `HeaderMismatch` (-32020). Two requests. `Mcp-Name` is
91
+ not tested passively (it exists only for `tools/call`, `resources/read`,
92
+ `prompts/get`).
93
+ - TRANS-09 `ttlMs` (number >= 0) and `cacheScope` (`public`/`private`) missing or
94
+ invalid on `server/discover` and list results. Sends nothing.
95
+ - AUTH-05 authorization server metadata does not advertise
96
+ `authorization_response_iss_parameter_supported: true` (RFC 9207). Sends nothing.
97
+ - AUTH-06 deprecated Dynamic Client Registration offered without Client ID Metadata
98
+ Documents (low), or alongside them (informational). Sends nothing.
99
+ - "Deprecated HTTP+SSE still reachable" stays TRANS-04 (no new ID).
100
+ - **Directory readiness** (`readiness` in the JSON report): Anthropic 5D/5E/2G/3F,
101
+ OpenAI annotations, HubSpot no-critical/high, exfiltration/poisoning risk and HTTPS,
102
+ each `met` / `not_met` / `not_assessable` with source URL, check IDs and a note.
103
+ Derived only from checks that ran; ownership (3F) is always not assessable from the CLI.
104
+ - **Rate-limit handling.** HTTP 429 is honoured with `Retry-After` (1 s when absent), at
105
+ most 3 retries per request, within a scan-wide waiting budget (`--rate-limit-wait`,
106
+ default 30 s). When the budget is used up, the checks that met the throttled
107
+ responses are reported `not_applicable` (blocked) and their findings withheld,
108
+ instead of drawing conclusions from throttled responses. DOS-01's burst still
109
+ observes 429 directly. A target that rate-limits negotiation is reported
110
+ `unreachable`, not "not an MCP server".
111
+ - **Optional Hugging Face judge for META-01** (`--judge hf:<model-id-or-path>`,
112
+ `--judge-download`, `--judge-threshold`; extra `mcpprobe-scanner[hf]`). Off by
113
+ default, safetensors only, no remote code, no download unless asked. Licence notes in
114
+ docs/judges.md.
115
+ - `scripts/benchmark_judge.py` and docs/benchmark.md: precision, recall and false-positive
116
+ rate of META-01 on the in-sample corpus and on a new held-out set (65% recall at medium
117
+ or above, 0 false positives on 40 benign descriptions). The Hugging Face Hub was not
118
+ reachable when the numbers were produced, so no public dataset or classifier was scored.
119
+ - Report schema 0.3: `checks[].blocked`, `fingerprint.supported_versions`, `readiness`.
120
+ - Fixture `trifecta` (a conformant 2026-07-28 server whose tools form the trifecta); all
121
+ its check outcomes are pinned in CI.
122
+
123
+ ### Changed
124
+
125
+ - Annotation contradictions moved from META-03 to META-06 (reported once). META-03 is
126
+ now titled "Dangerous tool capability exposed". E-mail and payment tools count as
127
+ writes only when a mutating verb (send, charge, refund, ...) is present, so a
128
+ read-only `list_emails` marked `readOnlyHint: true` is no longer a contradiction.
129
+ - 2026-07-28 requests now carry the required `io.modelcontextprotocol/clientCapabilities`
130
+ and the recommended `clientInfo` in `_meta`.
131
+ - The fingerprint reads `supportedVersions` and `_meta["io.modelcontextprotocol/serverInfo"]`
132
+ from `server/discover` as the 2026-07-28 schema defines them (the pre-release keys are
133
+ no longer merged into `server_info`).
134
+ - The `hardened` fixture is now dual-era (2026-07-28 and 2025-11-25) with
135
+ spec-conformant `server/discover`, header validation, caching hints, RFC 9207 and
136
+ CIMD metadata; it still produces zero findings.
137
+
138
+ ### GitHub Action
139
+
140
+ - The Action now names its outcome: one annotation per run (`mcpprobe: findings`,
141
+ `mcpprobe: not an MCP server`, `mcpprobe: scan error`, or a `mcpprobe: passed`
142
+ notice), a job summary with a severity table, and a new `result` output (`clean`,
143
+ `findings`, `error`, `not-mcp`). Exit code 3 (not an MCP server) is documented in
144
+ the `exit-code` output. `sarif-file` is empty when no SARIF was written.
145
+ - `action.yml` description shortened to 115 characters for GitHub Marketplace.
146
+ - README and new `docs/github-action.md` pin `@v0.3.0` and upload SARIF only for exit
147
+ codes 0 and 1: SARIF from an error or a non-MCP target has no results and would
148
+ close every open alert. New manual-only example workflow
149
+ `.github/workflows/example-scan.yml`.
150
+
151
+
152
+ ## [0.2.0]
153
+
154
+ Accuracy release, driven by an independent review of a 0.1.0 scan of the project's own
155
+ deliberately weak demo server. 0.1.0 missed the demo's textbook tool poisoning,
156
+ reported four checks as passed that had tested nothing, and rated an unauthenticated
157
+ remote shell low. All of that is fixed and pinned by fixtures in CI.
158
+
159
+ - Licence changes from MIT to Apache-2.0 for future releases. Version 0.1.0 remains available under MIT.
160
+
161
+ ### Fixed
162
+
163
+ - **META-01 missed obvious poisoning.** It now detects instructions aimed at the model
164
+ ("always call this first", "call this tool before any other", "you must", "do not
165
+ tell the user", "ignore previous instructions"), requests to send the model's context
166
+ out (conversation, chat history, system prompt, previous messages), requests to
167
+ harvest the user's secrets, and HTML comments, in tool, argument, prompt and resource
168
+ descriptions. A directive combined with a context-exfiltration request is high. The
169
+ demo's `run_command` description is now reported high. Several 0.1 patterns that
170
+ fired on benign text ("Read the file at the given path", "Forward an email",
171
+ "Silently ignores unknown fields", "Operating system: Linux", "rather than the user's
172
+ timezone") were tightened; a corpus of 33 benign real-world descriptions must stay
173
+ below medium in the test-suite.
174
+ - **Checks no longer report "passed" for things they did not test.** New check status
175
+ `not_applicable` (with a one-sentence reason and an optional `related_to`), raised
176
+ through `NotApplicable`. Every early exit was audited: AUTH-03/AUTH-04 are not
177
+ applicable when the server needs no authentication (related to AUTH-01), TRANS-03
178
+ when no `Mcp-Session-Id` is issued, META-* when no tool metadata could be read,
179
+ ERR-01/DOS-01 when every probe was stopped at authentication, META-02 without a
180
+ previous baseline, TRANS-01/TRANS-02 when a 401/429 hides the behaviour. Transport
181
+ failures are now `error`, not a pass. Reporters count only `ran` with no findings
182
+ as passed; SARIF lists not-applicable checks as notifications, never as passes.
183
+ - **AUTH-02 passed when the metadata was missing.** Missing RFC 9728 metadata is now a
184
+ finding on unauthenticated servers too (medium on public hosts, low on loopback).
185
+ - **AUTH-01 misreported servers scanned with credentials.** When `--header` supplies
186
+ credentials, one extra request is sent with them removed; a 401/403 marks the server
187
+ protected. AUTH-04's query-string probe no longer carries the operator's own token.
188
+ - **Not an MCP server.** A target that answers but does not speak MCP (for example an
189
+ ordinary web site) no longer aborts with a generic error or produces results: the
190
+ report has `target_kind: "not_mcp"`, every check is not applicable with the
191
+ observation ("Not an MCP server: initialize -> HTTP 200 text/html"), and the CLI
192
+ exits with the new code 3. Unreachable targets get `target_kind: "unreachable"`
193
+ (exit 2, as before).
194
+
195
+ ### Changed
196
+
197
+ - **META-03 rates by capability.** Tools that advertise arbitrary command execution or
198
+ arbitrary file read/write (a shell or file capability selected by a free-form string
199
+ argument) are high on their own and critical on an unauthenticated public endpoint.
200
+ The fix text says to remove or sandbox the tool with an allow-list; annotations come
201
+ after. The description states that a passive scan sees the advertised capability, not
202
+ whether the implementation really executes. Annotation contradictions are one finding
203
+ listing every affected tool. Check title updated accordingly.
204
+ - **One finding per check per root cause.** META-04 emits one finding listing every
205
+ affected tool, with each tool's complete `inputSchema` and its specific problems
206
+ (including arguments missing from `required` and `additionalProperties` not false).
207
+ - **Evidence and proof.** Every finding has `proof` (the complete object judged, built
208
+ from parsed data), `verify` (one runnable line, a `curl` against the real target for
209
+ HTTP), `affected`, `evidence_ids`, and `confidence_reason` whenever confidence is not
210
+ high (enforced). Evidence keeps every request and response header, with credential
211
+ headers redacted, and bodies up to 64 KiB (was 4 KiB).
212
+ - **Environment-aware fix text.** The edge is detected from response headers
213
+ (`apigw-requestid`/`x-amz-apigw-id` -> AWS API Gateway, CloudFront, Cloudflare
214
+ `cf-ray`, Vercel `x-vercel-id`) and public vs local hosts are told apart. TRANS-05 and
215
+ DOS-01 say where to configure TLS, headers and throttling; AUTH-01 and TRANS-01 drop
216
+ "bind to 127.0.0.1" on public hosts. AUTH-01 shows the exact `WWW-Authenticate` header
217
+ with the target's metadata URL and notes that authentication does not make a shell
218
+ tool safe. TRANS-01 also probes and advises on `Origin: null` and allows requests with
219
+ no Origin. TRANS-02 mentions version negotiation on `initialize`.
220
+ - **Attack chains.** New top-level `chains`: CHAIN-01 (unauthenticated + arbitrary
221
+ capability, + poisoned description when META-01 fired on that tool, critical) and
222
+ CHAIN-02 (the same on a local server that accepts foreign Origins). A chain is only
223
+ emitted when every constituent finding is present.
224
+ - Report schema 0.2 (`schema_version`, `target_kind`, `environment`, `chains`, the new
225
+ finding fields, `checks[].related_to`, `summary.checks_passed` /
226
+ `checks_not_applicable`), documented in `docs/report-schema.md`.
227
+
228
+ ### Tests
229
+
230
+ - Fixtures pinned in CI: an exact replica of the public demo server (`--preset demo`),
231
+ the observable passive behaviour of a hardened reference server (`--preset
232
+ hardened`), and an ordinary HTML site (`--preset html`). The exact outcome of every
233
+ check against each is asserted; any change fails the suite.
234
+
235
+ ## [0.1.0]
236
+
237
+ - Published on PyPI as `mcpprobe-scanner` (PyPI blocks `mcpprobe` and `mcpprobe-cli` as too similar to existing projects). The command and the Python package are both `mcpprobe`.
238
+ - 2026-10-27
239
+
240
+ First public release of the open-source scanner core.
241
+
242
+ ### Added
243
+
244
+ - MCP client for Streamable HTTP (JSON-RPC over POST, JSON or SSE responses)
245
+ and stdio, written to send deliberately non-conformant requests.
246
+ - Protocol fingerprinting: `server/discover` (2026-07-28) first, then
247
+ `initialize` with 2025-11-25 and 2025-06-18, then the deprecated
248
+ 2024-11-05 HTTP+SSE transport.
249
+ - Evidence log: every request/response with timestamp, method, status, a
250
+ header subset, bodies truncated to 4 KB, `Authorization` values and known
251
+ secret patterns redacted.
252
+ - Passive checks: AUTH-01..04, TRANS-01..05, META-01..05, ERR-01, DOS-01.
253
+ - Active checks INJ-01..05, SUPPLY-01/02 and SANDBOX-01 registered as gated
254
+ stubs (report `not_implemented`; no payloads are sent).
255
+ - Governance items GOV-01..05 listed as attestation-only in every report.
256
+ - Authorisation gate for active mode: `--authorised-by`, `--scope` and
257
+ ownership verification (`--verify dns-txt` via `_mcpprobe.<host>` TXT, or
258
+ `--verify local` for stdio); an authorisation record JSON is written next to
259
+ the report.
260
+ - Opt-out: DNS TXT `mcpprobe-opt-out=all` at `_mcpprobe.<host>` and
261
+ `/.well-known/mcpprobe-opt-out`, both checked before any MCP request.
262
+ - Rate limiting: 5 requests/second by default, hard ceiling 10.
263
+ - Reports: JSON (with evidence), SARIF 2.1.0 (validated against the official
264
+ schema in tests) and a rich terminal summary. Exit codes 0 / 1 / 2.
265
+ - META-02 baselines: canonical SHA-256 of tools, prompts, resources and
266
+ instructions with diffing against a stored baseline (rug-pull detection).
267
+ - Optional LLM-judge hook for META-01 (`ScanOptions.judge`); mcpprobe makes no
268
+ LLM or third-party network calls itself.
269
+ - Docker container GitHub Action, CI (ruff, strict mypy, pytest on Python
270
+ 3.11 to 3.13) and PyPI Trusted Publishing release workflow.
271
+
272
+ [0.3.1]: https://github.com/mcpprobe-dev/mcpprobe/releases/tag/v0.3.1
273
+ [0.1.0]: https://github.com/mcpprobe-dev/mcpprobe/releases/tag/v0.1.0
@@ -1,6 +1,6 @@
1
1
  # mcpprobe checks catalogue
2
2
 
3
- Generated from the check metadata of mcpprobe 0.2.0 (`mcpprobe checks --format markdown`). Do not edit by hand.
3
+ Generated from the check metadata of mcpprobe 0.3.1 (`mcpprobe checks --format markdown`). Do not edit by hand.
4
4
 
5
5
  Standards: OWASP MCP Top 10 (IDs `MCP0x:2025`, still a beta list, so shown with `(beta)`), OWASP Top 10 for Agentic Applications (`ASI0x`), OWASP Top 10 for LLM Applications 2026 (`LLM0x:2026`, primary) and 2025 (`LLM0x:2025`, kept for one release cycle). Severities are defaults; a check can raise or lower the severity of an individual finding (for example loopback-only servers are reported one level lower), and heuristic checks never rate a finding Critical on their own.
6
6
 
@@ -14,16 +14,24 @@ Passive checks send only what a normal MCP client would send plus a few benign m
14
14
  | [AUTH-02](#auth-02---protected-resource-metadata-rfc-9728-missing-or-invalid) | passive | high | Protected resource metadata (RFC 9728) missing or invalid | MCP07:2025 (beta) |
15
15
  | [AUTH-03](#auth-03---authorization-server-metadata-weak-or-missing-pkce-s256--https) | passive | high | Authorization server metadata weak or missing (PKCE S256 / HTTPS) | MCP07:2025 (beta), MCP01:2025 (beta) |
16
16
  | [AUTH-04](#auth-04---server-accepts-a-self-minted-token-with-the-wrong-audienceissuer) | passive | critical | Server accepts a self-minted token with the wrong audience/issuer | MCP07:2025 (beta), MCP01:2025 (beta), ASI03 |
17
+ | [AUTH-05](#auth-05---authorization-server-does-not-advertise-rfc-9207-iss-support-2026-07-28) | passive | low | Authorization server does not advertise RFC 9207 iss support (2026-07-28) | MCP07:2025 (beta) |
18
+ | [AUTH-06](#auth-06---deprecated-dynamic-client-registration-offered-2026-07-28) | passive | low | Deprecated Dynamic Client Registration offered (2026-07-28) | MCP07:2025 (beta) |
17
19
  | [TRANS-01](#trans-01---origin-header-not-validated-dns-rebinding-exposure) | passive | medium | Origin header not validated (DNS-rebinding exposure) | MCP07:2025 (beta) |
18
20
  | [TRANS-02](#trans-02---unsupported-mcp-protocol-version-header-not-rejected) | passive | low | Unsupported MCP-Protocol-Version header not rejected | MCP spec conformance / hygiene (no OWASP item) |
19
21
  | [TRANS-03](#trans-03---weak-predictable-or-unvalidated-mcp-session-id) | passive | high | Weak, predictable or unvalidated Mcp-Session-Id | MCP07:2025 (beta) |
20
22
  | [TRANS-04](#trans-04---deprecated-httpsse-2024-11-05-transport-in-use) | passive | info | Deprecated HTTP+SSE (2024-11-05) transport in use | MCP spec conformance / hygiene (no OWASP item) |
21
23
  | [TRANS-05](#trans-05---plain-http-weak-tls-or-missing-security-headers) | passive | high | Plain HTTP, weak TLS or missing security headers | MCP01:2025 (beta) |
24
+ | [TRANS-06](#trans-06---serverdiscover-result-incomplete-2026-07-28) | passive | low | server/discover result incomplete (2026-07-28) | MCP spec conformance / hygiene (no OWASP item) |
25
+ | [TRANS-07](#trans-07---protocol-version-the-server-does-not-advertise-is-accepted-downgrade) | passive | low | Protocol version the server does not advertise is accepted (downgrade) | MCP spec conformance / hygiene (no OWASP item) |
26
+ | [TRANS-08](#trans-08---mcp-method-header-not-validated-against-the-request-body-2026-07-28) | passive | medium | Mcp-Method header not validated against the request body (2026-07-28) | MCP spec conformance / hygiene (no OWASP item) |
27
+ | [TRANS-09](#trans-09---ttlms--cachescope-caching-hints-missing-or-invalid-2026-07-28) | passive | low | ttlMs / cacheScope caching hints missing or invalid (2026-07-28) | MCP spec conformance / hygiene (no OWASP item) |
22
28
  | [META-01](#meta-01---possible-tool-description-poisoning) | passive | high | Possible tool-description poisoning | MCP03:2025 (beta), ASI01, ASI04, LLM01:2026, LLM01:2025 |
23
29
  | [META-02](#meta-02---tool-surface-changed-since-the-stored-baseline-rug-pull-indicator) | passive | medium | Tool surface changed since the stored baseline (rug-pull indicator) | MCP03:2025 (beta), ASI04 |
24
- | [META-03](#meta-03---dangerous-tool-capability-exposed-or-annotations-contradict-it) | passive | high | Dangerous tool capability exposed or annotations contradict it | MCP02:2025 (beta), MCP05:2025 (beta), ASI02, ASI05, LLM03:2026, LLM06:2025 |
30
+ | [META-03](#meta-03---dangerous-tool-capability-exposed) | passive | high | Dangerous tool capability exposed | MCP02:2025 (beta), MCP05:2025 (beta), ASI02, ASI05, LLM03:2026, LLM06:2025 |
25
31
  | [META-04](#meta-04---tool-schema-hygiene-problems) | passive | low | Tool schema hygiene problems | MCP05:2025 (beta) |
26
32
  | [META-05](#meta-05---secret-material-in-server-metadata-or-configuration) | passive | high | Secret material in server metadata or configuration | MCP01:2025 (beta), LLM02:2026, LLM02:2025 |
33
+ | [META-06](#meta-06---tool-annotations-missing-or-inconsistent-with-the-tool) | passive | medium | Tool annotations missing or inconsistent with the tool | MCP spec conformance / hygiene (no OWASP item) |
34
+ | [META-07](#meta-07---toxic-flow-private-data-untrusted-content-and-external-send-on-one-server) | passive | medium | Toxic flow: private data, untrusted content and external send on one server | ASI01, LLM01:2026, LLM01:2025 |
27
35
  | [ERR-01](#err-01---verbose-error-responses-leak-stack-traces-paths-or-versions) | passive | medium | Verbose error responses leak stack traces, paths or versions | MCP08:2025 (beta), LLM02:2026, LLM02:2025 |
28
36
  | [DOS-01](#dos-01---no-visible-limits-on-request-size-nesting-or-rate) | passive | low | No visible limits on request size, nesting or rate | ASI08, LLM06:2026, LLM10:2025 |
29
37
  | [INJ-01](#inj-01---commandcode-injection-safe-canaries) | active | critical | Command/code injection (safe canaries) | MCP05:2025 (beta), ASI05, LLM10:2026 |
@@ -106,6 +114,38 @@ Mints two syntactically valid JWTs the server cannot have issued (HS256 with a r
106
114
 
107
115
  **Fix.** Validate the token signature against the authorization server's keys, require 'aud' to equal this server's canonical URI (RFC 8707), reject alg=none, and never read tokens from query strings.
108
116
 
117
+ ### AUTH-05 - Authorization server does not advertise RFC 9207 iss support (2026-07-28)
118
+
119
+ | | |
120
+ |---|---|
121
+ | Mode | passive (implemented) |
122
+ | Default severity | low |
123
+ | Transports | http |
124
+ | Standards | MCP07:2025 (beta) |
125
+ | Evidence | The authorization server metadata document AUTH-03 fetched. |
126
+
127
+ 2026-07-28 says MCP authorization servers SHOULD include the RFC 9207 'iss' parameter in authorization responses and, when they do, MUST advertise authorization_response_iss_parameter_supported: true in their metadata; clients reject a response without iss only when that flag is true. Reads the authorization server metadata AUTH-03 already fetched and reports a flag that is absent or not true. Sends nothing. The revision says this SHOULD is expected to become a MUST.
128
+
129
+ **False positives.** The spec allows a server to emit iss before it updates its metadata; such a server is reported until the flag is published, because clients key their rejection on the flag.
130
+
131
+ **Fix.** Include iss in every authorization response, error responses too (RFC 9207 section 2), and publish "authorization_response_iss_parameter_supported": true in the authorization server metadata (https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization#authorization-response-validation). With a hosted identity provider, enable its issuer-identification option.
132
+
133
+ ### AUTH-06 - Deprecated Dynamic Client Registration offered (2026-07-28)
134
+
135
+ | | |
136
+ |---|---|
137
+ | Mode | passive (implemented) |
138
+ | Default severity | low |
139
+ | Transports | http |
140
+ | Standards | MCP07:2025 (beta) |
141
+ | Evidence | The authorization server metadata document AUTH-03 fetched. |
142
+
143
+ 2026-07-28 deprecates OAuth Dynamic Client Registration (RFC 7591) in favour of Client ID Metadata Documents, which authorization servers SHOULD support. Reads the authorization server metadata AUTH-03 already fetched: a registration_endpoint without client_id_metadata_document_supported: true is low (clients have only the deprecated path); a registration_endpoint next to CIMD support is informational (kept for backwards compatibility). No registration request is sent.
144
+
145
+ **False positives.** Keeping DCR for older clients is allowed; the informational finding is a reminder to plan its removal, not a defect. An authorization server that supports neither DCR nor CIMD (pre-registration only) is not reported here.
146
+
147
+ **Fix.** Support Client ID Metadata Documents and advertise "client_id_metadata_document_supported": true; keep registration_endpoint only while older clients still need it, and plan its removal (https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/client-registration). Open registration endpoints also deserve rate limits and redirect-URI validation.
148
+
109
149
  ### TRANS-01 - Origin header not validated (DNS-rebinding exposure)
110
150
 
111
151
  | | |
@@ -186,6 +226,70 @@ Flags non-loopback endpoints served over plain HTTP (bearer tokens in clear), TL
186
226
 
187
227
  **Fix.** Serve the endpoint over HTTPS with TLS 1.2+ only, add Strict-Transport-Security and X-Content-Type-Options: nosniff. Where an edge (API Gateway, CloudFront, Cloudflare, Vercel) is detected the fix text says where to configure it.
188
228
 
229
+ ### TRANS-06 - server/discover result incomplete (2026-07-28)
230
+
231
+ | | |
232
+ |---|---|
233
+ | Mode | passive (implemented) |
234
+ | Default severity | low |
235
+ | Transports | http, stdio |
236
+ | Standards | MCP spec conformance / hygiene (no OWASP item) |
237
+ | Evidence | The fingerprinting server/discover request and its complete result. |
238
+
239
+ A 2026-07-28 server MUST implement server/discover. The scanner's first request is server/discover; when it is answered, its result is checked for what the revision requires: supportedVersions (a list of version strings that includes the 2026-07-28 revision the request was served under), a capabilities object and resultType 'complete'. A missing _meta['io.modelcontextprotocol/serverInfo'] (SHOULD) is reported as informational. Caching hints on the same result are checked by TRANS-09. Not applicable to servers that speak an earlier revision through initialize.
240
+
241
+ **False positives.** A server that answers server/discover under an earlier result shape (for example a 'protocolVersions' key from a pre-release draft) is reported, because 2026-07-28 clients read 'supportedVersions'.
242
+
243
+ **Fix.** Return the DiscoverResult defined in the 2026-07-28 schema: {"resultType":"complete","supportedVersions":["2026-07-28", ...],"capabilities":{...},"_meta":{"io.modelcontextprotocol/serverInfo":{"name":...,"version":...}},"ttlMs":...,"cacheScope":"public"} (https://modelcontextprotocol.io/specification/2026-07-28/server/discover).
244
+
245
+ ### TRANS-07 - Protocol version the server does not advertise is accepted (downgrade)
246
+
247
+ | | |
248
+ |---|---|
249
+ | Mode | passive (implemented) |
250
+ | Default severity | low |
251
+ | Transports | http |
252
+ | Standards | MCP spec conformance / hygiene (no OWASP item) |
253
+ | Evidence | The server/discover result (supportedVersions) and the downgraded request with its response. |
254
+
255
+ Takes supportedVersions from the server/discover result and sends one more server/discover declared (in _meta and in the MCP-Protocol-Version header) as the newest earlier revision the server does not list (2025-11-25, 2025-06-18 or 2025-03-26). The spec says a server that does not implement the requested version MUST answer HTTP 400 with UnsupportedProtocolVersionError (-32022). Serving the request anyway means a client or intermediary can push the server onto a revision it claims not to support, without the header validation and other protections of 2026-07-28. One request, no tool is called.
256
+
257
+ **False positives.** A dual-era server that does serve the older revision but forgot to list it is reported too; listing it in supportedVersions is then the fix. Not applicable when every earlier revision is advertised.
258
+
259
+ **Fix.** Reject any request whose declared protocol version is not in your supportedVersions with HTTP 400 and {"code":-32022,"message":"Unsupported protocol version","data":{"supported":[...],"requested":"..."}}, before doing any work (https://modelcontextprotocol.io/specification/2026-07-28/basic/versioning). If you do serve the older revision, list it in supportedVersions.
260
+
261
+ ### TRANS-08 - Mcp-Method header not validated against the request body (2026-07-28)
262
+
263
+ | | |
264
+ |---|---|
265
+ | Mode | passive (implemented) |
266
+ | Default severity | medium |
267
+ | Transports | http |
268
+ | Standards | MCP spec conformance / hygiene (no OWASP item) |
269
+ | Evidence | Both probe requests (headers shown) and their responses. |
270
+
271
+ 2026-07-28 requires clients to mirror the JSON-RPC method into an Mcp-Method header, and servers that process the body MUST reject a request whose headers are missing or do not match the body with HTTP 400 and HeaderMismatch (-32020); otherwise a gateway that routes, rate-limits or authorises on the header can be bypassed by a body that says something else. Sends two server/discover requests: one with 'Mcp-Method: tools/list' and one with no Mcp-Method header. Mcp-Name is not tested, because it is only defined for tools/call, resources/read and prompts/get, which a passive scan does not send.
272
+
273
+ **False positives.** A server that rejects the probes with another 4xx is reported as informational only. When a gateway in front rejects mismatches itself, the finding concerns the server behind it only if the gateway can be bypassed.
274
+
275
+ **Fix.** Before dispatching, compare Mcp-Method (and, for tools/call, resources/read and prompts/get, the decoded Mcp-Name) with the body; when a required header is missing or differs, answer HTTP 400 with {"code":-32020,"message":"Header mismatch: ..."} (https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http#server-validation).
276
+
277
+ ### TRANS-09 - ttlMs / cacheScope caching hints missing or invalid (2026-07-28)
278
+
279
+ | | |
280
+ |---|---|
281
+ | Mode | passive (implemented) |
282
+ | Default severity | low |
283
+ | Transports | http, stdio |
284
+ | Standards | MCP spec conformance / hygiene (no OWASP item) |
285
+ | Evidence | The server/discover and list results the scan already received. |
286
+
287
+ 2026-07-28 servers MUST include caching hints on complete results of server/discover, tools/list, prompts/list and resources/list (among others): ttlMs, a number of milliseconds that MUST be >= 0, and cacheScope, either 'public' or 'private'. Checks the results the scan already received; sends nothing. A missing cacheScope leaves shared gateways to guess whether a list may be served to other users.
288
+
289
+ **False positives.** Only the first page of each list is checked. A public cacheScope on an authenticated server is allowed by the spec when the list is the same for every user, so it is not reported.
290
+
291
+ **Fix.** Add "ttlMs": <milliseconds, >= 0> and "cacheScope": "public" (identical for every user) or "private" (depends on the caller's authorization) to every cacheable result (https://modelcontextprotocol.io/specification/2026-07-28/server/utilities/caching).
292
+
189
293
  ### META-01 - Possible tool-description poisoning
190
294
 
191
295
  | | |
@@ -196,9 +300,9 @@ Flags non-loopback endpoints served over plain HTTP (bearer tokens in clear), TL
196
300
  | Standards | MCP03:2025 (beta), ASI01, ASI04, LLM01:2026, LLM01:2025 |
197
301
  | Evidence | The tools/list (or prompts/resources/initialize) response and the matched excerpts. |
198
302
 
199
- Scans every tool, prompt and resource description, every inputSchema parameter description and the server 'instructions' for: prompt-style markup (<IMPORTANT>, <system>, HTML comments), instructions aimed at the model (call this first / before any other tool, you must, conceal from the user, ignore previous instructions, redirect/replace), requests to send the model's context out (conversation, chat history, system prompt, previous messages), requests to harvest secrets (the user's API key, token, password, credentials, .env), credential file paths, references to other tools with behaviour-modifying language (shadowing), URLs and e-mail addresses with send/BCC wording, base64 blobs, zero-width/bidi/tag Unicode, mixed-script homoglyphs and excessive length. Findings carry tiered confidence and are never rated Critical on heuristics alone. A model directive combined with a request to send context out is rated high. Precision is guarded by a corpus of benign real-world descriptions in the test-suite that must stay below medium.
303
+ Scans every tool, prompt and resource description, every inputSchema parameter description and the server 'instructions' for: prompt-style markup (<IMPORTANT>, <system>, HTML comments), instructions aimed at the model (conceal from the user, ignore previous instructions, claim precedence over every other tool or over what the user asks, redirect/replace), requests to send the model's context out (conversation, chat history, system prompt, previous messages), requests to harvest secrets (the user's API key, token, password, credentials, .env), credential file paths next to a read/send verb, wording that changes what another tool does (shadowing), URLs and e-mail addresses with send/BCC wording, base64 blobs, zero-width/bidi/tag Unicode, mixed-script homoglyphs and excessive length. Ordinary usage guidance ("always use this tool to...", "you must call X first") is not an indicator on its own; it raises a finding to high when combined with another instruction category. Findings carry tiered confidence and are never rated Critical on heuristics alone. Precision is guarded in the test-suite by thousands of real descriptions from published MCP servers (docs/benchmark.md).
200
304
 
201
- **False positives.** Legitimate guidance such as 'IMPORTANT: call authenticate before this tool' matches the markup and prerequisite heuristics at medium confidence. URLs to documentation and mentions of sibling tools without behaviour-modifying words are reported at low severity. Review the matched excerpts; a second-opinion judge can be plugged in through the Python API (ScanOptions.judge); mcpprobe itself makes no LLM calls.
305
+ **False positives.** Legitimate text that claims precedence over every other tool ('call this before any other tool whenever...') is reported at medium. Plain URLs, sibling-tool mentions and usage guidance are not reported; a credential path without a read/send verb is low. Review the matched excerpts; a second-opinion judge can be plugged in through the Python API (ScanOptions.judge); mcpprobe itself makes no LLM calls.
202
306
 
203
307
  **Fix.** Rewrite the description so it only says what the tool does. Remove every instruction addressed to the model (when to call it, what to call first, what to hide from the user) and every request to pass along conversation, prompts, files or credentials. Strip invisible Unicode and HTML comments, and never reference other servers' tools. Pin and hash approved descriptions in clients (see META-02).
204
308
 
@@ -218,7 +322,7 @@ Computes SHA-256 over the canonical JSON of each tool, prompt and resource defin
218
322
 
219
323
  **Fix.** Treat tool definitions as code: version them, review changes, and have clients pin and re-approve definitions when the hash changes.
220
324
 
221
- ### META-03 - Dangerous tool capability exposed or annotations contradict it
325
+ ### META-03 - Dangerous tool capability exposed
222
326
 
223
327
  | | |
224
328
  |---|---|
@@ -228,11 +332,11 @@ Computes SHA-256 over the canonical JSON of each tool, prompt and resource defin
228
332
  | Standards | MCP02:2025 (beta), MCP05:2025 (beta), ASI02, ASI05, LLM03:2026, LLM06:2025 |
229
333
  | Evidence | The tools/list response; each affected tool's complete definition is shown as proof. |
230
334
 
231
- Classifies each tool by name, description and parameter names into capability classes. Tools that advertise arbitrary command execution, arbitrary file read or arbitrary file write (a shell/file capability selected by a free-form string argument with no enum, const or pattern) are rated high on their own and critical when the remote endpoint needs no authentication. Declared annotations are cross-checked (a command tool marked readOnlyHint:true is reported), and the remaining high-impact surface (network, e-mail, credentials, payments) is summarised at low severity. Passive scanning sees the advertised capability, not whether the implementation really executes: the rating is based on the name, description and schema, and no tool is called.
335
+ Classifies each tool by name, description and parameter names into capability classes. Tools that advertise arbitrary command execution, arbitrary file read or arbitrary file write (a shell/file capability selected by a free-form string argument with no enum, const or pattern) are rated high on their own and critical when the remote endpoint needs no authentication. The remaining high-impact surface (network, e-mail, credentials, payments) is summarised at low severity. Annotations that contradict the capability are reported by META-06 (until 0.2 they were reported here). Passive scanning sees the advertised capability, not whether the implementation really executes: the rating is based on the name, description and schema, and no tool is called.
232
336
 
233
337
  **False positives.** Classification is keyword-based: a tool named 'delete_draft' that only removes the user's own draft will be classed 'delete'. A tool that advertises a shell but whose implementation is a stub is still reported, because clients and models act on the advertised capability.
234
338
 
235
- **Fix.** For arbitrary command execution or file access: remove the tool, or sandbox it and replace the free-form argument with an allow-list (enum) of commands or files. Annotations come after that. Make annotations truthful (destructiveHint:true for anything that executes or deletes); they help a careful client warn the user but do nothing about the risk.
339
+ **Fix.** For arbitrary command execution or file access: remove the tool, or sandbox it and replace the free-form argument with an allow-list (enum) of commands or files. Annotations come after that (META-06); they help a careful client warn the user but do nothing about the risk.
236
340
 
237
341
  ### META-04 - Tool schema hygiene problems
238
342
 
@@ -266,6 +370,38 @@ Pattern and entropy scan for AWS/GitHub/Slack/Stripe/Google keys, private key bl
266
370
 
267
371
  **Fix.** Remove secrets from descriptions and resources, rotate anything that was exposed, and pass credentials through the environment or a secret store, never through metadata.
268
372
 
373
+ ### META-06 - Tool annotations missing or inconsistent with the tool
374
+
375
+ | | |
376
+ |---|---|
377
+ | Mode | passive (implemented) |
378
+ | Default severity | medium |
379
+ | Transports | http, stdio |
380
+ | Standards | MCP spec conformance / hygiene (no OWASP item) |
381
+ | Evidence | The tools/list response; each affected tool's name, title and annotations are shown as proof. |
382
+
383
+ Reads each tool's annotations from tools/list. Reported as missing: readOnlyHint, openWorldHint and a title (tool.title or annotations.title) on every tool, and destructiveHint and idempotentHint on every tool not marked readOnlyHint:true (the spec says those two are meaningful only when readOnlyHint is false). Reported as inconsistent: readOnlyHint:true on a tool that looks like it executes, writes, deletes, sends or pays; destructiveHint:false on a tool that looks like it executes, deletes or overwrites; openWorldHint:false on a tool that reaches the network; a hint that is not a boolean; and, as low-severity noise, destructiveHint:true on a tool that only appears to read. Medium when a dangerous-class tool is mislabelled, low when annotations are merely missing. One finding lists every affected tool. Anthropic's directory policy (5E) and OpenAI's app review both require accurate annotations.
384
+
385
+ **False positives.** The capability behind a contradiction is inferred from keywords in the tool's name, description and parameter names, so a narrowly scoped tool (for example 'delete_draft' that only removes the caller's own draft) may be misread. Missing annotations are a plain observation. Annotations are hints that clients must treat as untrusted; correcting them does not change what a tool can do.
386
+
387
+ **Fix.** Give every tool a title and set readOnlyHint and openWorldHint explicitly; for tools that are not read-only also set destructiveHint and idempotentHint. Make each value true to the implementation: readOnlyHint:true only when nothing is modified, destructiveHint:true for anything that executes, deletes or overwrites, openWorldHint:true for tools that reach the internet or other external systems. Anthropic's Software Directory Policy (5E, https://support.claude.com/en/articles/13145358-anthropic-software-directory-policy) requires all applicable annotations, and OpenAI's app review (https://developers.openai.com/plugins/deploy/app-review.md) checks readOnlyHint, destructiveHint and openWorldHint for accuracy.
388
+
389
+ ### META-07 - Toxic flow: private data, untrusted content and external send on one server
390
+
391
+ | | |
392
+ |---|---|
393
+ | Mode | passive (implemented) |
394
+ | Default severity | medium |
395
+ | Transports | http, stdio |
396
+ | Standards | ASI01, LLM01:2026, LLM01:2025 |
397
+ | Evidence | The tools/list response; each role lists its tools and the wording that put them there. |
398
+
399
+ Classifies every advertised tool into three roles from its capability class and wording: access to private data (files, databases, credentials, the user's mail), intake of untrusted content (fetching URLs, web search, reading mail or messages written by others) and a way to send data out (sending e-mail or messages, HTTP posts, webhooks, uploads). A tool advertising arbitrary command execution counts for all three; arbitrary file read counts as private data. When one server offers all three roles, text planted in the untrusted content can instruct the model to read the private data and send it away: the 'lethal trifecta' of prompt injection. Medium, high when the HTTP endpoint needs no authentication. One finding lists the tools in each role. No tool is called.
400
+
401
+ **False positives.** Roles are inferred from names, descriptions and capability keywords, not from behaviour. A 'fetch' tool restricted to one internal API, or a 'send' tool that only notifies the signed-in user, is still counted. Conversely a fetch tool with a free-form URL can leak data through the URL itself; that path is not counted as a send role.
402
+
403
+ **Fix.** Break the trifecta: split the tools across separate servers (or separate client configurations) so no single agent session combines private data, untrusted content and an outbound channel; or gate the send tool behind explicit per-call user confirmation and an allow-list of destinations; or constrain the intake tool to trusted sources. Keep the server authenticated so nobody else can drive the combination.
404
+
269
405
  ### ERR-01 - Verbose error responses leak stack traces, paths or versions
270
406
 
271
407
  | | |
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: mcpprobe-scanner
3
- Version: 0.2.0
3
+ Version: 0.3.1
4
4
  Summary: Security scanner for Model Context Protocol (MCP) servers: auth, transport, tool-metadata and poisoning checks with JSON and SARIF output.
5
5
  Project-URL: Homepage, https://mcpprobe.tech
6
6
  Project-URL: Scanning policy, https://mcpprobe.tech/scanning-policy
@@ -35,6 +35,10 @@ Requires-Dist: mypy>=1.10; extra == 'dev'
35
35
  Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
36
36
  Requires-Dist: pytest>=8.0; extra == 'dev'
37
37
  Requires-Dist: ruff>=0.4; extra == 'dev'
38
+ Provides-Extra: hf
39
+ Requires-Dist: safetensors>=0.4; extra == 'hf'
40
+ Requires-Dist: torch>=2.2; extra == 'hf'
41
+ Requires-Dist: transformers>=4.40; extra == 'hf'
38
42
  Description-Content-Type: text/markdown
39
43
 
40
44
  # mcpprobe
@@ -84,16 +88,40 @@ which checks ran, which were skipped and why. `mcpprobe checks` lists every chec
84
88
 
85
89
  | Area | Checks | Examples |
86
90
  |---|---|---|
87
- | Authentication | AUTH-01..04 | endpoint answers without credentials; missing RFC 9728 protected-resource metadata; no PKCE S256; accepts a self-minted JWT with the wrong audience; token accepted in the query string |
88
- | Transport | TRANS-01..05 | `Origin` not validated (DNS rebinding); bogus `MCP-Protocol-Version` accepted; weak or forgeable `Mcp-Session-Id`; deprecated HTTP+SSE; plain HTTP, weak TLS, missing headers |
89
- | Tool metadata | META-01..05 | instructions aimed at the model ("always call this first", "do not tell the user"), requests to send conversation, system prompt or secrets out, cross-tool shadowing, credential paths, URLs, base64, HTML comments, zero-width/bidi/homoglyph Unicode; rug-pull diff against a stored SHA-256 baseline; advertised arbitrary command execution or file access (high, critical when unauthenticated) and annotations that contradict capability; schema hygiene; secrets in descriptions or stdio env |
91
+ | Authentication | AUTH-01..06 | endpoint answers without credentials; missing RFC 9728 protected-resource metadata; no PKCE S256; accepts a self-minted JWT with the wrong audience; token accepted in the query string; 2026-07-28: authorization server does not advertise RFC 9207 `iss`, deprecated Dynamic Client Registration without Client ID Metadata Documents |
92
+ | Transport | TRANS-01..09 | `Origin` not validated (DNS rebinding); bogus `MCP-Protocol-Version` accepted; weak or forgeable `Mcp-Session-Id`; deprecated HTTP+SSE still served; plain HTTP, weak TLS, missing headers; 2026-07-28: incomplete `server/discover` result, a version the server does not advertise accepted (downgrade), `Mcp-Method` header/body mismatch not rejected with -32020, missing or invalid `ttlMs`/`cacheScope` |
93
+ | Tool metadata | META-01..07 | instructions aimed at the model ("always call this first", "do not tell the user"), requests to send conversation, system prompt or secrets out, cross-tool shadowing, credential paths, URLs, base64, HTML comments, zero-width/bidi/homoglyph Unicode; rug-pull diff against a stored SHA-256 baseline; advertised arbitrary command execution or file access (high, critical when unauthenticated); schema hygiene; secrets in descriptions or stdio env; tool annotations missing or contradicting the tool (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`, title); the "lethal trifecta" of private data, untrusted content and an outbound channel on one server |
90
94
  | Robustness | ERR-01, DOS-01 | stack traces and versions in errors; one oversized argument, one 64-deep nesting probe and 20 paced `tools/list` calls, never more |
91
95
  | Active (gated stubs) | INJ-01..05, SUPPLY-01/02, SANDBOX-01 | registered and reported as `not_implemented` in this release |
92
96
  | Governance | GOV-01..05 | listed as attestation-only: not assessable by a scan, never marked passed |
93
97
 
98
+ 24 passive checks (plus 8 gated active stubs and 5 attestation-only governance items);
99
+ `mcpprobe checks` lists them.
100
+
94
101
  Protocol revisions: the scanner tries `server/discover` (2026-07-28) first, then
95
102
  `initialize` with 2025-11-25 and 2025-06-18, then the deprecated 2024-11-05 HTTP+SSE
96
- transport, and records which one answered.
103
+ transport, and records which one answered. Checks for rules that only exist in
104
+ 2026-07-28 are reported not applicable, with the negotiated revision as the reason,
105
+ on servers that speak an earlier one.
106
+
107
+ ## Directory readiness
108
+
109
+ Every JSON report carries a `readiness` list that maps the scan onto the listing
110
+ requirements of the Anthropic, OpenAI and HubSpot MCP directories (OAuth 2.0, complete
111
+ and accurate tool annotations, no hidden instructions, no unresolved critical/high
112
+ findings, low exfiltration and poisoning risk, HTTPS). Each item is `met`, `not_met` or
113
+ `not_assessable`, cites its source and names the checks it rests on; it is derived only
114
+ from checks that actually ran, and anything a scan cannot decide (such as proof of
115
+ endpoint ownership) is `not_assessable` with the reason. See
116
+ [docs/report-schema.md](docs/report-schema.md).
117
+
118
+ ## Rate limits on the target
119
+
120
+ An HTTP 429 is honoured: the request is repeated after `Retry-After` (1 s if absent),
121
+ within a total waiting budget for the whole scan (`--rate-limit-wait`, 30 s by default).
122
+ When the budget is used up, the checks whose requests were throttled are reported
123
+ not applicable instead of drawing conclusions from throttled responses. DOS-01's burst
124
+ is the exception: a 429 there is the evidence it looks for.
97
125
 
98
126
  ## Passive vs active
99
127
 
@@ -142,6 +170,14 @@ opt-outs (below), but those are courtesy mechanisms, not permission.
142
170
  - an HTTP `200` at `/.well-known/mcpprobe-opt-out`.
143
171
  - Rate: 5 requests/second by default (`--rate`), hard ceiling 10.
144
172
 
173
+ ## Registry survey report
174
+
175
+ `mcpprobe registry-report` builds an anonymised, aggregate-only report on the remote
176
+ servers listed in the official MCP Registry. It uses a reduced passive profile (only what
177
+ an ordinary MCP client sends) and honours opt-outs. It paces traffic at 1 request per
178
+ second per provider and stops at the first 429 or 403. How to run it and the disclosure
179
+ process are in [docs/registry-report.md](docs/registry-report.md).
180
+
145
181
  ## Exit codes
146
182
 
147
183
  | Code | Meaning |
@@ -166,19 +202,25 @@ jobs:
166
202
  runs-on: ubuntu-latest
167
203
  steps:
168
204
  - uses: actions/checkout@v4
169
- - uses: mcpprobe-dev/mcpprobe@v0.1.0
205
+ - uses: mcpprobe-dev/mcpprobe@v0.3.1
206
+ id: scan
170
207
  with:
171
208
  target: https://staging.your-server.example/mcp
172
209
  fail-on: high
173
210
  sarif-output: mcpprobe.sarif
174
211
  sarif-location: src/server.py # optional: anchor alerts to a repo file
212
+ # Upload only when the scan ran (exit 0 or 1). Exit 2 (error) and 3 (not an MCP
213
+ # server) produce SARIF with no results, which would close every open alert.
175
214
  - uses: github/codeql-action/upload-sarif@v3
176
- if: always()
215
+ if: ${{ !cancelled() && (steps.scan.outputs.exit-code == '0' || steps.scan.outputs.exit-code == '1') }}
177
216
  with:
178
217
  sarif_file: mcpprobe.sarif
179
218
  category: mcpprobe
180
219
  ```
181
220
 
221
+ Inputs, outputs, exit codes and a manual-dispatch example are in
222
+ [docs/github-action.md](docs/github-action.md).
223
+
182
224
  Or from any CI with the CLI:
183
225
 
184
226
  ```console
@@ -216,6 +258,20 @@ description after approval is the classic rug pull) and update the file; use
216
258
  Server-supplied text is shown with control characters made visible and is never
217
259
  interpreted as terminal markup.
218
260
 
261
+ ## Optional classifier for META-01
262
+
263
+ ```console
264
+ $ pip install 'mcpprobe-scanner[hf]' # transformers, torch, safetensors
265
+ $ mcpprobe https://your-server.example/mcp --judge hf:/path/to/local/model
266
+ $ mcpprobe https://your-server.example/mcp --judge hf:<hub-model-id> --judge-download
267
+ ```
268
+
269
+ Off by default. A local prompt-injection classifier gives META-01 a second opinion; it
270
+ adds a medium-severity indicator when it flags a description. Only `.safetensors`
271
+ weights are loaded, model code is never executed, and nothing is downloaded unless you
272
+ pass `--judge-download`. Model licences differ; read [docs/judges.md](docs/judges.md)
273
+ first. Detection numbers for the heuristics are in [docs/benchmark.md](docs/benchmark.md).
274
+
219
275
  ## Python API and LLM-judge hook
220
276
 
221
277
  ```python