@vantageos/mcp-doctor 0.13.2 → 0.15.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 +32 -0
- package/README.md +76 -1
- package/dist/doctor.d.ts +5 -0
- package/dist/doctor.js +853 -216
- package/package.json +10 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@vantageos/mcp-doctor` are documented here.
|
|
4
4
|
This project adheres to [Semantic Versioning](https://semver.org/).
|
|
5
|
+
Unreleased changes live as one fragment per pull request in `changelog.d/`, folded in here at release time.
|
|
6
|
+
|
|
7
|
+
## 0.15.0 — 2026-11-01
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- **S-44: a published output schema never closes itself to added fields.** Every object of a tool's `outputSchema`, at any depth, is read, both from source and as served. An object that refuses an unlisted field is non-conforming, named `tool.path` with its closing form. The closing forms are `z.object`, `z.strictObject`, `.strict()`, `.strip()`, `.catchall(z.never())`, a raw shape (the SDK wraps it in `z.object`), and JSON `additionalProperties: false` or `unevaluatedProperties: false`. The open forms are `z.looseObject`, `.passthrough()`, `.loose()` and `.catchall(<another schema>)`; an unreadable `.catchall` argument is could-not-judge. `// allow-closed-output: <reason>` exempts a site and is reported. The served half reads each tool's `outputSchema` from `tools/list`, which the launcher now records. The standard is re-pinned at ElPi-Corp 9fdad5b8 (PR #306, server v2.8), and no numbered rule text changed besides S-44. The reference conforming fixture now opens its output objects with `z.looseObject`. (README: #s-44-reports-an-output-schema-that-refuses-added-fields)
|
|
11
|
+
|
|
12
|
+
## 0.14.0 — 2026-11-01
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- **Changelog entries are per-PR fragments.** A pull request adds `changelog.d/<branch>.md` (frontmatter `section:`) instead of editing `CHANGELOG.md`; `node scripts/changelog-assemble.mjs --version <x.y.z>` folds them in at release (`--check` validates, run by `npm test`). Merging one PR no longer makes every other open PR conflict on the same `## Unreleased` block. Assembler reused from vantage-peers (0107cb0d), headers adapted to `## <version> — <date>`. (README: #changelog-fragments-for-contributors)
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- **`scripts/changelog-assemble.mjs` runs when invoked through a symlink.** Its entry guard compared `argv[1]` (the link) with `import.meta.url` (the real file), so a run through a link exited 0 without checking. Both sides now go through `realpathSync`. This is the same fix as `@vantageos/mcp-boilerplate` 0.6.1, and a test runs the script through a symlink. (README: #changelog-fragments-for-contributors)
|
|
19
|
+
- **D16 credits a version served from the server manifest.** `/health` serving `manifest.version`, where `manifest` comes from @vantageos/mcp-boilerplate's `loadServerManifest` (`mcp-server.json`), directly or through a same-file function, was could-not-judge ("not a resolvable package.json binding"). It is now read as package.json's version exactly when `mcp-server.json` carries the same version as `package.json` (C-18 requires them equal); with differing versions the source stays unreadable. Measured on vantage-neoteem-mcp @ cabcafa2: D16 could-not-judge -> present. (README: #d16-credits-a-version-served-from-mcp-serverjson)
|
|
20
|
+
- **D10 and C19 read a description computed by a translation call.** `description: t("en", "<key>")` and `_meta: { description_fr: t("fr", "<key>") }` were could-not-judge ("not a string literal"). They are now read back through the in-tree locales JSON (`src/detectors/i18nKeys.ts`). The form read: `<fn>("<locale>", "<key>")`, where `<fn>` is imported from a relative module whose source names `locales/<…>.json`, and the key resolves to a non-empty string in `<module dir>/locales/<locale>.json`. Any departure is could-not-judge naming the reason. D10 also skips an optional TYPE member `description_fr?: …`, which declares a shape, not a value. Measured on vantage-neoteem-mcp @ cabcafa2: C19 could-not-judge -> present (20 tools); D10 could-not-judge -> non-conforming (README.fr.md missing, a real finding, traced to that server); could-not-judge 26 -> 24. (README: #d10-and-c19-read-a-translated-description)
|
|
21
|
+
- **S-22 no longer reads an outbound client's `allowedOrigins` as the inbound allow-list.** `createPaginatedUpstreamClient({ allowedOrigins: [origin] })` restricts where the server's own requests may go (S-10), not which browser origins may call `/mcp`; it held vantage-neoteem-mcp at could-not-judge ("allowedOrigins is given by `origin`"). The calls that take the option are derived from @vantageos/mcp-boilerplate 0.5.0 (`httpApp.d.ts:59` inbound, `settings.d.ts` declared variable, `upstream/paginatedClient.d.ts:78` outbound); only the outbound one is skipped, any other callee is still judged. Measured: vantage-neoteem-mcp @ cabcafa2 — S22 could-not-judge -> present (the 403 in `src/app.ts:202`, the declared originList `MCP_ALLOWED_ORIGINS`). (README: #s-22-skips-an-outbound-clients-allowedorigins)
|
|
22
|
+
- **S-37 reads two forms it reported as unread.**
|
|
23
|
+
- `env[name]` inside `for (const name of L)`, where `L` is a same-file literal list, reads the listed names. Each is judged like any read.
|
|
24
|
+
- A declaration whose `env` is a member read `<x>.<key>`, with `<key>` declared elsewhere with a literal env, is an indirection: the variable's name is configuration held by that declared variable.
|
|
25
|
+
- A non-literal list element, or a member read of an undeclared key, stays could-not-judge.
|
|
26
|
+
- Inside the loop, the variable may appear only as `env[<id>]` or as a value in an object literal (`{ source: <id> }` after `return` or a lone `=`). Any other occurrence, a destructured parameter or catch binding included, leaves the read could-not-judge. (README: #s-37-reads-a-literal-list-of-variable-names-and-a-declared-variable-indirection)
|
|
27
|
+
|
|
28
|
+
Measured on vantage-neoteem-mcp @ cabcafa2: S37 could-not-judge -> non-conforming. `src/app.ts:114` reads `RAILWAY_GIT_COMMIT_SHA` and `GIT_COMMIT_SHA` without declaring them; this is what the rule says as written, with only `NODE_ENV` exempt.
|
|
29
|
+
- **The upstream rules see through a decorating `registerTool` rebind and a literal method list.** Two cases are no longer reported as unread registration routes:
|
|
30
|
+
- a rebind `const X = server.registerTool.bind(server); server.registerTool = (name, config, handler) => X(name, <rewritten config>, <wrapped handler>)` that forwards the tool name unchanged first and only CALLS the original handler (one call of the original);
|
|
31
|
+
- `setRequestHandler(method, …)` over `for (const method of L)`, where `L` is a same-file literal list without `tools/call`. (README: #upstream-rules-see-through-a-decorating-registertool-rebind-and-s-40-fails-closed)
|
|
32
|
+
|
|
33
|
+
Any departure stays unread, named.
|
|
34
|
+
- **S-40 fails closed:** a tree that calls an upstream and registers tools, with no handler traced to the call, is could-not-judge, never "no tool serves upstream rows". (README: #upstream-rules-see-through-a-decorating-registertool-rebind-and-s-40-fails-closed)
|
|
35
|
+
|
|
36
|
+
Measured on vantage-neoteem-mcp @ cabcafa2: S39 could-not-judge -> present; S36, S40 and S41 now name their remaining gap instead of the rebind; could-not-judge 26 -> 25.
|
|
5
37
|
|
|
6
38
|
## 0.13.2 — 2026-11-01
|
|
7
39
|
|
package/README.md
CHANGED
|
@@ -224,7 +224,82 @@ an error message) it counts only as code or as a quoted property key.
|
|
|
224
224
|
| **A4** wcag-axe-gate | A-4 | an axe dependency and a script, workflow or test that runs it | absent / non-conforming / could-not-judge (0 blocking violations is the owed gate) |
|
|
225
225
|
| **A5** performance-budgets | A-5 | gzipped size of the UI bundle files (`dist/` and `build/` read for size only): one file or one directory over 250 KB | absent / non-conforming / could-not-judge (render, roundtrip, memory probes owed) |
|
|
226
226
|
|
|
227
|
-
###
|
|
227
|
+
### Changes in 0.15.0 — S-44 (standard `9fdad5b8` = mcp-server-standard v2.8, PR #306)
|
|
228
|
+
|
|
229
|
+
#### S-44 reports an output schema that refuses added fields
|
|
230
|
+
|
|
231
|
+
A client checks a tool's `structuredContent` against the `outputSchema` it read when it connected, and keeps that copy
|
|
232
|
+
for the session. An object in that schema that refuses unlisted fields turns every field the server adds later into a
|
|
233
|
+
refusal for each client connected before the release. S-44 reads every tool's output schema, at any depth, both from
|
|
234
|
+
source and as served (`tools/list`), and names each closed object as `tool.path` with the form that closes it.
|
|
235
|
+
|
|
236
|
+
- Closing forms: `z.object` and `z.strictObject` (zod emits `additionalProperties: false` for an output schema),
|
|
237
|
+
`.strict()`, `.strip()`, `.catchall(z.never())`, a raw shape (the SDK wraps it in `z.object`), and JSON
|
|
238
|
+
`additionalProperties: false` or `unevaluatedProperties: false`.
|
|
239
|
+
- Open forms: `z.looseObject`, `.passthrough()`, `.loose()`, `.nonstrict()`, `.catchall(<another schema>)`.
|
|
240
|
+
- The output schema is found in any object argument of a registration, including a project wrapper's annotations
|
|
241
|
+
object (`defineTool(…, { outputSchema })`). A registration that names `outputSchema` somewhere the reader cannot
|
|
242
|
+
take it from is could-not-judge, never "declares none".
|
|
243
|
+
- `// allow-closed-output: <reason>` (six characters or more) on the site's line or the line above exempts it, and the
|
|
244
|
+
reason is reported. A served site has no source line, so it is never exempt.
|
|
245
|
+
- The standard is pinned at ElPi-Corp `9fdad5b8`. Besides S-44, that pin adds only the unnumbered "Agent tool roles"
|
|
246
|
+
section, which no detector reads yet.
|
|
247
|
+
|
|
248
|
+
### Changes in 0.14.0 (standard `c29f83d5`)
|
|
249
|
+
|
|
250
|
+
Six readers stopped reporting could-not-judge on real servers, and one stopped calling a correct server
|
|
251
|
+
non-conforming. Every rule still fails closed: a form the reader does not recognise is named, never passed.
|
|
252
|
+
Measured on vantage-neoteem-mcp (a real Pujol server) unless stated otherwise.
|
|
253
|
+
|
|
254
|
+
#### S-37 reads a literal list of variable names and a declared-variable indirection
|
|
255
|
+
|
|
256
|
+
- `env[name]` inside `for (const name of L)`, where `L` is a same-file literal list
|
|
257
|
+
(`const L = ["A", "B"] as const`), now reads the listed names, each judged like any environment read.
|
|
258
|
+
- The list resolves only under an **occurrence invariant**. Every occurrence of `L` in the file must be its one
|
|
259
|
+
literal declaration or a `for … of L` loop head. Inside the loop, the variable may appear only as `env[name]` or
|
|
260
|
+
as a value in an object literal (`return { source: name }`, `const r = { source: name }`). Any other occurrence
|
|
261
|
+
(a parameter, an import, a return of the list, a destructuring, a catch binding) leaves the read could-not-judge.
|
|
262
|
+
- A declaration whose `env` is `settings.<key>`, with `<key>` itself declared with a literal env, is an
|
|
263
|
+
indirection. The variable's name is configuration held by that declared variable.
|
|
264
|
+
- Effect on neoteem: S-37 went from could-not-judge to non-conforming (the commit variables it read were
|
|
265
|
+
undeclared). Neoteem then declared them, and it now reads present.
|
|
266
|
+
|
|
267
|
+
#### Upstream rules see through a decorating registerTool rebind and S-40 fails closed
|
|
268
|
+
|
|
269
|
+
- `const X = server.registerTool.bind(server); server.registerTool = (name, config, handler) => X(name, …, …)` is
|
|
270
|
+
read as a registration route when it forwards the name unchanged and calls the original handler once.
|
|
271
|
+
- `setRequestHandler(method, …)` over `for (const method of L)`, with `L` a same-file literal list without
|
|
272
|
+
`tools/call`, is read the same way, under the same occurrence invariant as S-37 (here the variable may appear
|
|
273
|
+
only as a method-call argument).
|
|
274
|
+
- S-40: a tree that calls an upstream and registers tools, with no handler traced to the call, is could-not-judge,
|
|
275
|
+
never "no tool serves upstream rows".
|
|
276
|
+
|
|
277
|
+
#### S-22 skips an outbound client's allowedOrigins
|
|
278
|
+
|
|
279
|
+
`createPaginatedUpstreamClient({ allowedOrigins })` restricts where the server's own requests go (S-10). It is not
|
|
280
|
+
the browser-origin allow-list of `/mcp`, and S-22 no longer reads it as one. The callees are derived from
|
|
281
|
+
@vantageos/mcp-boilerplate 0.5.0. Only the outbound one is skipped, and any other callee is still judged.
|
|
282
|
+
|
|
283
|
+
#### D10 and C19 read a translated description
|
|
284
|
+
|
|
285
|
+
`description: t("en", "<key>")` and `_meta: { description_fr: t("fr", "<key>") }` are read through the in-tree
|
|
286
|
+
locales JSON (`<module dir>/locales/<locale>.json`) when `t` is imported from a relative module that names those
|
|
287
|
+
files. D10 accepts the French text only from the `fr` locale. Any other form is could-not-judge, naming why.
|
|
288
|
+
|
|
289
|
+
#### D16 credits a version served from mcp-server.json
|
|
290
|
+
|
|
291
|
+
`/health` serving `manifest.version`, with `manifest` from @vantageos/mcp-boilerplate's `loadServerManifest`, reads
|
|
292
|
+
as package.json's version, but only when `mcp-server.json` carries the same version as `package.json` (C-18). With
|
|
293
|
+
differing versions it stays unreadable.
|
|
294
|
+
|
|
295
|
+
#### Changelog fragments for contributors
|
|
296
|
+
|
|
297
|
+
A pull request adds `changelog.d/<branch>.md` (frontmatter `section:`) instead of editing `CHANGELOG.md`.
|
|
298
|
+
`node scripts/changelog-assemble.mjs --version <x.y.z>` folds the fragments at release, and `--check` runs in
|
|
299
|
+
`npm test`. Each entry carries `(README: #<anchor>)` naming the README section that documents it, and
|
|
300
|
+
`npm test` refuses an entry without one. The assembler also runs when invoked through a symlink.
|
|
301
|
+
|
|
302
|
+
### Added in 0.13.0 — S-43 (standard `c29f83d5` = mcp-server-standard v2.7, PR #299)
|
|
228
303
|
|
|
229
304
|
| ID | Rule | The static run reads | Verdicts |
|
|
230
305
|
|----|------|----------------------|----------|
|
package/dist/doctor.d.ts
CHANGED
|
@@ -157,6 +157,11 @@ interface RuntimeTool {
|
|
|
157
157
|
* shape a client must put in each argument from it; absent when the server served none.
|
|
158
158
|
*/
|
|
159
159
|
inputSchema?: Record<string, unknown>;
|
|
160
|
+
/**
|
|
161
|
+
* The served `outputSchema` exactly as tools/list returned it, when it is an object (S-44 reads it). Unset
|
|
162
|
+
* when the tool serves none.
|
|
163
|
+
*/
|
|
164
|
+
outputSchema?: Record<string, unknown>;
|
|
160
165
|
}
|
|
161
166
|
/**
|
|
162
167
|
* What one invalid-cursor probe read (C-11). The domain is the JSON-RPC response shapes: an `error`
|