@vantageos/mcp-doctor 0.10.0 → 0.11.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 +67 -0
- package/README.md +2 -1
- package/dist/doctor.d.ts +76 -0
- package/dist/doctor.js +1255 -108
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,73 @@
|
|
|
3
3
|
All notable changes to `@vantageos/mcp-doctor` are documented here.
|
|
4
4
|
This project adheres to [Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## 0.11.0 — 2026-10-29
|
|
7
|
+
|
|
8
|
+
Minor, not a patch: six rules that `--url` did not run now run, and rules that were `could-not-judge` or
|
|
9
|
+
`non-conforming` from a source-tree read are settled by what the running server serves or what is installed.
|
|
10
|
+
A new detector contract (`runServed`) is visible to library consumers.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **Served half (`runServed`)**: a detector may judge, from what the running server serves, the part of a rule the
|
|
14
|
+
tree could not decide. The runner reads the tree first; only a `could-not-judge` is settled from the wire, a
|
|
15
|
+
decisive static verdict stands, and a served `could-not-judge` keeps the static account and appends its own
|
|
16
|
+
(`<static reason> | served: <reason>`). Over `--url` (no tree) the served half is the verdict. `--url` now judges
|
|
17
|
+
13 rules (was 7): S5 (g)(l), D3, D4, S10, S12, S23 added.
|
|
18
|
+
- **S-23** (`MCP-Protocol-Version`): two requests after initialize, one with the negotiated version (control) and
|
|
19
|
+
one with `1999-01-01`. Present only when the control is 2xx and the unsupported version is `400`; a 2xx on the
|
|
20
|
+
unsupported version is non-conforming; any other pair is `could-not-judge` naming both statuses.
|
|
21
|
+
- **D3 / D4** (S-2 / S-3): `resultType` is read on each served list response and on ONE tool-call response (a tool the
|
|
22
|
+
server itself declares `readOnlyHint: true` with no required argument, called with `{}`; only the keys of the
|
|
23
|
+
result are recorded, never its content; no such tool: no call is invented, and the verdict says so). `ttlMs` and
|
|
24
|
+
`cacheScope` are read on every served list. A field absent in a session negotiated BELOW revision 2026-07-28 (where
|
|
25
|
+
these are wire vocabulary) is `could-not-judge` naming the negotiated revision, not a violation; at or above it,
|
|
26
|
+
absent is non-conforming; a served field of the wrong type is non-conforming at any revision.
|
|
27
|
+
- **S-12**: `nextCursor` on each served list method. A served cursor must be a non-empty string and must be accepted
|
|
28
|
+
when presented back untouched (refused: non-conforming). A page with no `nextCursor` is the terminal page: stated
|
|
29
|
+
as such, with the note that pagination under growth is not exercised (the doctor invents no entries).
|
|
30
|
+
- **S-10**: with no subscription or events capability served (keys derived from the served capability names, a key
|
|
31
|
+
served as `false` excepted) the subscription probe has no object: `absent`, stated, with the capability keys it was
|
|
32
|
+
read from and, over `--url`, the note that the outbound-fetch half (a source-tree read) was not run. A declared
|
|
33
|
+
surface is `could-not-judge` (the probe needs a receiver the doctor does not stand up).
|
|
34
|
+
- **S-5 (g)(l), served**: the authorization-server metadata the PRM names (same origin only: the doctor never fetches
|
|
35
|
+
an origin a server names; no credential is sent to the public metadata URL). `client_id_metadata_document_supported`
|
|
36
|
+
and `authorization_response_iss_parameter_supported` must be the boolean true and the methods an array listing
|
|
37
|
+
`"none"`; a contradicted element is non-conforming, the rest of S-5 (f, h, i, j, k, and `iss` on every response)
|
|
38
|
+
is named as not read.
|
|
39
|
+
- **S-5 (g)(l), installed**: when the tree names the AS metadata route but does not write the document (the library
|
|
40
|
+
does), the declared dependencies are read in `node_modules` (comment-aware). An installed library can PROVE an
|
|
41
|
+
element (reported under `established:`); it can never prove an absence, so an element it does not state is owed
|
|
42
|
+
to the served metadata, never red. No `node_modules`, a declared dependency not installed, a file too large to read:
|
|
43
|
+
each is named.
|
|
44
|
+
- Programmatic: `Detector.runServed`, `ServedFacts`, `RuntimeContext.served`, `readServed`.
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
- S-13 failed OPEN on outbound requests that do not go through a literal `fetch(`: a fetch routed through a local
|
|
48
|
+
wrapper (`boundedFetch`), an injected `fetchImpl` / `fetchWithToken`, or handed to an SDK client as its `fetch`
|
|
49
|
+
option read "no outbound request is emitted" -> present, whatever the timeout. The detector now reads the census of
|
|
50
|
+
outbound forms written in `s13OutboundSites.ts` (global fetch, axios / got / ky, http(s) / undici, injected fetch,
|
|
51
|
+
one-level wrappers and their call sites, SDK `fetch` option); every site proves a timeout or is non-conforming
|
|
52
|
+
naming `file:line`; a form it cannot follow (an HTTP client under another name, an alias of the global fetch, a
|
|
53
|
+
wrapper of a wrapper, an unreadable `fetch` option) is could-not-judge naming the site. "No outbound request is
|
|
54
|
+
emitted" is claimed only when every form finds zero sites, and a present verdict lists its sites.
|
|
55
|
+
Any other READ of the global `fetch` binding is also could-not-judge naming `file:line` and the form, never
|
|
56
|
+
dropped: `Reflect.apply(fetch, ..)`, `(0, fetch)(..)`, `fetch.call`, `globalThis["fetch"](..)`, `window.fetch`,
|
|
57
|
+
`self["fetch"]`, `Reflect.get(globalThis, "fetch")`, a destructure off the global object, an alias passed on, the bare
|
|
58
|
+
`globalThis` used as a value. Recognised and not flagged: a read inside a wrapper call, an SDK `fetch` option, an
|
|
59
|
+
injected-parameter default, `typeof fetch`. The census is written in the header of `s13OutboundSites.ts`.
|
|
60
|
+
A skip that says "another step judges it" now holds only when that step recorded the site at that place: a direct
|
|
61
|
+
call spelled `fetch` + newline + `(` or `fetch /* c */ (` (which the direct-call reader does not read) is judged on
|
|
62
|
+
its own options (non-conforming without a timeout, named could-not-judge when unclosed), and the same rule governs
|
|
63
|
+
an SDK `fetch: wrapper(..)` option whose wrapper call is not reached, `Reflect.get(globalThis)` without a key, and a
|
|
64
|
+
nested destructure off `globalThis`. The four hand-offs are listed in the header of `s13OutboundSites.ts`.
|
|
65
|
+
- S-5 (g): `token_endpoint_auth_methods_supported` written with a QUOTED key (`"token_endpoint_auth_methods_supported": [..]`,
|
|
66
|
+
the JSON-shaped literal) was not recognised, so a tree that lists `"none"` was reported non-conforming. The three
|
|
67
|
+
spellings of a property key (bare, double-quoted, single-quoted) are now read. A value that is not an array literal
|
|
68
|
+
(a constant, a spread) is owed to the served metadata instead of red.
|
|
69
|
+
- S-5: a tree that merely names `/.well-known/oauth-authorization-server` (to request it, or to mount a library that
|
|
70
|
+
serves it) was treated as one that writes the document, and reported (g)/(l) non-conforming for flags the library
|
|
71
|
+
states in `node_modules`.
|
|
72
|
+
|
|
6
73
|
## 0.10.0 — 2026-10-29
|
|
7
74
|
|
|
8
75
|
### Added
|
package/README.md
CHANGED
|
@@ -59,7 +59,8 @@ usage: mcp-doctor <source-tree-path> [--mode=static|dynamic|both] [--backend=<co
|
|
|
59
59
|
default: the nearest convex/ above the tree
|
|
60
60
|
--url URL judge a REMOTE streamable-HTTP server the way a customer reaches it (implies
|
|
61
61
|
dynamic; no launch target; https, or http on loopback only). Only the rules that
|
|
62
|
-
judge what a running server serves run
|
|
62
|
+
judge what a running server serves run (incl. S5 (g)(l), D3, D4, S10, S12, S23);
|
|
63
|
+
source-tree rules are not run
|
|
63
64
|
--bearer-env VAR send the token held in environment variable VAR as 'Authorization: Bearer'
|
|
64
65
|
(the token never appears on a command line or in output)
|
|
65
66
|
--header "Name: value" an extra request header (repeatable); values are never printed
|
package/dist/doctor.d.ts
CHANGED
|
@@ -181,6 +181,69 @@ interface CursorProbe {
|
|
|
181
181
|
surface: "list-method" | "tool-argument";
|
|
182
182
|
outcome: CursorProbeOutcome;
|
|
183
183
|
}
|
|
184
|
+
/** One protocol list response as served (S-3 / S-12): what its `result` carries beside the page itself. */
|
|
185
|
+
interface ServedList {
|
|
186
|
+
/** The protocol list method (`tools/list`, `resources/list`, ...). */
|
|
187
|
+
method: string;
|
|
188
|
+
/** `answered`: a JSON-RPC result; `refused`: a JSON-RPC error; `no-answer`: nothing before the deadline. */
|
|
189
|
+
outcome: "answered" | "refused" | "no-answer";
|
|
190
|
+
/** The reason, for `refused` (the error) and `no-answer` (the cause). */
|
|
191
|
+
detail?: string;
|
|
192
|
+
/** Every key of the `result` object (the served wire shape, read, never assumed). */
|
|
193
|
+
resultKeys?: string[];
|
|
194
|
+
resultType?: unknown;
|
|
195
|
+
ttlMs?: unknown;
|
|
196
|
+
cacheScope?: unknown;
|
|
197
|
+
/** The `nextCursor` value as served (undefined when the key is absent). */
|
|
198
|
+
nextCursor?: unknown;
|
|
199
|
+
/** How many entries the page carried (the array named by the method). */
|
|
200
|
+
entries?: number;
|
|
201
|
+
/** When a `nextCursor` was served: the answer to presenting it back untouched. */
|
|
202
|
+
followUp?: {
|
|
203
|
+
outcome: "answered" | "refused" | "no-answer";
|
|
204
|
+
detail?: string;
|
|
205
|
+
entries?: number;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/** The `MCP-Protocol-Version` header probe (S-23): the status of a request per version sent. */
|
|
209
|
+
type VersionProbe = {
|
|
210
|
+
kind: "statuses";
|
|
211
|
+
supportedVersion: string;
|
|
212
|
+
supported: number;
|
|
213
|
+
unsupported: number;
|
|
214
|
+
} | {
|
|
215
|
+
kind: "not-run";
|
|
216
|
+
reason: string;
|
|
217
|
+
};
|
|
218
|
+
/** The authorization-server metadata as served (S-5 (g)(l)). */
|
|
219
|
+
type ServedAuthServer = {
|
|
220
|
+
kind: "document";
|
|
221
|
+
url: string;
|
|
222
|
+
status: number;
|
|
223
|
+
document: Record<string, unknown>;
|
|
224
|
+
} | {
|
|
225
|
+
kind: "not-run";
|
|
226
|
+
reason: string;
|
|
227
|
+
} | {
|
|
228
|
+
kind: "unavailable";
|
|
229
|
+
url: string;
|
|
230
|
+
reason: string;
|
|
231
|
+
};
|
|
232
|
+
/** What the running server SERVES that a source-tree read can only guess at. */
|
|
233
|
+
interface ServedFacts {
|
|
234
|
+
/** `capabilities` of the `initialize` response, as served. */
|
|
235
|
+
capabilities: Record<string, unknown>;
|
|
236
|
+
/** The protocol revision the server answered `initialize` with (unset when it named none). */
|
|
237
|
+
protocolVersion?: string;
|
|
238
|
+
lists: ServedList[];
|
|
239
|
+
/**
|
|
240
|
+
* The served tool-call response(s) (S-2): one call to a tool the server declares read-only that
|
|
241
|
+
* needs no argument. Empty when no tool qualifies (no call is invented).
|
|
242
|
+
*/
|
|
243
|
+
calls: ServedList[];
|
|
244
|
+
versionProbe: VersionProbe;
|
|
245
|
+
authServer: ServedAuthServer;
|
|
246
|
+
}
|
|
184
247
|
/**
|
|
185
248
|
* What the RUNNING target server exposes, gathered by launching it and speaking
|
|
186
249
|
* MCP over stdio (`initialize` -> `initialized` -> `tools/list`). This is the
|
|
@@ -242,6 +305,12 @@ interface RuntimeContext {
|
|
|
242
305
|
* introspector recorded none (C-11 reads that as could-not-judge, never a pass).
|
|
243
306
|
*/
|
|
244
307
|
cursorProbes?: CursorProbe[];
|
|
308
|
+
/**
|
|
309
|
+
* The served facts a source-tree read cannot see (list-response shape, capabilities, the
|
|
310
|
+
* protocol-version refusal, the authorization-server metadata). Unset when the introspector
|
|
311
|
+
* recorded none: a rule reading it says could-not-judge, naming that, never a pass.
|
|
312
|
+
*/
|
|
313
|
+
served?: ServedFacts;
|
|
245
314
|
}
|
|
246
315
|
interface Detector {
|
|
247
316
|
id: string;
|
|
@@ -265,6 +334,13 @@ interface Detector {
|
|
|
265
334
|
* implements this; detectors without it run static-only in every mode.
|
|
266
335
|
*/
|
|
267
336
|
runDynamic?(runtime: RuntimeContext): DetectorResult;
|
|
337
|
+
/**
|
|
338
|
+
* Optional SERVED half: judge from what the running server serves the part of the rule a source
|
|
339
|
+
* tree could not decide. It never replaces a decisive static verdict: the runner calls it only
|
|
340
|
+
* when the static run is could-not-judge (or, over `--url`, when there is no tree), passing that
|
|
341
|
+
* static result when there is one. A could-not-judge here keeps the static reason and appends this one.
|
|
342
|
+
*/
|
|
343
|
+
runServed?(runtime: RuntimeContext, staticResult?: DetectorResult): DetectorResult;
|
|
268
344
|
}
|
|
269
345
|
/**
|
|
270
346
|
* A minimal handle to a RUNNING MCP session — a live client the consumer has
|