@vantageos/mcp-doctor 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,35 @@ All notable changes to `@vantageos/mcp-doctor` are documented here.
4
4
  This project adheres to [Semantic Versioning](https://semver.org/).
5
5
  Unreleased changes live as one fragment per pull request in `changelog.d/`, folded in here at release time.
6
6
 
7
+ ## 0.21.0 — 2026-11-15
8
+
9
+ ### Added
10
+ - **S-51..S-54: the served tool-result contract.** Four detectors (standard ElPi-Corp `3b4982f7`, mcp-server-standard v2.13): S-51 a schema on every served tool and a valid `structuredContent`, with any exemption mechanism red; S-52 no null or empty success; S-53 no data in free text alone; S-54 every registered tool called by the repository's tests. The introspector records one `tools/call` per callable tool (read-only, no required argument; over `--url` only with `--allow-tool-calls`), and every tool it did not call is named could-not-judge. Proven on vantage-peers @ 340ec7f4 (117 of 118 tools without a schema, a null answer, messages in text, an untested tool) and by mutation on memory, the boilerplate and vantage-peers (`scripts/s51-s54-foreign-bite-probe.sh`, `tests/s51-s54-foreign-mutation.test.ts`). (README: #s-51s-54-read-the-served-tool-results)
11
+
12
+ ### Changed
13
+ - **An MCP module the reader does not cover is could-not-judge, never "no tool".** Every rule that asks whether the tree has a tool surface now answers could-not-judge, naming the module, on a tree that declares or imports a module with `mcp` or `modelcontextprotocol` in its name and registers its tools through a form the reader does not know (e.g. FastMCP `addTool`); `@modelcontextprotocol/sdk` is the declared exception. Registered tools are filtered to product source before name de-duplication (S-43, S-44, S-51..S-54), so a same-named tool in `examples/` never hides the product one. Served S-51..S-53 read every `tools/list` page; an unread page is could-not-judge naming its cursor. The JSON Schema checker reads own keys only and leaves a malformed keyword value unread. (mcp-doctor #149, review fixes) (README: #states-and-exit-codes)
14
+
15
+ ### Fixed
16
+ - **DServer14: a challenge forwarded only on the 403 path no longer reads present.** A kit challenge (`@vantageos/cloud-identity`) counted as Element 1 when any line in a file forwarded a challenge's headers and any `.status` appeared in that file. So a server whose 401 path no longer sent `WWW-Authenticate`, while its insufficient-scope path still forwarded one with a literal `403`, read "chain complete — present". Found by the boilerplate bite probe (v050 item 2) on foreign material. A forward now counts only on a 401 path (a `401` in its block), or with the kit result's own `.status` forwarded beside it. The foreign probes c25-c26, v050 and v081 are re-anchored on the material and rulings they were written against (each change states its commit or ruling in the probe). (README: #dserver14-reads-the-401-challenge-where-the-header-is-set)
17
+ - **The events-ready receiver certificate no longer fails one run in about 256.** Its random serial could start with a 0x00 byte, a non-minimal DER INTEGER that Node refuses ("illegal padding"); the first byte is now forced into 0x40..0x7f, and `tests/self-signed-cert-serial.test.ts` generates 2000 certificates in a row. (README: #added-in-0180--events-ready-probe-s-29-to-s-33-dynamic)
18
+
19
+ ## 0.20.0 — 2026-11-10
20
+
21
+ ### Added
22
+ - **C-40 scores tool documentation per tool and per criterion, on what the server serves.** It implements ElPi-Corp #331 (trunk v2.16, read at its merge `941156e5`). Every served tool gets one verdict on each of eight criteria: title; description; the four behaviour hints as booleans; every input field described; no input description restating its schema (an enum list, a bound, the pattern, an opening "Optional", a default value in prose); an `…Id` / `…Ids` / `…Cursor` / `…By` field naming its source, an example or its convention; an output schema; every output property described and every field listed as returned present in it. The verdict carries a per-criterion tally and one line per failing tool and criterion. On the state Manufact reviewed (vantage-peers `427e74c`) it flags 18 of the 27 input fields Manufact named, plus 22 of the same form, and exactly Manufact's 44 tools with no output schema; on the fixed live server it flags none of those input fields. It was proved on four servers it did not write (server-everything 2.2.1, server-memory 2.1.0, server-filesystem 2.2.0, vantage-peers): one injected violation per form, each landed, red and restored. The introspector now also records `idempotentHint` and `openWorldHint`. **Behaviour change:** on an MCP server tree, C-40's static run is could-not-judge, because documentation is read on the served tools/list. A publish gate must declare it in `mcp-doctor.owed.json` or read it with `--mode=both`. Documented in `analysis/manufact-rules.md` (EN, FR). Also, the upstream-request analysis (S-13, S-38, S-39) now scans each file's calls once per run instead of once per followed function name, and derives its requesting-function closure once per tree: verdicts unchanged, and mcp-doctor's own tree scans in about 7 s instead of about 30 s, which had pushed the real-repo case of `tests/skipped-dirs-report.test.ts` past its 60 s timeout under full-suite load. (README: #what-it-checks-mcp-2026-07-28)
23
+ - **Five detectors close the Manufact quality score gap: C-37, C-38, S-49, S-50, A-13.** They implement ElPi-Corp #325 (`7e5513ef`). S-49 reads the served server metadata. S-50 reads the server card and the setup page at the MCP URL. C-37 reads a listing proof for each directory host. C-38 reads Claude Code's 2 KB budget on descriptions and instructions. A-13 reads `openai/toolInvocation` on App tools. Each was proved red on Manufact's failed checks for vantage-peers (its 2026-11-08 report and the served answer, committed under `fixtures/manufact-vantage-peers-2026-11-08/`). The introspector now also records the `initialize` instructions, the tools' `_meta`, and the credential-free S-50 reads. **Behaviour change:** on an MCP server, S-49's static run is could-not-judge, because instructions and capabilities are served. A publish gate must declare it in `mcp-doctor.owed.json` or read it with `--mode=both`. The rules are documented in `analysis/manufact-rules.md` (EN, FR), linked from the README. (README: #what-it-checks-mcp-2026-07-28)
24
+
25
+ ### Changed
26
+ - **C-10 checks an `indexed-*` claim against the data layer's source, and the R-4 reader moves into the kit.** C10 reads a Convex data layer through `scanR4FilterPaths`, now exported at `@vantageos/mcp-doctor/source` (moved unchanged from backend-doctor, one copy). It is red when a filter path scans while the tool claims an indexed mechanism, as in vantage-peers `6c6ff5f2` (39 paths). It is could-not-judge, never present, when no data-layer source confirms the claim. Behaviour change: such a row now needs an owed declaration under `--gate`. `typescript` becomes a runtime dependency. (README: #c-10-reads-the-data-layer-v212)
27
+ - **C19 accepts a when-to-use clause and refuses the widening clause.** C-19 required "use this whenever … even if they don't say …", which invites a call beyond the user's request and is what C-39 refuses, so no served description could pass both. Following mcp-standard v2.17 (ElPi-Corp #339), the trigger is a when-to-use clause in one of the forms the standard names, and the widening clause is non-conforming, named. On the VantagePeers list served on 2026-11-09 (92 tools), the trigger half reds 3 tools instead of 92. (README: #c19-reads-a-when-to-use-clause-never-a-widening-clause)
28
+ - **A `--url` scan refuses an internal target.** Before any request, the target's host is resolved (A and AAAA) and the scan is refused, naming the address and its block, when an address falls in a block of the IANA special-purpose registries that is not globally reachable — loopback, private, link-local (including the cloud metadata address 169.254.169.254), unique-local (including fd00:ec2::254), carrier-grade NAT, documentation, benchmarking, local-use NAT64 (64:ff9b:1::/48), Teredo and the others — or in multicast. The refused blocks are generated from the two registries pinned in the repository (`scripts/iana-special.mjs`, `--check` refuses a stale table); the most specific block holding the address decides, and a block whose reachability the registry does not state is refused. An IPv4-mapped, NAT64 (64:ff9b::/96) or 6to4 (2002::/16) address is judged by the IPv4 address it carries, and a host that does not resolve is refused. The owner of a local or internal server passes `--allow-private-target`. The same check runs in `introspectEndpoint` and `runEventsReady` for programmatic callers. Every request already stays on the target's origin and never follows a redirect. Declared limit: the resolution is read once at scan start (DNS rebinding afterwards is not re-checked). **Behaviour change:** scanning `http://localhost` or `127.0.0.1` now needs the flag. (README: #options)
29
+ - **A `--url` scan is read-only: no `tools/call` without `--allow-tool-calls`.** Until now a remote scan called the tools the target itself declared `readOnlyHint: true` (the S-2 safe call, C-11's cursor probe), and the events probe sent its `--events-trigger` call: a hint written by the server about itself decided whether a live server was called. Now no `tools/call` reaches a live server unless its owner passes `--allow-tool-calls`; the probes that need a call are could-not-judge, naming the flag, and `--events-trigger` without it is refused (exit 1). `--allow-tool-calls` without `--url` is a usage error. **Behaviour change** for anyone scanning their own server who relied on those calls: add the flag. (README: #options)
30
+
31
+ ### Fixed
32
+ - **C-10 follow-up: the foreign probe and the evidence catch up with v2.12.** `scripts/c9-c10-c12-foreign-bite-probe.sh` expects could-not-judge for C10 on its foreign tool, which has no data layer, and asserts the reason. #137 had left that probe red on main. The real-material poles are committed as tests with their origin: vantage-peers `6c6ff5f2` is red, and the version reduced from `cf745752` is green. The README states that attribution is per tree, not per tool (Eta's corrections on #137). (README: #c-10-reads-the-data-layer-v212)
33
+ - **The foreign-probe runner pins its sibling repositories.** When it clones them, it checks out vantage-mcp-boilerplate `a772895e` and vantage-peers `a22a021c` and exports `BP_REF` / `VP_REF` to those commits, so a sibling's main moving cannot change a verdict between two runs. Each run prints the commit read, and a pin the remote does not hold exits 2. A caller-supplied repository or ref still wins (Eta on #133). (README: #c-10-reads-the-data-layer-v212)
34
+ - **A served tool list larger than a pipe buffer is read whole.** The introspector wrote its result to stdout and exited in the same tick; stdout is a pipe, so only about the first 146 KB arrived and the doctor read the rest as "non-JSON output". Every served rule then came back could-not-judge: on VantagePeers (92 tools), 22 of 22. The introspector now exits once the write has drained, writes its result once, and stops cleanly when the server cannot be spawned. On VantagePeers the same run now reads all 92 tools: 7 present, 5 non-conforming, 10 could-not-judge. (README: #options)
35
+
7
36
  ## 0.19.0 — 2026-11-07
8
37
 
9
38
  ### Added
package/README.md CHANGED
@@ -69,6 +69,10 @@ usage: mcp-doctor <source-tree-path> [--mode=static|dynamic|both] [--backend=<co
69
69
  --bearer-env VAR send the token held in environment variable VAR as 'Authorization: Bearer'
70
70
  (the token never appears on a command line or in output)
71
71
  --header "Name: value" an extra request header (repeatable); values are never printed
72
+ --allow-private-target with --url: the owner's consent to scan a host that resolves to an address
73
+ that is not globally reachable (IANA registries); without it such a target is refused
74
+ --allow-tool-calls with --url: the server owner's consent to tools/call; without it the scan is
75
+ read-only and every check that needs a live call says could-not-judge
72
76
  --source DIR with --url: the server's source tree, for D8 eval counts and the C-25 expected
73
77
  commit (git rev-parse HEAD there)
74
78
  --expected-commit SHA with --url: the full commit id the server must serve (C-25)
@@ -167,6 +171,14 @@ still a violation (exit 1). Inside a judged tree, a subdirectory that cannot be
167
171
  force-installed for a member »): `absent` for a tree that is not an MCP server; a server that signs
168
172
  no member in is `could-not-judge`, because whether it is force-installed is an administrator's
169
173
  choice on the host that no source tree states.
174
+ - **An MCP module the reader does not cover is never "no tool" (0.21.0).** A tree that declares or
175
+ imports a module whose name carries `mcp` or `modelcontextprotocol` (a framework's own `addTool`, a
176
+ config-driven loader), and in which no registration form the reader knows is found, is
177
+ `could-not-judge` naming the module on every rule that asks "is there a tool surface?" — never
178
+ `absent`. The official SDK (`@modelcontextprotocol/sdk`) is the declared exception: the reader
179
+ recognises every SDK registration form, so an SDK-only tree with none of them has no tool and stays
180
+ `absent`. The registered tools of product source are filtered by file BEFORE their names are
181
+ de-duplicated, so a same-named tool in `examples/`, `scripts/` or a test never hides the product one.
170
182
  - **Consequence:** a static run of any MCP server now leaves C21 open, and S48 too when the server
171
183
  signs no member in, so it exits 2. The publish gate passes such a server once those rows are
172
184
  declared in its owed file (see [Publish gate](#publish-gate---gate)).
@@ -294,8 +306,26 @@ const cov = ruleCoverage(ids, checkedRuleIds(REGISTRY), Object.keys(NOT_CHECKABL
294
306
 
295
307
  `State` and `DetectorResult` are also exported as types.
296
308
 
309
+ ### Source reader (`@vantageos/mcp-doctor/source`)
310
+
311
+ The source-tree reader the doctors share is served at the subpath `@vantageos/mcp-doctor/source`: the TypeScript
312
+ AST helpers (`parseFile`, `registrations`, `indexFunctions`, `walk`, ...), the scan primitives (`Site`, `Scan`,
313
+ `emptyScan`, `isJudgeable`), the caller-taint helpers (`declaredNames`, `readsTainted`) and the R-4 filter-path scan
314
+ `scanR4FilterPaths(files)`. It moved here unchanged from backend-doctor (R-4 source half, backend-doctor PR #99), so
315
+ mcp-doctor's C-10 and backend-doctor's R-4 read a data layer with one copy of the same code. `typescript` is now a
316
+ runtime dependency of this package, because the reader parses the source at run time.
317
+
318
+ ```ts
319
+ import { scanR4FilterPaths } from "@vantageos/mcp-doctor/source";
320
+
321
+ const scan = scanR4FilterPaths(tree.files); // { conform, violate, cnj, reads }
322
+ ```
323
+
297
324
  ## What it checks (MCP 2026-07-28)
298
325
 
326
+ C-37, C-38, S-49, S-50, A-13 (Manufact score): [analysis/manufact-rules.md](analysis/manufact-rules.md) (EN, FR).
327
+ S-51, S-52, S-53, S-54 (served tool results): [analysis/output-contract-rules.md](analysis/output-contract-rules.md) (EN, FR).
328
+
299
329
  Each detector maps one standard item and is proven **bipolar** on real material: a genuine defect
300
330
  (MUST_FLAG) and a genuine conformant site (MUST_PASS).
301
331
 
@@ -326,7 +356,7 @@ Registered detectors that no description table above or below documents, in regi
326
356
  | **C7** artifact-verifiable | C-7 | `README.md` / `README.fr.md`: one-command install naming a registry, version pin, two obtain channels, provenance or checksum | present / non-conforming / could-not-judge |
327
357
  | **C8** authority-declared | C-8 | each registered tool's `authRead` / `authWrite` pair in the closed 5-tier set (a folded `auth` refused) | absent (no tool) / present / non-conforming / could-not-judge |
328
358
  | **C9** verb-declared | C-9 | each registered tool's `annotations.verb` in the closed set (`rpc` refused) | absent (no tool) / present / non-conforming / could-not-judge |
329
- | **C10** mechanism-declared | C-10 | each list/search tool's `annotations.searchMechanism` in the closed set (`unindexed-scan` refused) | absent (no list/search tool) / present / non-conforming / could-not-judge |
359
+ | **C10** mechanism-declared | C-10 | each list/search tool's `annotations.searchMechanism` in the closed set (`unindexed-scan` refused); an `indexed-*` claim checked against the data layer's source on every filter path (see [C-10 reads the data layer](#c-10-reads-the-data-layer-v212)) | absent (no list/search tool) / present / non-conforming / could-not-judge |
330
360
  | **C11** pagination-declared-applied | C-11 | each list/search tool's cursor, default and finite max in its annotations or `inputSchema` | absent (no paginable tool) / present / non-conforming / could-not-judge |
331
361
  | **C12** no-duplicates | C-12 | the (verb, table, mechanism) triplet of every tool declaring verb and table | absent (no tool) / present / non-conforming / could-not-judge |
332
362
  | **C13** context-ceiling | C-13 | each tool's `tokensEstimeContexte` against the declared (global, perTool) context ceiling | absent (no tool) / present / non-conforming / could-not-judge |
@@ -502,6 +532,14 @@ Not probed: `data` against `payloadSchema` (S-33), another principal and restart
502
532
  (S-30), access recheck (S-34). The SSRF canary listens on the probe's own loopback, so a hit is seen only for a
503
533
  server on the same host; for a remote server the answer decides (-32602 passes, -32015 or a result is red).
504
534
 
535
+ ### Changes in 0.21.0 — S-51..S-54 (standard `3b4982f7`)
536
+
537
+ #### S-51..S-54 read the served tool results
538
+
539
+ Four rules on what a tool answers: a schema on every tool, no null success, no data in free text alone, every tool
540
+ called by the suite. The introspector now records one `tools/call` per callable tool (`--url`: only with
541
+ `--allow-tool-calls`). Detail: [analysis/output-contract-rules.md](analysis/output-contract-rules.md).
542
+
505
543
  ### Changes in 0.18.0 — the report states what it read; DServer14 reads the challenge where it is set
506
544
 
507
545
  #### The report states how many source files and registered tools it read
@@ -536,7 +574,9 @@ subscript read) and CORS header-name lists are not set sites.
536
574
  The rule is could-not-judge, naming the site, in two cases. One: the header name sits anywhere else, such
537
575
  as a constant holding the name or a helper taking it as an argument. Two: no site qualifies and a set
538
576
  site's value cannot be read (a call, an imported identifier, several bindings). A challenge delegated to
539
- `@vantageos/cloud-identity` and forwarded is read as before. The non-conforming verdict lists every
577
+ `@vantageos/cloud-identity` is Element 1 when it is forwarded on a 401 path: a `401` in the block of the
578
+ forward, or the kit result's own `.status` forwarded beside its headers. The insufficient-scope challenge a
579
+ server forwards with a literal `403` is not it, so a server that forwards only that one is not present. The non-conforming verdict lists every
540
580
  header-set site read and why it did not count.
541
581
 
542
582
  ### Changes in 0.17.0 — S-47 (standard `1c66e11c` = mcp-server-standard v2.11, PR #311)
@@ -810,6 +850,14 @@ the browser-origin allow-list of `/mcp`, and S-22 no longer reads it as one. The
810
850
  locales JSON (`<module dir>/locales/<locale>.json`) when `t` is imported from a relative module that names those
811
851
  files. D10 accepts the French text only from the `fr` locale. Any other form is could-not-judge, naming why.
812
852
 
853
+ #### C19 reads a when-to-use clause, never a widening clause
854
+
855
+ A served description passes the trigger half of C-19 when it says when the tool applies, in a form mcp-standard
856
+ v2.17 names: `WHEN:`, `Use when`, `Use it/this/this tool when`, `Use for`, `QUAND :`, `À utiliser quand/lorsque`,
857
+ `Utiliser quand/lorsque`. The skill clause "use this whenever … even if they don't say …" (FR "même s'il ne le dit
858
+ pas", either apostrophe), in any wording of that clause (a use verb shortly followed by "whenever", "even if … do not say/mention/ask", "même si … ne le dit pas"), is non-conforming and named: it invites a call beyond the user's request, which C-39
859
+ refuses, so no description could pass both rules before.
860
+
813
861
  #### D16 credits a version served from mcp-server.json
814
862
 
815
863
  `/health` serving `manifest.version`, with `manifest` from @vantageos/mcp-boilerplate's `loadServerManifest`, reads
@@ -823,30 +871,24 @@ A pull request adds `changelog.d/<branch>.md` (frontmatter `section:`) instead o
823
871
  `npm test`. Each entry carries `(README: #<anchor>)` naming the README section that documents it, and
824
872
  `npm test` refuses an entry without one. The assembler also runs when invoked through a symlink.
825
873
 
826
- ### Added in 0.13.0 — S-43 (standard `c29f83d5` = mcp-server-standard v2.7, PR #299)
827
-
828
- | ID | Rule | The static run reads | Verdicts |
829
- |----|------|----------------------|----------|
830
- | **S43** union-input | S-43 | the input schema of every registered tool (`registerTool` config, positional `server.tool`, a project wrapper, a `{ name, inputSchema }` descriptor): Zod `z.union` / `.or` / `z.xor`, a same-file named const or local function, JSON `anyOf` / `oneOf` / `type: [...]`, at any depth (object properties, array items, record values, local `$ref`); the served half reads each served `inputSchema` | absent / present / non-conforming / could-not-judge (an identifier, spread or call the reader cannot follow) |
874
+ Changes in 0.9.0 and 0.13.0: [analysis/release-notes-0.9.0-0.13.0.md](analysis/release-notes-0.9.0-0.13.0.md).
831
875
 
832
- A union mixing an array branch and a non-array, non-null branch is non-conforming: clients do not agree on
833
- which branch to send. `// allow-union-input: <reason>` (six characters or more) on the site's line or the
834
- line above exempts it, and the exemption is reported. A named schema is followed to its binding in the same
835
- file or through a named import from a relative module of the tree; a function's parameters take the call-site
836
- argument; `z.preprocess(fn, inner)` is judged by `inner`. S-42, also written at `c29f83d5`, has no detector yet.
876
+ ### C-10 reads the data layer (v2.12)
837
877
 
838
- ### Changes in 0.9.0 (standard `015053b7` = mcp-standard v2.7, "Third-party upstream API")
878
+ C-10 (mcp-standard v2.12, ElPi-Corp `ad7e4a11` / PR #324) treats a declared `indexed-*` mechanism as a claim that
879
+ the source must confirm. When the tree holds a Convex data layer (files under `convex/`), C10 reads every public
880
+ query door and the functions it reaches through `scanR4FilterPaths`. A read filtered in memory, on a caller
881
+ argument, over a field its index range does not bound is a scanning path, and C10 is non-conforming, quoting the
882
+ first three sites. A file that does not parse, or a path whose index range cannot be read, is could-not-judge.
839
883
 
840
- | ID | Rule | The static run reads |
841
- |----|------|----------------------|
842
- | **S36** upstream-credential | S-36 | the `client_credentials` grant, where the token source is built, its cache and expiry, the 401 path, the tenancy key, secrets near logs, errors and results |
843
- | **S37** upstream-settings | S-37 | environment reads against the declared variables, literal upstream addresses, URL variables, secret flags, defaults on required variables |
844
- | **S38** bounded-upstream-call | S-38 | page walks and their ceiling, page size, cursor wrapping, retry bounds and `Retry-After`, the origin check, redirect options |
845
- | **S39** upstream-error | S-39 | time budgets, `isError` results and what is interpolated into them, catch sites, empty-success fallbacks |
846
- | **S40** upstream-rows-narrowed | S-40 | how the person is resolved, the package narrowing, the refusal paths; each tool serving upstream rows is listed as an owed human verdict (C-23) |
847
- | **S41** lake-reader | S-41 | the reader interface, the kind of each store call, the page check, the upstream reached only on a lake miss |
884
+ **Behaviour change.** A list or search that claims an `indexed-*` mechanism with no data-layer source in the tree is
885
+ now **could-not-judge**, never present: no implementation confirms the declaration. Under `--gate`, that row is
886
+ refused until the server declares it in `mcp-doctor.owed.json` with its reason. `upstream-delegated` claims no
887
+ index and is unaffected; whether its predicate travels upstream is S-38's.
848
888
 
849
- **Limit, declared.** An outbound call is recognised through `fetch`, `axios`, `got`, `ky`, `node:http(s)`, `undici` and the other HTTP-client modules named in `HTTP_CLIENT_MODULE` (`src/detectors/upstreamKit.ts`). A server that reaches its upstream only through a vendor SDK outside that list, under a name the scan does not know, reads `absent` on S36..S41: the doctor does not see the call. A tool registered from a definitions array, or a handler passed by reference, is could-not-judge naming the registration call.
889
+ **Limits, declared.** Only a Convex data layer is read. **Attribution is per tree, not per tool:** a list whose own
890
+ path is indexed still reads red when any public query of the same tree scans, because the scan is not tied to one
891
+ tool (fail-closed). The verdict names the doors, so the reader sees which list scans. C10 applies the v2.12 text under the global pin `1c66e11c`.
850
892
 
851
893
  **C-10** accepts `upstream-delegated(<upstream>)`. It is red when the name is empty, a URL, or not a declared
852
894
  upstream. The standard does not fix how an upstream is declared, so the doctor reads an `upstreams` key, in a
@@ -856,87 +898,7 @@ All six rules are static + dynamic in the standard. This release runs the static
856
898
  names the dynamic half it owes. **Behaviour change:** a server that calls `fetch` without a ceiling, a retry
857
899
  bound or a typed error can now turn red on S-38 or S-39, where 0.8.x said nothing.
858
900
 
859
- ### Changes in 0.8.1 (standard `6d463a1e` = v2.6 `24c1ffc9` + S-35)
860
-
861
- | ID | Rule | The static run reads | Verdicts |
862
- |----|------|----------------------|----------|
863
- | **S35** scope-in-read | S-35 | each `<client>.query\|action(<door>, <args>)` and, in the same block, a narrowing of what it returned (`scopeFilterList`, `scopeFilterGet`, a `.filter` on an organisation / namespace / recipient / owner field or the caller context, a skipping branch in a loop) | absent / present / non-conforming / could-not-judge (door named by an expression) |
864
-
865
- **C-11 (b)** dynamic: an invalid cursor is sent to each protocol list method (`-32602`) and as the cursor
866
- argument of each tool that takes one (`isError: true`, `structuredContent.error.code` = `invalid_cursor`).
867
- A tool is called only when it declares `readOnlyHint: true` and its `inputSchema.required` is well-formed and
868
- names nothing but `cursor`; any other tool is not called, and C-11 names why (could-not-judge for that tool).
869
- **C-9** accepts `prepare` (a read verb). **C-13** reads the ceiling from the server manifest's
870
- `contextCeiling` as well as from a source constant. **S-22** resolves an `allowedOrigins` element held by a
871
- same-file const. **DLocalIdentity** does not count a hash over local file content. **D3 / D4** attribute a
872
- result builder to the tool that contains it.
873
-
874
- **What `present` means for a rule whose other half is dynamic (0.8.0).** S-11, S-13, S-14, S-16, A-3, A-4
875
- and A-5 return `present` on a static positive path: the verdict says `static half: ...` and names the half it
876
- did NOT read (`NOT read by this run: ...`) — the served output conforms, progress is monotone, the negotiation
877
- probe, the runtime file trace, the CI result of the axe run, render/roundtrip/memory. `--mode=dynamic` does not
878
- implement those reads. Read `present` on these rows as "the static half holds", never as "the rule is held".
879
-
880
- **An owed human verdict is a field, not a state.** There is no fifth state. A `could-not-judge` whose
881
- owed half is judgement carries `owedVerdict: { kind: "human", rule: "C-23", sites: [{ anchor, element,
882
- what }] }` (S-5 (i)/(j), C-24, C-28, S-20). The human report lists the sites in an "owed human verdicts"
883
- section, counted; `--json` prints `{ surface, exitCode, owedHumanVerdicts, results, skipped }` and the
884
- field is in each result. The `VERDICT DUE (C-23)` prose prefix is gone: a consumer counts owed
885
- verdicts from the field, never from prose.
886
-
887
- **S-5 (g) and (l)** match their key bare, double-quoted or single-quoted. **A-11** calls a typed
888
- literal any quoted `*.claudemcpcontent.com` (any label, any case, any quoting, a scheme, several
889
- labels, or a literal joined to the suffix); the bare suffix constant and an interpolated label are not
890
- literals.
891
-
892
- Amended rules, adapted in place: **C-2** (a tool name is at most 64 characters), **C-15** (a `title`,
893
- and no enumerated parameter spanning a read and a write verb), **C-16** (event payloads), **S-3**
894
- (`skills/list` and `skills/get`), **S-4** (the closed trigger: manifest `minProtocolVersion >=
895
- 2026-07-28`, the `events` capability, a host extension), **E-1** (the vendor-namespace registry
896
- `vendor-namespaces.json`, `openai/` first member, shipped in the package and read by the detector),
897
- **E-3** (the fourth type, `host-capability-adapter`), and, with new detectors because they never had
898
- one, **S-12**, **A-2** and **A-7**. **C-6** now flags a log of an environment variable that names a
899
- URL / endpoint / host, and of `process.cwd()` and the other absolute-path sources, through
900
- `console.*`, `logger.*` and `process.stderr|stdout.write`, directly or through an identifier, a
901
- destructured binding or an object property.
902
-
903
- The coverage grid (`analysis/mcp-doctor-coverage-grid.md`) is derived by
904
- `npx tsx scripts/standard-coverage.ts <pin> <ElPi-Corp checkout>`; the foreign-material bite proof is
905
- `npm run test:v070-foreign-bite` and `npm run test:v080-foreign-bite` (see `scripts/v070-foreign-bite-probe.sh` and `scripts/v080-foreign-bite-probe.sh`).
906
-
907
- **DLocalIdentity exemptions.** Two, both reported as `EXEMPT` rather than hidden: the
908
- `@vantageos/cloud-identity` package itself (read from the target's `package.json` name), and a site
909
- carrying `// allow-local-identity: <reason of 8 characters or more>` on the line, in the comment
910
- block directly above it, or above its enclosing top-level declaration. A marker with a shorter reason,
911
- or the retired `local-identity-exempt:` spelling, is not a justification and the site stays a violation. A file whose brackets never balance, or that is
912
- not UTF-8 text, is `could-not-judge`. To adopt the rule on a tree that still holds sites, pass
913
- `--local-identity-ceiling=<current count>` as a ratchet; the row then reads `present` and still lists
914
- every site.
915
-
916
- **Reading rules, 0.6.0** (each changed detector; details and rationale in [CHANGELOG.md](./CHANGELOG.md)).
917
- - **C15 / C8 / C9 / C10 / C11 / C13** resolve `annotations: SOME_CONST` to a same-tree `const` object; an
918
- unresolvable value is `could-not-judge`, never "missing".
919
- - **C19** counts `"a" + "b"`, an expression-free template literal and apostrophe-bearing strings as a
920
- declared description; **D10** reads `description_fr:` with the literal on the next line or a const.
921
- - **DServer14** accepts a 401 challenge delegated to `@vantageos/cloud-identity`
922
- (`unauthorizedChallenge` / `verifyMcpAccessToken`, status + header forwarded), a PRM route registered
923
- through a path constant, and is red on `@vantageos/mcp-auth-kit` or `cloud-identity` below 0.15.0.
924
- - **C17** accepts, without CI, a `Provenance: <pkg>@<version> npm-pack shasum <40-hex> ...` record naming the
925
- published version (**proposed evidence form, reviewer rules**); **C18** identifies the server manifest by
926
- content (`mcpServers` = OpenAI plugin config; the manifest is `mcp-server.json` then) and is red on two.
927
- - **D2** names `mcp-session-id` in a CORS list as inert and flags only real session keying;
928
- **DServer6** reports every site and does not count a name whose value is a literal constant;
929
- **C17** reads the repository-root `.github/workflows` for a subpackage; **C25** accepts a derived
930
- `commit` served on `/health` beside `version`; a project-local registration wrapper
931
- (`defineTool(...)`) is derived from the function that forwards a parameter to `registerTool`, so its
932
- tools are judged.
933
- - **TSX/JSX files** are lexed; a file that ends inside an unterminated JSX element is unreadable, not skipped.
934
-
935
- **This table is a sample, not the inventory.** Every registered detector runs on every invocation,
936
- so the authoritative list is simply the output of a run — one row per detector. The registered set
937
- lives in `src/detectors/index.ts`. No count is written here on purpose: a number typed into a README
938
- is correct on the day it is written and wrong at the next detector, which is exactly how this
939
- heading came to claim 6 while the tool shipped dozens. **Adding a detector is how a friction becomes durable — see [CONTRIBUTING.md](./CONTRIBUTING.md) for the loop.**
901
+ Changes in 0.8.1: [analysis/release-notes-0.8.1.md](analysis/release-notes-0.8.1.md).
940
902
 
941
903
  ## Positioning
942
904