@yawlabs/mcp 1.0.19 → 1.1.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 +49 -0
- package/README.md +11 -8
- package/dist/{auto-upgrade-EXN56GQI.js → auto-upgrade-3IZNHFYK.js} +1 -1
- package/dist/{chunk-PUO3HCQS.js → chunk-NOPVNM7B.js} +852 -142
- package/dist/index.js +3652 -2554
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,44 @@ All notable changes to `@yawlabs/mcp` (formerly `@yawlabs/mcph`) are documented
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
**Fixed -- yaw-mcp no longer hosts sidecars on a local build-tree oam**
|
|
8
|
+
|
|
9
|
+
A local oam build (a compiler output tree: `target/`, `debug/`, `out/`, `cmake-build-*`) reports the same version string as a release while carrying uncommitted code, so the `oam --version` probe could not tell it apart and yaw-mcp hosted sidecars on it -- in one observed case the same `oam 0.9.0` the installed releases reported, with different behavior behind it. The probe now refuses such a binary by PATH TEXT before anything spawns (`OamProbeFailure` gains `build-tree`), so it is never asked for a version, never trusted, and never enters the per-binary verdict cache. doctor and `install` say the real fix -- point `OAM_BIN` (or PATH order) at the installed oam and restart -- instead of "fix or reinstall". The same path-text rule typed's runtime manifest and Yaw's hook runtime already apply, so all three now certify the same binaries.
|
|
10
|
+
|
|
11
|
+
**Changed -- the managed sidecar tree is the default spawn source on every path oam does not host**
|
|
12
|
+
|
|
13
|
+
An `npx -y pkg@latest` sidecar that did not go to oam -- `runtime: "node"`, oam absent/below-min/unusable, a namespace an oam downgrade pinned to node -- spawned raw npx, which re-resolves the spec against the registry on every spawn, per pane. Those launches now rewrite to `node <entry>` running the on-disk copy `resolveNpmEntry` finds (the managed `sidecars install` tree first, then durable installs, then npx caches), so the registry is consulted by `sidecars install` and its background refresher instead of every spawn. The rewrite reuses `rewriteForOam`'s shared predicates (npxSpecIndex, isRegistrySpec, specConstraint, resolveNpmEntry), refuses exactly the same launch shapes, and honours exact pins -- a pin with no matching on-disk copy stays on npx, which is the only thing that can fetch it; version ranges stay on npx (unchanged policy: no range evaluator). A managed spawn that fails to boot downgrades ONCE to the original npx command, mirroring the oam->node boot-probe downgrade, with the same evidence rule for the session pin (`downgradedFromManaged` / `managedPinned` on the connect line; both pins now report additively when a namespace earned both). When oam takes the launch, none of this applies -- the managed gate is skipped and the connect line still reports oam. The no-pin on-disk lookup is memoized per package for the process lifetime (stable managed/durable hits only: a miss is re-resolved so a later `sidecars install` is picked up without a restart, and an npx-cache hit is re-resolved because its content-hashed path changes on refresh), capping the added per-connect directory walk at one per package.
|
|
14
|
+
|
|
15
|
+
**Fixed -- `reset-learning`, `status --json` and `doctor` account for the `prewarmFailures` section of `state.json`; a pre-warm that throws releases its claim**
|
|
16
|
+
|
|
17
|
+
`state.json` gained a fourth section, `prewarmFailures` (a startup pre-warm that failed is recorded so other brokers on the machine skip the same spawn for an hour), and the three commands that report on the file enumerated the first three only, so a file whose only content was pre-warm failures read as empty. `yaw-mcp reset-learning` now previews and reports `pre-warm failures` beside the other counts (deleting them lets every broker started afterwards pre-warm those servers again; a running broker keeps its in-memory skips until restart). `yaw-mcp status --json` gains `learning.prewarmFailures`, and `yaw-mcp doctor` adds `tool caches` and `pre-warm failures` lines to its STATE section (`state.toolCacheEntries` / `state.prewarmFailures` in `--json`). All additive; no schema version moves. Separately, the startup pre-warm sweep released the claim it holds on a namespace on every exit but a thrown activation; it releases it there too, so a claim never outlives the attempt it was taken for.
|
|
18
|
+
|
|
19
|
+
**Changed -- servers are listed in namespace order, and a tool-name collision goes to the lexically first namespace**
|
|
20
|
+
|
|
21
|
+
`tools/list`, `resources/list` and `prompts/list` listed loaded servers in the order they were loaded, and idle servers' cached tools in `bundles.json` order, so the same set of servers gave a different list depending on what the model loaded first. Every list and route table now walks namespaces in code-unit order (meta-tools still first, each server's own tool order kept), so the same loaded set gives a byte-identical list. This changes who wins a name collision: when two namespaces flatten onto one wire name (`gh` + `actions_list` and `gh_actions` + `list` are both `gh_actions_list`), the owner was the first one loaded and is now the lexically first namespace (`gh`), for loaded and idle servers alike. The list and the routes still agree on the owner, so a call always reaches the tool whose schema was listed; the activate reply still names a tool that lost its name, and renaming one namespace still resolves it.
|
|
22
|
+
|
|
23
|
+
**Fixed -- concurrent `yaw-mcp serve` panes no longer overwrite each other's learning in `state.json`**
|
|
24
|
+
|
|
25
|
+
Every running `serve` (one per MCP client pane) loaded `~/.yaw-mcp/state.json` once at startup and then saved the whole document from that snapshot, so with two panes open the later save erased the other pane's routing outcomes, pack history and newly learned tool lists. Every save now takes a cross-process lock (`state.json.lock`, O_EXCL, stale takeover after 10 s, bounded 1.5 s wait), re-reads the file and merges only what this process recorded since its last save: counters add their delta (no double counting), `lastUsedAt` takes the max, new pack-history calls are appended under the existing cap, and a namespace's tool list keeps whichever was learned later. After a save the pane routes on the merged learning, so it sees what other panes recorded. A save that cannot get the lock logs one line and keeps its pending changes for the next attempt instead of dropping them; it never holds up shutdown past the wait budget. The lock is the one `grades.json` already used, now shared from `file-lock.ts`. A side effect: `yaw-mcp reset-learning` is no longer undone by a running current `serve`, which adopts the reset on its next save.
|
|
26
|
+
|
|
27
|
+
**Changed -- `audit` and `compliance` grade with @yawlabs/mcp-compliance 0.20.4 (methodology 3.0.0)**
|
|
28
|
+
|
|
29
|
+
The dependency moves from `^0.17.1` to `^0.20.4`, so both commands grade under the current rubric. What that changes for a grade: since 0.20.0 a check that measured nothing (`skipped: true` -- no `--auth`, no tools declared, not applicable on the transport) is left out of the score instead of counting as a pass, so a server with failures and skips in the same pool can drop a letter, and a run in which every check skipped scores 0 (F); the suite also defaults to `--spec-version auto` (since 0.19.0), grading a server that answers `server/discover` against the 2026-07-28 catalog, and its 0.20.1 fixes stop crediting a gateway's 401 or 429 as the server's own rejection. Letters cached in `grades.json` before this carry `suiteVersion` 0.17.x and are not re-graded until the next `yaw-mcp audit`. `yaw-mcp compliance` now names the skips on its summary line (`9/10 passed (6 skipped, left out of the score), ...`), since `summary.passed` still counts them and the score no longer does; a report without `summary.skipped` prints as before.
|
|
30
|
+
|
|
31
|
+
**Fixed -- concurrent cold starts on a busy machine: one handshake extension, no duplicate prewarm spawn, a probe that does not pin a session to node**
|
|
32
|
+
|
|
33
|
+
Measured with 8 brokers starting together on a saturated Windows ARM64 box (perf study, 2026-10-09). Three things went wrong there, each fixed here.
|
|
34
|
+
|
|
35
|
+
A local sidecar whose MCP handshake needed 15-20 s was killed at the 15 s `MCP_CONNECT_TIMEOUT`, and the retry spawned a fresh child that paid the same cold boot under the same load (3 of 8 brokers lost `fetch` in one run; in others every oam-hosted sidecar missed the deadline and was respawned, and pinned, on node). When the deadline lands on a local child that is still running and the machine averaged at least 50% CPU busy over the wait, that child now gets the same deadline once more instead of being killed -- at most twice the value in all. A runtime that reports no CPU load (oam 0.18.0 on Windows returns every `os.cpus()` time as 0) is not read as idle: the live child gets its one extension there too, still capped at twice the deadline. On an idle box that reports its load a silent child still fails at exactly the deadline, and a per-server `connectTimeoutMs` is never extended. Both decisions are logged with the CPU share they saw.
|
|
36
|
+
|
|
37
|
+
`mcp_connect_activate` with several servers claimed a server the startup prewarm was already booting only when its sequential loop reached it, so a prewarm that finished in the meantime tore its fresh child down and the loop spawned the same server again (every broker in the study started `npmjs` twice). Every prewarm in flight is now claimed when the activate arrives.
|
|
38
|
+
|
|
39
|
+
The `oam --version` probe (3 s, retried once) timed out twice in 37 of 260 brokers and sent every sidecar of that process to node for its whole life. A clean answer is now remembered per binary (absolute path, size and mtime) in `~/.yaw-mcp/oam-probe.json`, so it is asked once per oam install or update rather than once per process; the one probe that runs gets 10 s per attempt; and a timeout verdict lapses after 60 s and is never written to the file, so a later connect -- or the next launch -- asks again. `YAW_MCP_DISABLE_PERSISTENCE` turns the file off.
|
|
40
|
+
|
|
41
|
+
**Added -- `mcp_connect_discover` takes `listOnly: true` for a side-effect-free listing**
|
|
42
|
+
|
|
43
|
+
A client UI that shows the installed servers (a `/mcp` panel, a status line) had only the model's discover to call, and an unfocused discover is not read-only: it runs the shell-history install-candidates scan and records a per-CLI nudge cooldown, so the suggestion was spent on a panel the model never reads; it ticks every connected server one call closer to idle eviction; it fires the once-per-session `yaw-mcp://guide` hint; and with a `context` it can auto-load a server. `listOnly: true` skips all four and returns the same server listing text. It is part of the discover memo key in both directions, so a model's plain `{}` inside the 3 s TTL still runs the install-candidates block instead of replaying the UI's body. Only a boolean `true` selects it; the low-level server does not validate input against the schema, so a stray string does not move a model's discover onto the quiet path.
|
|
44
|
+
|
|
7
45
|
**Fixed -- `release.sh` failed a green test suite on "printed no verdict" when run from a plain terminal**
|
|
8
46
|
|
|
9
47
|
The release gates grep the captured `npm run` output for each tool's summary line. vitest colours that summary even into a pipe -- its colour library never consults isatty, so colour is on wherever `NO_COLOR` is unset and `TERM` is not `dumb` -- and turns it off only inside an AI-agent environment (std-env's `isAgent`: `AI_AGENT`, `CLAUDECODE`, `CURSOR_AGENT` and others). From a plain terminal the bytes are `ESC[2m Test Files ESC[22m ESC[1mESC[32m133 passedESC[39m...`, which `Test Files +[0-9]+ passed` cannot match; the terminal renders both forms identically, which is why a green 133-file run read as "Tests exited 0 but printed no verdict" while earlier releases, run from inside Claude Code, had passed. The same escapes blinded the failure pattern (a red suite still failed, on its exit code, but without the summary line the message is about). Every verdict grep in `run_npm_check` now reads a copy of the output with CSI escape sequences stripped (ECMA-48 parameter, intermediate and final bytes, in the C locale); the coloured text still reaches the terminal. Covered by two stubbed full-run cases that feed the gate vitest's coloured passing and failing summaries.
|
|
@@ -181,6 +219,17 @@ The dry run said nothing about the originals, so the one step of an import that
|
|
|
181
219
|
|
|
182
220
|
`npm run verify:oam-floor` hosted a stdio `@modelcontextprotocol/sdk` server on oam v0.17.0 through `oam run` on 2026-09-25 -- initialize, tools/list and tools/call all completed -- and raised `MIN_OAM_VERSION` to it; the floor was 0.16.4. A machine whose oam is older hosts its node/npx sidecars on node instead, and logs a warning naming both versions, `oam self-update` as the fix, and that yaw-mcp needs a restart afterwards.
|
|
183
221
|
|
|
222
|
+
**Changed -- the oam floor moves to 0.18.0**
|
|
223
|
+
|
|
224
|
+
`npm run verify:oam-floor` hosted a stdio `@modelcontextprotocol/sdk` server on oam v0.18.0 through `oam run` on 2026-10-05 -- initialize, tools/list and tools/call all completed -- and raised `MIN_OAM_VERSION` to it; the floor was 0.17.0. A machine whose oam is older hosts its node/npx sidecars on node instead, and logs a warning naming both versions, `oam self-update` as the fix, and that yaw-mcp needs a restart afterwards.
|
|
225
|
+
|
|
226
|
+
Unlike the moves before it, this one carries oam changes that alter what yaw-mcp gets on oam, per oam's 0.18.0 changelog:
|
|
227
|
+
|
|
228
|
+
- **The vault passphrase strip holds for a broker that itself runs on oam.** From 0.18.0 an explicit `env` on a spawn is the child's whole environment, as under node. Earlier oam laid those pairs over the environment it started with, so a broker launched as `oam run --no-check .../dist/index.js` with `YAW_MCP_VAULT_PASSPHRASE` in its client env block passed the passphrase to every child it started -- sidecars and the self-upgrade and daily sidecar-refresh package-manager runs -- despite the strip. A broker on node was never affected. The floor does not reach an existing broker entry: `install` writes an oam entry only for an oam at or above the floor, but an entry written earlier names its oam binary and is not re-checked at launch, and `heal` rewrites only a broken entry. If your broker runs on oam, run `--version` on the oam binary your client's yaw-mcp entry names (it may not be the `oam` on your PATH), run `self-update` with that binary if it is below 0.18.0, then restart the client.
|
|
229
|
+
- **`@playwright/mcp --isolated` is hostable on oam.** oam 0.18.0 added `net` over a Windows named pipe or a Unix-domain socket (oam #219), the dial every browser tool makes in that mode, so the `"runtime": "node"` escape `src/oam-spawn.ts` named for it is no longer needed. This repo has not re-measured it; oam's release matrix covers it with a `--isolated` row.
|
|
230
|
+
- **`OAM_MAX_HEAP_MB=0` or a non-numeric value no longer removes the heap cap** (oam #223). oam keeps its default cap and warns once on stderr, so a hosted child that then exhausts its heap dies with `error[OAM-RT-OOM]` and gets yaw-mcp's heap-cap hint, where before it died in a raw V8 crash the hint could not recognise.
|
|
231
|
+
- **Two node behaviours yaw-mcp relies on now hold on oam.** oam's `undici` shim ignored `headersTimeout` and `bodyTimeout` before 0.18.0 (oam #218), so the 30 s caps in the uv bootstrap were inert there, and `fs.promises.copyFile` ignored `COPYFILE_EXCL`, so `secrets reset` run on oam could overwrite an earlier vault backup instead of picking a new name.
|
|
232
|
+
|
|
184
233
|
## 1.0.15 -- the missing-credential prompt catches more servers and says what is true, and `yaw-mcp secrets --json` keeps stderr to one JSON object per line
|
|
185
234
|
|
|
186
235
|
Published 2026-09-24, the same day as 1.0.13. This section was prepared under a 1.0.14 heading and published as 1.0.15: there is no 1.0.14 on npm and no `v1.0.14` tag. Sixteen entries below, from a full pass over the secrets and missing-credential code (#173). The credential prompt recognises more of the ways a server says a key is missing, no longer asks for a key bundles.json already sets, drops a value the server rejects, and its refusals say what the next activate will do. `yaw-mcp secrets --json` keeps stderr to one JSON object per line, and its prose refusals name their action. Six of the changes alter behaviour for an existing setup that opts into nothing, and none sits behind a switch: `secrets list --json` and `secrets audit --json` print one line; an inherited value of a name ending in `_PATH`, `_FILE`, `_DIR`, `_HOST`, `_PORT`, `_PREFIX` or `_SIZE` is no longer masked in a child's stderr tail or prompted for; more stderr phrasings bring up the credential prompt; a non-empty bundles.json value wins over a typed one; a vault with an array `entries` or scrypt-invalid kdf parameters is refused at load; and a Tab pasted at the `secrets set` value prompt is kept.
|
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ Your MCP client (Claude Code, Cursor, ...)
|
|
|
32
32
|
| Meta-tool | What it does |
|
|
33
33
|
|-----------|--------------|
|
|
34
34
|
| `mcp_connect_dispatch` | Describe a task in plain English; picks the best server, loads its tools, exposes them in one call. The fast path. |
|
|
35
|
-
| `mcp_connect_discover` | List available servers, optionally ranked by a context string. Auto-loads the top match when one clearly wins. Tool-name lists are capped at five per server; pass `server` for one server's full list. |
|
|
35
|
+
| `mcp_connect_discover` | List available servers, optionally ranked by a context string. Auto-loads the top match when one clearly wins. Tool-name lists are capped at five per server; pass `server` for one server's full list. `listOnly: true` (for client UIs) returns the same listing with no side effects: no auto-load, no idle tick, no install suggestions. |
|
|
36
36
|
| `mcp_connect_activate` / `deactivate` | Load / unload specific servers by namespace. |
|
|
37
37
|
| `mcp_connect_read_tool` | Return one tool's schema without loading its server. |
|
|
38
38
|
| `mcp_connect_exec` | Run a short declarative pipeline of tool calls in one round-trip (`{"$ref": "<step>[.path]"}` splices prior outputs; no eval, max 16 steps). |
|
|
@@ -41,7 +41,9 @@ Your MCP client (Claude Code, Cursor, ...)
|
|
|
41
41
|
| `mcp_connect_secrets` | Show which local-vault secrets each server's `${secret:NAME}` refs resolve to -- by name only, never a value. |
|
|
42
42
|
| `mcp_connect_health` | Call counts, error rates, and latency per loaded server. |
|
|
43
43
|
|
|
44
|
-
**What `tools/list` carries.** By default (`gateway`) it is the meta-tools above plus the tools of the servers loaded *this session* -- never the whole catalog, which on a large install ran to ~27,000 tokens before the first prompt. The routing advice (dispatch for a concrete task, discover to browse, exec for a known chain, loading is per session) is sent once as the server's MCP `instructions`, which Claude Code puts in the system prompt, so the per-tool descriptions stay short. A client that cannot defer tool descriptions and inlines every listed tool into every request gets `lite` instead: only `mcp_connect_exec`, `mcp_connect_find_tool` and `mcp_connect_read_tool` are listed, which between them find, describe and call any installed tool (exec loads a cached server on first use). yaw-mcp picks `lite` on its own when the client identifies itself as `typed-cli` in the MCP `initialize` handshake; the unlisted meta-tools stay callable by name. `YAW_MCP_TOOL_EXPOSURE` overrides either default.
|
|
44
|
+
**What `tools/list` carries.** By default (`gateway`) it is the meta-tools above plus the tools of the servers loaded *this session* -- never the whole catalog, which on a large install ran to ~27,000 tokens before the first prompt. The routing advice (dispatch for a concrete task, discover to browse, exec for a known chain, loading is per session) is sent once as the server's MCP `instructions`, which Claude Code puts in the system prompt, so the per-tool descriptions stay short. A client that cannot defer tool descriptions and inlines every listed tool into every request gets `lite` instead: only `mcp_connect_exec`, `mcp_connect_find_tool` and `mcp_connect_read_tool` are listed, which between them find, describe and call any installed tool (exec loads a cached server on first use). yaw-mcp picks `lite` on its own when the client identifies itself as `typed-cli` (in the MCP `initialize` handshake, or on 2026-07-28 in each request's `clientInfo`); the unlisted meta-tools stay callable by name. `YAW_MCP_TOOL_EXPOSURE` overrides either default.
|
|
45
|
+
|
|
46
|
+
**The list changes during a session, on purpose.** `tools/list` reflects what this yaw-mcp process has loaded: loading and unloading a server adds and removes its tools, and each change is announced with `list_changed` (on 2026-07-28, through `subscriptions/listen`) and never cached (`ttlMs: 0`). MCP 2026-07-28 (SEP-2567) asks that lists not vary per connection; on stdio one client owns one yaw-mcp process, so this is the server's own state changing through its own tools, which is what `listChanged` is for. Servers are listed in namespace order, so the same loaded set gives the same list whatever order it was loaded in, and when two namespaces flatten onto one tool name the lexically first one owns it. See [`docs/protocol-eras.md`](./docs/protocol-eras.md) for both protocol eras, including what a 2026-07-28 session does without server-to-client requests.
|
|
45
47
|
|
|
46
48
|
**Ranking.** dispatch/discover rank with BM25, computed locally. On top of the ranker, three signals adjust scores:
|
|
47
49
|
|
|
@@ -123,13 +125,13 @@ Two consequences worth knowing. It pins a path, so it does not re-resolve `@late
|
|
|
123
125
|
|
|
124
126
|
### Which runtime the sidecars get
|
|
125
127
|
|
|
126
|
-
When oam is installed and meets the minimum, yaw-mcp hosts the MCP servers it spawns on it. Nothing needs configuring — install oam and the sidecars move over. Without oam
|
|
128
|
+
When oam is installed and meets the minimum, yaw-mcp hosts the MCP servers it spawns on it. Nothing needs configuring — install oam and the sidecars move over. Without oam the launch still does not spawn raw npx when it can be helped: the package is resolved on disk (the managed sidecar tree first, then durable installs, then npm's npx cache) and spawned as `node <entry>` — a direct spawn that skips npx's per-spawn registry re-resolution. Only a package with no resolvable on-disk copy falls back to npx itself, and no warning is printed for any of this, because nothing was asked for.
|
|
127
129
|
|
|
128
130
|
Only Node-based launches are rewritten. A server whose command is `docker`, `uvx`, or a native binary is left alone, as is an npx package that cannot be found on disk.
|
|
129
131
|
|
|
130
|
-
Two more npx shapes stay on npx, because npx re-resolves its spec against the registry while `oam run <entry>` just
|
|
132
|
+
Two more npx shapes stay on npx, because npx re-resolves its spec against the registry while `oam run <entry>` — and the managed `node <entry>` spawn — just run whatever sits at the path they are handed. A spec that **constrains the version** keeps npx unless the copy on disk can be shown to satisfy it — an exact pin moves over only when the resolved copy declares that same version, and a range or partial (`^1.2.3`, `~1.2`, `1.x`) always keeps npx, since honouring one would mean evaluating semver ranges against the tree. A spec naming a **git or path target** (`npx -y ./local-server`, `github:owner/repo`) keeps npx too: it is not a package name, so there is nothing to look it up as. A plain `@latest`, or no version at all, is the everyday case and does move over.
|
|
131
133
|
|
|
132
|
-
**One tradeoff worth knowing.** `npx -y <pkg>@latest` re-resolves that tag on every spawn, so those servers update themselves. `oam run <entry>`
|
|
134
|
+
**One tradeoff worth knowing.** `npx -y <pkg>@latest` re-resolves that tag on every spawn, so those servers update themselves. Once a server moves onto `oam run <entry>` or the managed `node <entry>` spawn, it runs the copy already on disk — oam has no fetch-on-demand, and the direct spawn deliberately doesn't re-resolve either — and npx stops running for that server, so the copy stops being refreshed. The version pins itself until something fetches a newer one. yaw-mcp logs the resolved version once per package at startup so this is visible rather than silent, and picks the newest copy present.
|
|
133
135
|
|
|
134
136
|
### Installing the servers durably
|
|
135
137
|
|
|
@@ -143,7 +145,7 @@ It is not automatic and nothing requires it. Acquiring packages means network an
|
|
|
143
145
|
|
|
144
146
|
Only npx servers naming a **registry package** are installed. An npx launch pointing at a git or path target — `npx -y github:owner/repo`, `npx -y ./local-server` — is skipped and named in the output; those keep using npx, since resolving them would mean fetching the target just to learn the name it declares. Two servers pinning the same package at different versions is also reported: one flat `node_modules` holds a single version, so the command tells you which one it installed rather than letting the loser start on something it did not ask for.
|
|
145
147
|
|
|
146
|
-
`yaw-mcp doctor` prints the installed version of each configured package under OAM RUNTIME, so a pinned or missing one is visible. To keep npx's self-updating behavior for a particular server instead,
|
|
148
|
+
`yaw-mcp doctor` prints the installed version of each configured package under OAM RUNTIME, so a pinned or missing one is visible. To keep npx's self-updating behavior for a particular server instead, give its spec a version range (`pkg@^1.2.3`) or a git/path target — the shapes that always stay on npx. A per-server `runtime: "node"` does NOT keep it: that escape hatch opts out of oam, and the managed tree still supplies the spawn.
|
|
147
149
|
|
|
148
150
|
`--json` emits the same keys on every run — `root`, `installed`, `reason`, `error`, `conflicts`, `skipped` — so a script can read the result without first working out which path it took.
|
|
149
151
|
|
|
@@ -402,7 +404,7 @@ yaw-mcp does **not** block outbound traffic, firewall DNS, analyze source, or pi
|
|
|
402
404
|
|
|
403
405
|
## Missing credentials
|
|
404
406
|
|
|
405
|
-
If a server exits with something like `GITHUB_TOKEN is required` and your client advertises MCP [elicitation](https://modelcontextprotocol.io/specification/server/elicitation), yaw-mcp prompts for the value and retries, rather than failing the call outright.
|
|
407
|
+
If a server exits with something like `GITHUB_TOKEN is required` and your client advertises MCP [elicitation](https://modelcontextprotocol.io/specification/server/elicitation), yaw-mcp prompts for the value and retries, rather than failing the call outright. On MCP 2026-07-28, which has no server-to-client requests, the prompt comes back inside the tool call's reply and the client's retry carries the answer (see [`docs/protocol-eras.md`](./docs/protocol-eras.md)).
|
|
406
408
|
|
|
407
409
|
## Environment variables
|
|
408
410
|
|
|
@@ -419,6 +421,7 @@ Common ones (run `yaw-mcp --help` for the full list):
|
|
|
419
421
|
| `YAW_MCP_AUTO_HEAL` | `0` disables the startup pass that re-points client entries whose launch file no longer exists -- what an app upgrade leaves behind when it deletes the directory the entry named. The pass only rewrites an entry yaw-mcp wrote that is currently broken; `yaw-mcp heal` is the same sweep on demand and ignores this variable. Default on. |
|
|
420
422
|
| `YAW_MCP_SIDECAR_REFRESH` | `0` disables the daily background check that keeps managed sidecars current. Only ever runs if you have run `yaw-mcp sidecars install`; explicit pins and semver ranges are never moved. Default on. |
|
|
421
423
|
| `YAW_MCP_PREWARM` | `0` stops yaw-mcp spawning a server at startup just to learn its tool list. Learning is rare -- the list persists and is only re-learned once it ages out -- but the session that does it starts the upstream twice, once to read the list and once for the activate that follows, which matters if the server startup is not idempotent. Off, a server whose tools are not already known shows none of them until you activate it; `discover` still lists it. Default on. |
|
|
424
|
+
| `YAW_MCP_PROTOCOL` | Which MCP protocol eras yaw-mcp serves to the client that launched it. `auto` (the default) serves both: a client that opens with `server/discover` gets 2026-07-28, a client that opens with `initialize` gets the 2025 protocol it asked for. `legacy` serves the 2025 protocol only and answers `server/discover` with method-not-found, so a probing client falls back to `initialize` -- the server-side twin of Claude Code's own `MCP_PROTOCOL_NEGOTIATION=legacy`, for when a 2026-07-28 session misbehaves. An unrecognised value logs a warning and serves `auto`. Read at startup. |
|
|
422
425
|
| `OAM_BIN` | Path to the `oam` binary to use instead of the one on `PATH`. A path that does not exist is reported by `doctor` as an unusable oam (fix the variable), not as oam being absent. |
|
|
423
426
|
| `OAM_MAX_HEAP_MB` | Raises the V8 heap cap oam applies to a hosted server (4 GiB by default; can be lower inside a memory-limited Linux container). Set it in that server's `env` when a hosted sidecar dies with a heap out-of-memory error, or give that server `"runtime": "node"`. |
|
|
424
427
|
| `YAW_MCP_AUTO_LOAD` | `1` pre-activates the top recurring pack at startup (needs persistence). Default off. |
|
|
@@ -426,7 +429,7 @@ Common ones (run `yaw-mcp --help` for the full list):
|
|
|
426
429
|
| `YAW_MCP_MAX_RESULT_BYTES` | Ceiling on a single proxied tool result. Over it, the reply is cut and carries a marker saying so, with the byte total and what was dropped -- a silently truncated result reads to the model as a complete one. Default `100000` (~25k tokens); `0` disables. `structuredContent` is passed through verbatim and is never cut. |
|
|
427
430
|
| `YAW_MCP_TOOL_TOKEN_CAP` | Ceiling on the estimated tokens of the whole loaded tool surface, checked alongside `YAW_MCP_SERVER_CAP` when a server is activated. The server cap counts servers, which says nothing about their size: six 3-tool servers and six 60-tool servers both sit at a cap of `6`. Default off. |
|
|
428
431
|
| `YAW_MCP_TOOL_EXPOSURE` | How much of the catalog `tools/list` advertises. `gateway`: the meta-tools plus the servers loaded this session. `lite`: only `mcp_connect_exec` / `find_tool` / `read_tool` plus the loaded servers, for a client that inlines every listed tool into every request; the other meta-tools stay callable by name. `full`: the pre-gateway surface, with a placeholder for every cached-but-unloaded tool. Unset, yaw-mcp picks `lite` when the client's MCP `clientInfo.name` is `typed-cli` and `gateway` otherwise; a set value always wins over that. Re-read on every `tools/list`, so a change lands without a restart. An unrecognised value logs a warning once and falls back to the client default. |
|
|
429
|
-
| `MCP_CONNECT_TIMEOUT` | Milliseconds to wait for a server's MCP handshake. Default `15000`; a server's own `connectTimeoutMs` in `bundles.json` always wins. Whole milliseconds in `1..2147483647` -- anything else falls back to the default with one warn. |
|
|
432
|
+
| `MCP_CONNECT_TIMEOUT` | Milliseconds to wait for a server's MCP handshake. Default `15000`; a server's own `connectTimeoutMs` in `bundles.json` always wins. Whole milliseconds in `1..2147483647` -- anything else falls back to the default with one warn. When the machine is saturated (CPU at least 50% busy over the wait) and the local child is still running at the deadline, it gets the same deadline once more -- at most twice the value in all (a runtime that reports no CPU load, such as oam on Windows, counts as busy); a per-server `connectTimeoutMs` is never extended. |
|
|
430
433
|
| `MCP_LIST_TIMEOUT` | Milliseconds to wait for a server's tool/resource/prompt inventory calls after the handshake. Default `15000`; same `1..2147483647` whole-millisecond parse, invalid values fall back with one warn. |
|
|
431
434
|
| `MCP_CALL_TIMEOUT` | Milliseconds to wait for a single proxied `tools/call`. Default `60000` (the SDK's own bound); raise it for legitimately slow servers. Same `1..2147483647` whole-millisecond parse, invalid values fall back with one warn. |
|
|
432
435
|
| `YAW_MCP_IDLE_THRESHOLD` | Non-matching tool calls a loaded server tolerates before it is unloaded. Default `10`; bursty servers earn more patience automatically. The older name `MCP_CONNECT_IDLE_THRESHOLD` still works as a fallback. |
|