@vantageos/mcp-doctor 0.20.0 → 0.22.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 +18 -0
- package/README.md +24 -111
- package/dist/doctor.d.ts +80 -0
- package/dist/doctor.js +2624 -333
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ 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.22.0 — 2026-11-24
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- **C-40 (8) reads the description's Returns clause against the outputSchema's top-level properties.** An object literal ("Returns { a, b }", with its ", or { … }" alternatives and "plus x" additions) is the result's shape: a name the schema lacks is red. A top-level property the literal leaves out is a note printed under the tool, never red, and the criterion stays green. A field list ("Returns the row as JSON (a, b)") is red only on a name the schema lacks. A clause in prose that names no field is out of the check, and so is a description with no Returns clause. An outputSchema with no top-level properties object, a literal inside prose, a group mixing names and prose, an unread member or an unbalanced bracket is could-not-judge, named. A name found only deeper in the schema is named with its path. On Manufact's per-tool review of vantage-peers (92 tools, vendored in `fixtures/manufact-vantage-peers-2026-11-09-per-tool/`), the check reds none and notes 12 tools, 9 of the 20 Manufact asks to align. `scripts/manufact-per-tool-compare.ts` prints the doctor and Manufact verdicts per tool and per dimension, with the disagreements counted in both directions, and a closing Returns line: how many of Manufact's "align" flags the check reds, and how many tools carry the note. (README: #what-it-checks-mcp-2026-07-28)
|
|
11
|
+
- **S-5 (f)..(l) is read on the wire under `--url`.** The introspector now records both Protected Resource Metadata copies (path-suffixed and bare) and the OIDC discovery at the same-origin issuer: (f) is judged (`resource` equals the MCP URL, path included, at both copies; a copy not served is red; an unreadable copy is could-not-judge naming its URL), (j) and (k) are read when served (unestablished when absent, never red), and a handshake refused with 401 is judged from the public reads. Only (h), (i) and `iss` on every authorization response stay named as not read (they need an authorization-request probe or a human verdict). (README: #detectors-added-in-070-standard-b714129a-elpi-corp-243)
|
|
12
|
+
|
|
13
|
+
## 0.21.0 — 2026-11-15
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **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)
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- **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)
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
- **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)
|
|
23
|
+
- **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)
|
|
24
|
+
|
|
7
25
|
## 0.20.0 — 2026-11-10
|
|
8
26
|
|
|
9
27
|
### Added
|
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ usage: mcp-doctor <source-tree-path> [--mode=static|dynamic|both] [--backend=<co
|
|
|
64
64
|
default: the nearest convex/ above the tree
|
|
65
65
|
--url URL judge a REMOTE streamable-HTTP server the way a customer reaches it (implies
|
|
66
66
|
dynamic; no launch target; https, or http on loopback only). Only the rules that
|
|
67
|
-
judge what a running server serves run (incl. S5 (
|
|
67
|
+
judge what a running server serves run (incl. S5 (f)..(l), D3, D4, S10, S12, S23);
|
|
68
68
|
source-tree rules are not run
|
|
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)
|
|
@@ -171,6 +171,14 @@ still a violation (exit 1). Inside a judged tree, a subdirectory that cannot be
|
|
|
171
171
|
force-installed for a member »): `absent` for a tree that is not an MCP server; a server that signs
|
|
172
172
|
no member in is `could-not-judge`, because whether it is force-installed is an administrator's
|
|
173
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.
|
|
174
182
|
- **Consequence:** a static run of any MCP server now leaves C21 open, and S48 too when the server
|
|
175
183
|
signs no member in, so it exits 2. The publish gate passes such a server once those rows are
|
|
176
184
|
declared in its owed file (see [Publish gate](#publish-gate---gate)).
|
|
@@ -316,6 +324,7 @@ const scan = scanR4FilterPaths(tree.files); // { conform, violate, cnj, reads }
|
|
|
316
324
|
## What it checks (MCP 2026-07-28)
|
|
317
325
|
|
|
318
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).
|
|
319
328
|
|
|
320
329
|
Each detector maps one standard item and is proven **bipolar** on real material: a genuine defect
|
|
321
330
|
(MUST_FLAG) and a genuine conformant site (MUST_PASS).
|
|
@@ -405,7 +414,7 @@ where the tree contradicts the rule, and otherwise `could-not-judge` naming the
|
|
|
405
414
|
| **C32** host-key-additive | C-32 | `_meta` objects (followed through spreads and consts): `openai/outputTemplate` needs `ui.resourceUri`, `openai/visibility` needs `ui.visibility` | absent / non-conforming / could-not-judge (served `tools/list` owed) |
|
|
406
415
|
| **C33** identity-tool | C-33 | on an authenticated server, the identity tool: no argument, `readOnlyHint: true`, an `outputSchema` that declares `id` (inline or a same-tree const) | absent / non-conforming / could-not-judge |
|
|
407
416
|
| **S29**..**S34** | S-29..S-34 | the `events` capability and the three `events/*` handler literals; descriptors (`name`, bilingual description, non-empty `delivery`, `inputSchema`, `payloadSchema`); the `-32012`/`-32602`/`whsec_`, `-32015`/`verification`, five-header/`standardwebhooks`/262144-byte/410-413 evidence; `events.accessRecheckSeconds > 0` in the server manifest | absent (no events surface) / non-conforming / could-not-judge (dynamic half named) |
|
|
408
|
-
| **S5** authz-elements (f)-(l) | S-5 (f)..(l) | PRM `resource` and
|
|
417
|
+
| **S5** authz-elements (f)-(l) | S-5 (f)..(l) | PRM `resource` and path-suffixed route, CIMD + `"none"`, `iss` flag, `/authorize` (auto-approval, organisation in the query), jwt-bearer, OIDC discovery | absent (out of S-5's scope: not an MCP server, or stdio only) / non-conforming / could-not-judge (sites in `owedVerdict`; probes owed: over `--url` (h), (i), `iss`; or S-5's scope unread) |
|
|
409
418
|
| **E7** middleware-events | E-7 | writes to `delivery`/`arguments`/`id`/`refreshBefore`/`cursor` and replacement of `ctx.output` inside an `events/*` branch of a hook | absent / present / non-conforming |
|
|
410
419
|
| **E8** official-ext-declared | E-8 | `capabilities.extensions` as an object, each official key's MUST methods registered | absent / present / non-conforming / could-not-judge (unknown official extension) |
|
|
411
420
|
| **E9** host-invoked-tools | E-9 | `openai/settings.readTool`, `openai/mentions.searchTool`: registered, `readOnlyHint: true`, `outputSchema`, no required input, `"app"` visibility, ResourceLink | absent / present / non-conforming |
|
|
@@ -523,6 +532,14 @@ Not probed: `data` against `payloadSchema` (S-33), another principal and restart
|
|
|
523
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
|
|
524
533
|
server on the same host; for a remote server the answer decides (-32602 passes, -32015 or a result is red).
|
|
525
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
|
+
|
|
526
543
|
### Changes in 0.18.0 — the report states what it read; DServer14 reads the challenge where it is set
|
|
527
544
|
|
|
528
545
|
#### The report states how many source files and registered tools it read
|
|
@@ -557,7 +574,9 @@ subscript read) and CORS header-name lists are not set sites.
|
|
|
557
574
|
The rule is could-not-judge, naming the site, in two cases. One: the header name sits anywhere else, such
|
|
558
575
|
as a constant holding the name or a helper taking it as an argument. Two: no site qualifies and a set
|
|
559
576
|
site's value cannot be read (a call, an imported identifier, several bindings). A challenge delegated to
|
|
560
|
-
`@vantageos/cloud-identity`
|
|
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
|
|
561
580
|
header-set site read and why it did not count.
|
|
562
581
|
|
|
563
582
|
### Changes in 0.17.0 — S-47 (standard `1c66e11c` = mcp-server-standard v2.11, PR #311)
|
|
@@ -852,30 +871,7 @@ A pull request adds `changelog.d/<branch>.md` (frontmatter `section:`) instead o
|
|
|
852
871
|
`npm test`. Each entry carries `(README: #<anchor>)` naming the README section that documents it, and
|
|
853
872
|
`npm test` refuses an entry without one. The assembler also runs when invoked through a symlink.
|
|
854
873
|
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
| ID | Rule | The static run reads | Verdicts |
|
|
858
|
-
|----|------|----------------------|----------|
|
|
859
|
-
| **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) |
|
|
860
|
-
|
|
861
|
-
A union mixing an array branch and a non-array, non-null branch is non-conforming: clients do not agree on
|
|
862
|
-
which branch to send. `// allow-union-input: <reason>` (six characters or more) on the site's line or the
|
|
863
|
-
line above exempts it, and the exemption is reported. A named schema is followed to its binding in the same
|
|
864
|
-
file or through a named import from a relative module of the tree; a function's parameters take the call-site
|
|
865
|
-
argument; `z.preprocess(fn, inner)` is judged by `inner`. S-42, also written at `c29f83d5`, has no detector yet.
|
|
866
|
-
|
|
867
|
-
### Changes in 0.9.0 (standard `015053b7` = mcp-standard v2.7, "Third-party upstream API")
|
|
868
|
-
|
|
869
|
-
| ID | Rule | The static run reads |
|
|
870
|
-
|----|------|----------------------|
|
|
871
|
-
| **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 |
|
|
872
|
-
| **S37** upstream-settings | S-37 | environment reads against the declared variables, literal upstream addresses, URL variables, secret flags, defaults on required variables |
|
|
873
|
-
| **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 |
|
|
874
|
-
| **S39** upstream-error | S-39 | time budgets, `isError` results and what is interpolated into them, catch sites, empty-success fallbacks |
|
|
875
|
-
| **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) |
|
|
876
|
-
| **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 |
|
|
877
|
-
|
|
878
|
-
**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.
|
|
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).
|
|
879
875
|
|
|
880
876
|
### C-10 reads the data layer (v2.12)
|
|
881
877
|
|
|
@@ -902,90 +898,7 @@ All six rules are static + dynamic in the standard. This release runs the static
|
|
|
902
898
|
names the dynamic half it owes. **Behaviour change:** a server that calls `fetch` without a ceiling, a retry
|
|
903
899
|
bound or a typed error can now turn red on S-38 or S-39, where 0.8.x said nothing.
|
|
904
900
|
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
| ID | Rule | The static run reads | Verdicts |
|
|
908
|
-
|----|------|----------------------|----------|
|
|
909
|
-
| **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) |
|
|
910
|
-
|
|
911
|
-
**C-11 (b)** dynamic: an invalid cursor is sent to each protocol list method (`-32602`) and as the cursor
|
|
912
|
-
argument of each tool that takes one (`isError: true`, `structuredContent.error.code` = `invalid_cursor`).
|
|
913
|
-
A tool is called only when it declares `readOnlyHint: true` and its `inputSchema.required` is well-formed and
|
|
914
|
-
names nothing but `cursor`; any other tool is not called, and C-11 names why (could-not-judge for that tool).
|
|
915
|
-
With `--url` no tool is called at all unless the server's owner passes `--allow-tool-calls`: a `readOnlyHint` is the
|
|
916
|
-
target's own claim about itself, a hint and not a guarantee, so a public scan stays read-only; the probes that need a
|
|
917
|
-
call (S-2, C-11's tool half, the `--events-trigger` of the events probe) say so, naming the flag.
|
|
918
|
-
**C-9** accepts `prepare` (a read verb). **C-13** reads the ceiling from the server manifest's
|
|
919
|
-
`contextCeiling` as well as from a source constant. **S-22** resolves an `allowedOrigins` element held by a
|
|
920
|
-
same-file const. **DLocalIdentity** does not count a hash over local file content. **D3 / D4** attribute a
|
|
921
|
-
result builder to the tool that contains it.
|
|
922
|
-
|
|
923
|
-
**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
|
|
924
|
-
and A-5 return `present` on a static positive path: the verdict says `static half: ...` and names the half it
|
|
925
|
-
did NOT read (`NOT read by this run: ...`) — the served output conforms, progress is monotone, the negotiation
|
|
926
|
-
probe, the runtime file trace, the CI result of the axe run, render/roundtrip/memory. `--mode=dynamic` does not
|
|
927
|
-
implement those reads. Read `present` on these rows as "the static half holds", never as "the rule is held".
|
|
928
|
-
|
|
929
|
-
**An owed human verdict is a field, not a state.** There is no fifth state. A `could-not-judge` whose
|
|
930
|
-
owed half is judgement carries `owedVerdict: { kind: "human", rule: "C-23", sites: [{ anchor, element,
|
|
931
|
-
what }] }` (S-5 (i)/(j), C-24, C-28, S-20). The human report lists the sites in an "owed human verdicts"
|
|
932
|
-
section, counted; `--json` prints `{ surface, exitCode, owedHumanVerdicts, results, skipped }` and the
|
|
933
|
-
field is in each result. The `VERDICT DUE (C-23)` prose prefix is gone: a consumer counts owed
|
|
934
|
-
verdicts from the field, never from prose.
|
|
935
|
-
|
|
936
|
-
**S-5 (g) and (l)** match their key bare, double-quoted or single-quoted. **A-11** calls a typed
|
|
937
|
-
literal any quoted `*.claudemcpcontent.com` (any label, any case, any quoting, a scheme, several
|
|
938
|
-
labels, or a literal joined to the suffix); the bare suffix constant and an interpolated label are not
|
|
939
|
-
literals.
|
|
940
|
-
|
|
941
|
-
Amended rules, adapted in place: **C-2** (a tool name is at most 64 characters), **C-15** (a `title`,
|
|
942
|
-
and no enumerated parameter spanning a read and a write verb), **C-16** (event payloads), **S-3**
|
|
943
|
-
(`skills/list` and `skills/get`), **S-4** (the closed trigger: manifest `minProtocolVersion >=
|
|
944
|
-
2026-07-28`, the `events` capability, a host extension), **E-1** (the vendor-namespace registry
|
|
945
|
-
`vendor-namespaces.json`, `openai/` first member, shipped in the package and read by the detector),
|
|
946
|
-
**E-3** (the fourth type, `host-capability-adapter`), and, with new detectors because they never had
|
|
947
|
-
one, **S-12**, **A-2** and **A-7**. **C-6** now flags a log of an environment variable that names a
|
|
948
|
-
URL / endpoint / host, and of `process.cwd()` and the other absolute-path sources, through
|
|
949
|
-
`console.*`, `logger.*` and `process.stderr|stdout.write`, directly or through an identifier, a
|
|
950
|
-
destructured binding or an object property.
|
|
951
|
-
|
|
952
|
-
The coverage grid (`analysis/mcp-doctor-coverage-grid.md`) is derived by
|
|
953
|
-
`npx tsx scripts/standard-coverage.ts <pin> <ElPi-Corp checkout>`; the foreign-material bite proof is
|
|
954
|
-
`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`).
|
|
955
|
-
|
|
956
|
-
**DLocalIdentity exemptions.** Two, both reported as `EXEMPT` rather than hidden: the
|
|
957
|
-
`@vantageos/cloud-identity` package itself (read from the target's `package.json` name), and a site
|
|
958
|
-
carrying `// allow-local-identity: <reason of 8 characters or more>` on the line, in the comment
|
|
959
|
-
block directly above it, or above its enclosing top-level declaration. A marker with a shorter reason,
|
|
960
|
-
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
|
|
961
|
-
not UTF-8 text, is `could-not-judge`. To adopt the rule on a tree that still holds sites, pass
|
|
962
|
-
`--local-identity-ceiling=<current count>` as a ratchet; the row then reads `present` and still lists
|
|
963
|
-
every site.
|
|
964
|
-
|
|
965
|
-
**Reading rules, 0.6.0** (each changed detector; details and rationale in [CHANGELOG.md](./CHANGELOG.md)).
|
|
966
|
-
- **C15 / C8 / C9 / C10 / C11 / C13** resolve `annotations: SOME_CONST` to a same-tree `const` object; an
|
|
967
|
-
unresolvable value is `could-not-judge`, never "missing".
|
|
968
|
-
- **C19** counts `"a" + "b"`, an expression-free template literal and apostrophe-bearing strings as a
|
|
969
|
-
declared description; **D10** reads `description_fr:` with the literal on the next line or a const.
|
|
970
|
-
- **DServer14** accepts a 401 challenge delegated to `@vantageos/cloud-identity`
|
|
971
|
-
(`unauthorizedChallenge` / `verifyMcpAccessToken`, status + header forwarded), a PRM route registered
|
|
972
|
-
through a path constant, and is red on `@vantageos/mcp-auth-kit` or `cloud-identity` below 0.15.0.
|
|
973
|
-
- **C17** accepts, without CI, a `Provenance: <pkg>@<version> npm-pack shasum <40-hex> ...` record naming the
|
|
974
|
-
published version (**proposed evidence form, reviewer rules**); **C18** identifies the server manifest by
|
|
975
|
-
content (`mcpServers` = OpenAI plugin config; the manifest is `mcp-server.json` then) and is red on two.
|
|
976
|
-
- **D2** names `mcp-session-id` in a CORS list as inert and flags only real session keying;
|
|
977
|
-
**DServer6** reports every site and does not count a name whose value is a literal constant;
|
|
978
|
-
**C17** reads the repository-root `.github/workflows` for a subpackage; **C25** accepts a derived
|
|
979
|
-
`commit` served on `/health` beside `version`; a project-local registration wrapper
|
|
980
|
-
(`defineTool(...)`) is derived from the function that forwards a parameter to `registerTool`, so its
|
|
981
|
-
tools are judged.
|
|
982
|
-
- **TSX/JSX files** are lexed; a file that ends inside an unterminated JSX element is unreadable, not skipped.
|
|
983
|
-
|
|
984
|
-
**This table is a sample, not the inventory.** Every registered detector runs on every invocation,
|
|
985
|
-
so the authoritative list is simply the output of a run — one row per detector. The registered set
|
|
986
|
-
lives in `src/detectors/index.ts`. No count is written here on purpose: a number typed into a README
|
|
987
|
-
is correct on the day it is written and wrong at the next detector, which is exactly how this
|
|
988
|
-
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).
|
|
989
902
|
|
|
990
903
|
## Positioning
|
|
991
904
|
|
package/dist/doctor.d.ts
CHANGED
|
@@ -235,6 +235,26 @@ type ServedDiscovery = {
|
|
|
235
235
|
cards: ServedGet[];
|
|
236
236
|
landing: ServedGet;
|
|
237
237
|
};
|
|
238
|
+
/**
|
|
239
|
+
* S-5 (f)(k): the public documents read beside the authorization-server metadata, with NO credential, on the MCP
|
|
240
|
+
* endpoint's own origin. `mcpUrl` is the endpoint as a client types it (origin + path, no query): the value the PRM
|
|
241
|
+
* `resource` must equal. `prm.suffixed` is absent when the MCP URL has no path (the two copies are then one URL).
|
|
242
|
+
* `oidc` is the OIDC discovery read at the authorization server's issuer, or why none was made.
|
|
243
|
+
*/
|
|
244
|
+
type ServedAuthDocs = {
|
|
245
|
+
kind: "not-run";
|
|
246
|
+
reason: string;
|
|
247
|
+
} | {
|
|
248
|
+
kind: "probed";
|
|
249
|
+
mcpUrl: string;
|
|
250
|
+
prm: {
|
|
251
|
+
suffixed?: ServedGet;
|
|
252
|
+
bare: ServedGet;
|
|
253
|
+
};
|
|
254
|
+
oidc: ServedGet | {
|
|
255
|
+
skipped: string;
|
|
256
|
+
};
|
|
257
|
+
};
|
|
238
258
|
/** What the running server SERVES that a source-tree read can only guess at. */
|
|
239
259
|
interface ServedFacts {
|
|
240
260
|
/** `capabilities` of the `initialize` response, as served. */
|
|
@@ -251,6 +271,8 @@ interface ServedFacts {
|
|
|
251
271
|
authServer: ServedAuthServer;
|
|
252
272
|
/** S-46 served half: sign-ins started as each known CIMD client. Absent on records written before it existed. */
|
|
253
273
|
authorize?: ServedAuthorize;
|
|
274
|
+
/** S-5 (f)(k): the PRM copies and the OIDC discovery as served. Absent on records written before it existed. */
|
|
275
|
+
authDocs?: ServedAuthDocs;
|
|
254
276
|
/**
|
|
255
277
|
* The `initialize` result beside `serverInfo` and `capabilities` (S-49, C-38): its keys and its `instructions` value
|
|
256
278
|
* as served (any JSON kind; unset when the key is absent). Absent on records written before it existed, which a rule
|
|
@@ -264,7 +286,63 @@ interface ServedFacts {
|
|
|
264
286
|
toolMetaRecorded?: boolean;
|
|
265
287
|
/** S-50: the public server-card and landing-page reads. Absent on records written before it existed. */
|
|
266
288
|
discovery?: ServedDiscovery;
|
|
289
|
+
/**
|
|
290
|
+
* S-51..S-53: one record per served tool — its `tools/call` answer, or why no call was sent (the one callability
|
|
291
|
+
* rule of the introspector). Absent on records written before it existed, which those rules read as could-not-judge.
|
|
292
|
+
*/
|
|
293
|
+
toolCalls?: ServedToolCall[];
|
|
294
|
+
/**
|
|
295
|
+
* S-51..S-53: whether every tools/list page was read into `tools` / `toolCalls`. Incomplete names the cursor left
|
|
296
|
+
* unread. Absent on records written before it existed, which those rules read as could-not-judge.
|
|
297
|
+
*/
|
|
298
|
+
toolsPaging?: ToolsPaging;
|
|
267
299
|
}
|
|
300
|
+
/** The tools/list pages read: all of them, or the cursor that was not followed and why. */
|
|
301
|
+
type ToolsPaging = {
|
|
302
|
+
complete: true;
|
|
303
|
+
pages: number;
|
|
304
|
+
} | {
|
|
305
|
+
complete: false;
|
|
306
|
+
pages: number;
|
|
307
|
+
unreadCursor?: unknown;
|
|
308
|
+
reason: string;
|
|
309
|
+
};
|
|
310
|
+
/** One content block of a served tool result, as recorded: its `type` and, for a text block, its text. */
|
|
311
|
+
interface ServedContentBlock {
|
|
312
|
+
type: string;
|
|
313
|
+
text?: string;
|
|
314
|
+
/** True when the text was cut at the recording cap (64 KiB): a reader comparing the whole text says so. */
|
|
315
|
+
truncated?: boolean;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* What one `tools/call` sent by the introspector (with `{}` as arguments) answered, or why it was not sent. The domain
|
|
319
|
+
* is the JSON-RPC response shapes: a `result`, an `error`, no answer before the deadline, or a call refused by the
|
|
320
|
+
* callability rule (no consent, not read-only, a required argument the probe would have to invent).
|
|
321
|
+
*/
|
|
322
|
+
type ServedToolCall = {
|
|
323
|
+
tool: string;
|
|
324
|
+
kind: "not-sent";
|
|
325
|
+
reason: string;
|
|
326
|
+
} | {
|
|
327
|
+
tool: string;
|
|
328
|
+
kind: "no-answer";
|
|
329
|
+
reason: string;
|
|
330
|
+
} | {
|
|
331
|
+
tool: string;
|
|
332
|
+
kind: "error";
|
|
333
|
+
code: unknown;
|
|
334
|
+
message?: string;
|
|
335
|
+
} | {
|
|
336
|
+
tool: string;
|
|
337
|
+
kind: "result";
|
|
338
|
+
isError: boolean;
|
|
339
|
+
/** Whether the result object carries the `structuredContent` key at all (a served `null` is `true` here). */
|
|
340
|
+
hasStructured: boolean;
|
|
341
|
+
structuredContent?: unknown;
|
|
342
|
+
/** `array`: `content` is an array (its blocks below); `absent`: no `content` key; `other`: any other value. */
|
|
343
|
+
contentKind: "array" | "absent" | "other";
|
|
344
|
+
content: ServedContentBlock[];
|
|
345
|
+
};
|
|
268
346
|
/**
|
|
269
347
|
* What the RUNNING target server exposes, gathered by launching it and speaking
|
|
270
348
|
* MCP over stdio (`initialize` -> `initialized` -> `tools/list`). This is the
|
|
@@ -340,6 +418,8 @@ interface RuntimeContext {
|
|
|
340
418
|
publicAuth?: {
|
|
341
419
|
authServer: ServedAuthServer;
|
|
342
420
|
authorize?: ServedAuthorize;
|
|
421
|
+
/** S-5 (f)(k): the PRM copies and the OIDC discovery, public like the metadata. */
|
|
422
|
+
authDocs?: ServedAuthDocs;
|
|
343
423
|
/** S-50's public reads, made even when the handshake was refused (a 401 is exactly what a visitor gets). */
|
|
344
424
|
discovery?: ServedDiscovery;
|
|
345
425
|
};
|