@chrischall/mcp-utils 3.0.1 → 3.0.2
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/README.md +33 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2345,10 +2345,39 @@ exit code unless you pass `--strict`**:
|
|
|
2345
2345
|
(`server.mcp_config.env` + `user_config`), `server.json`
|
|
2346
2346
|
(`packages[].environmentVariables`) and `.mcp.json`: undeclared reads, dead
|
|
2347
2347
|
declarations, a var marked required that the code only reads optionally, a
|
|
2348
|
-
`user_config` entry nothing passes to the server, and
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2348
|
+
`user_config` entry nothing passes to the server, and the
|
|
2349
|
+
`${CLAUDE_PLUGIN_ROOT}` rule below. `MCP_*` keys (this library's own knobs)
|
|
2350
|
+
and runtime vars (`NODE_ENV`, `HOME`, …) are ignored. A key built at runtime
|
|
2351
|
+
(`` readEnvVar(`${P}_TOKEN`) ``) is invisible.
|
|
2352
|
+
|
|
2353
|
+
The `${CLAUDE_PLUGIN_ROOT}` rule follows the MCP config the **plugin actually
|
|
2354
|
+
uses**, because Claude Code defines `CLAUDE_PLUGIN_ROOT` only for a plugin
|
|
2355
|
+
install: a project-scoped `.mcp.json` that uses it launches `node /dist/…`
|
|
2356
|
+
and the server dies at startup (office-outlook-mcp; tempo-api-mcp regressed by
|
|
2357
|
+
following an earlier version of this lint). `.claude-plugin/plugin.json`
|
|
2358
|
+
`mcpServers` is resolved against the plugin root (the directory holding
|
|
2359
|
+
`.claude-plugin/`):
|
|
2360
|
+
|
|
2361
|
+
| `mcpServers` | Plugin config | Root `.mcp.json` | Warns on |
|
|
2362
|
+
| --- | --- | --- | --- |
|
|
2363
|
+
| `"./.mcp.json"` | the root `.mcp.json` | plugin config | a cwd-relative path in it |
|
|
2364
|
+
| absent | the root `.mcp.json` (Claude Code's default) | plugin config | a cwd-relative path in it |
|
|
2365
|
+
| another path, e.g. `"./.claude-plugin/mcp.json"` | that file | project-scoped | a cwd-relative path in that file; `${CLAUDE_PLUGIN_ROOT}` in the root file; a path that does not exist |
|
|
2366
|
+
| inline object (or an array mixing shapes) | the inline servers (and any named files) | project-scoped unless the array names it | a cwd-relative path inline; `${CLAUDE_PLUGIN_ROOT}` in the root file |
|
|
2367
|
+
| `mcp` instead (any value) | ignored by Claude Code, so the root `.mcp.json` | resolved as if `mcpServers` held the same value | always `plugin-json-mcp-ignored`: softer for `"./.mcp.json"`, stronger for any other path |
|
|
2368
|
+
|
|
2369
|
+
`mcp` is not a key Claude Code reads (`claude plugin validate`: "Unknown field
|
|
2370
|
+
'mcp'"), so every `mcp` key is reported as `plugin-json-mcp-ignored` (a
|
|
2371
|
+
warning; an error only under `--strict`). `"mcp": "./.mcp.json"` names the
|
|
2372
|
+
default anyway, so its message says it is harmless today but should be
|
|
2373
|
+
renamed to `mcpServers` — copies of the key with other paths broke plugin
|
|
2374
|
+
installs. Any other `mcp` value is resolved as the author meant (so the root
|
|
2375
|
+
file is not told to use the variable) and reported more strongly, because a
|
|
2376
|
+
plugin install really loads the root `.mcp.json`. `.mcpb`/`.dxt` bundles and URLs are skipped. One
|
|
2377
|
+
case is not checked: Claude Code loads the root `.mcp.json` first and merges
|
|
2378
|
+
the declared config over it, so a project-scoped root server whose name the
|
|
2379
|
+
plugin config does not replace also starts in a plugin install whose source
|
|
2380
|
+
ships that file.
|
|
2352
2381
|
|
|
2353
2382
|
The env check reads every `.js`/`.mjs`/`.cjs` under the entry's directory,
|
|
2354
2383
|
skipping `node_modules`, dot-directories, `test`/`tests`/`__tests__`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrischall/mcp-utils",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Shared scaffolding for the chrischall MCP fleet — server bootstrap, tool-result formatting, helpful errors, hardened env/config, a bearer API-client kit, zod atoms, session registries, a fetchproxy transport adapter, auth resolver skeletons, an in-memory test harness, and opt-in HTML helpers. The generic MCP glue hoisted out of ~19 sibling servers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|