@yawlabs/mcp 1.0.13 → 1.0.16

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 CHANGED
@@ -2,13 +2,209 @@
2
2
 
3
3
  All notable changes to `@yawlabs/mcp` (formerly `@yawlabs/mcph`) are documented here. This project uses [semantic versioning](https://semver.org) and a script-gated release flow: `./release.sh <version>` runs lint + typecheck + tests + build, bumps, tags, publishes to npm, and publishes `server.json` to the MCP registry.
4
4
 
5
+ ## Unreleased
6
+
7
+ **Fixed -- Codex CLI 0.151 and later get yaw-mcp's tools: `install codex-cli` sets `mcp_optional_startup_grace_ms = 0` at the top of `config.toml`**
8
+
9
+ Codex 0.156.1 waits 1000 ms for optional MCP servers while it builds a session's tool catalog -- the top-level `mcp_optional_startup_grace_ms`, whose default is 1000 -- and a server that misses that grace is left out for the whole session, not added on a later turn. yaw-mcp launched through the entry `install codex-cli` writes (`command = "npx"`, `args = ["-y", "@yawlabs/mcp@latest"]`) took from 3 to more than 35 seconds to start, so its tools were absent on all 8 turns of a 37-second session. With `mcp_optional_startup_grace_ms = 0` at the top of `config.toml`, Codex waits for each server's own `startup_timeout_sec` instead -- the entry sets 60 -- and the tools were present from the first turn. Both were measured on 2026-09-24 against real Codex 0.156.1, and Codex 0.144.0 accepts the key (no config error, and `codex mcp list` works). Codex's source has the key from 0.151.0 on; Codex 0.147 to 0.150 already wait a fixed 1 s that this key cannot change, so the fix needs Codex 0.151 or newer. Marking the entry `required = true` is not the fix: measured, a required server that has not started within `startup_timeout_sec` stops Codex with `required MCP servers failed to initialize ... timed out handshaking`, which would turn a slow or broken yaw-mcp into a Codex that does not start.
10
+
11
+ When the key is missing, `install codex-cli` now adds it as one line above the first table -- after the file's last top-level setting, or at the very top of a file that holds only tables, followed there by one blank line unless the file already opens on one -- in the same verified write as the entry, and prints `Added mcp_optional_startup_grace_ms = 0 to <file>: ...` once the write lands. A last line with no line break gets one, in the file's own line ending, so a CRLF file stays CRLF. For an existing setup, re-running `install codex-cli` over an entry that is already correct writes that one line (plus a blank line under it when the file starts with a table, as a file an earlier `install codex-cli` created does, and the final line break above when the file had none) and nothing else, where it printed `Nothing to do` before, and ends with `Restart it to pick up the change.`, not "the new MCP server"; the run after that is `Nothing to do` again. If a write that adds the line beside an entry that is already correct is refused, the error says the `mcp` entry is already correct and how to finish by hand: add the line above the first table in the file, and delete the legacy entry too when the same write was taking one out. A key already in the file is never changed, `--force` and `--repair` included: at 0 install says nothing about it, and at any other value (in any spelling, `"mcp_optional_startup_grace_ms" = 1000` included) it leaves the key and its value exactly as they are -- the entry is still written when it needs to be -- and says so once. For a value Codex takes, that is one `Note:` line naming the file, the value it found and why 0 is recommended, ending `Edit that value by hand to change it.` -- the value, not a line, since a multi-line string is one value over several lines. Codex's source types the key as a u64 at every release from 0.151.0 through 0.156.1, and measured on Codex 0.156.1, each of `-1`, `"0"`, `true`, `0.0`, `1979-05-27`, `[0]`, `{ a = 1 }` and `9223372036854775808` stops Codex at startup with exit 1 (Codex 0.144.0, which predates the key, loads all of them but the last). A value outside that type -- a float, a negative integer, a string, a boolean, a date or time, an array or a table -- gets a warning on stderr instead, `yaw-mcp install: warning -- <file> already sets mcp_optional_startup_grace_ms to ...`, which says what the value is and what Codex needs -- `0.0, a float where Codex CLI needs an integer`, `-1, a negative integer where Codex CLI needs a non-negative integer` -- and, in place of why 0 helps, `A Codex CLI release that reads the key will not load the file with that value; 0 is recommended.`, before the same last step. As with the warning about a typed CLI too old to read its file, the run still exits 0 and ends on its usual `Nothing to do` or `Done` line, and `install --all` counts the client as installed: whether the file loads depends on the Codex release. For an array or a table, which can be a `[mcp_optional_startup_grace_ms]` header and the keys under it, the last step is `To change it, delete it by hand and set the key on one line above the first table in the file.` instead, since a line written in place of a header that follows another table is a key of that table. A float such as `0.0` is another value, not 0, and the warning prints it as the file spells it. An integer past 9223372036854775807 is the exception to that exit 0, and so is one below -9223372036854775808: no TOML integer holds either, so no Codex release loads the file at all (measured for `9223372036854775808`, which 0.144.0 refuses at parse as 0.156.1 does), and install refuses to write into it, as it refuses a file its client loads nothing from -- `yaw-mcp install: <file> sets mcp_optional_startup_grace_ms to 9223372036854775808, larger than a TOML integer holds, so Codex CLI will not load the file -- refusing to write into it; change that value by hand to a non-negative integer no larger than 9223372036854775807 (0 is recommended), then re-run.` It exits 1, writes nothing and prints no `Nothing to do` or `Done` line, under `--dry-run` and `--skip` too, and `install --all` counts the client as failed. Only the key's own value is checked: an out-of-range integer inside an array or a table there gets the array-or-table warning, and one at any other key is not checked. `--skip` over an existing `mcp` entry leaves the whole file as it is, the key included; with no entry there is nothing to skip, and install writes the entry and the key as usual. `--dry-run` shows the line in its preview and prints `Would add mcp_optional_startup_grace_ms = 0 to <file>: ...`. The key follows `--scope project` (the project's `.codex/config.toml`) and `CODEX_HOME` exactly as the entry does. `uninstall codex-cli` leaves it in place -- it is not a server, and it only changes how long Codex waits for servers to start -- and when the file it edits still sets the key to 0, it says so in one `Keeping mcp_optional_startup_grace_ms at 0 in <file>: ...` line (`Would keep ...` under `--dry-run`), which names the key and its value rather than quoting a line -- the file may spell them `mcp_optional_startup_grace_ms=0`, `+0` or with a quoted key -- says the key stays because it is not a server and may be your own, and ends `Delete the line that sets it by hand if you no longer want it.`; a key at any other value, or none, gets no line. `doctor` and `install --list` only read the file -- they now say when the key is missing or refused, as an entry below describes -- and `heal`, `try` and `import`, which edit it, never add the key.
12
+
13
+ This changes what a re-run of `install codex-cli` does for an existing user who opts into nothing. For one run, `--skip` keeps the key out: over an existing `mcp` entry it leaves the whole file as it is, an entry that differs included. What keeps it out for good is a value of your own: a value you set yourself is left alone, so `mcp_optional_startup_grace_ms = 1000` on one line above the first table keeps Codex's own one-second grace through every later `install codex-cli`, `--force` and `--repair` included: install notes the value and leaves it.
14
+
15
+ **Fixed -- `doctor` and `install --list` say when a Codex CLI `config.toml` lacks `mcp_optional_startup_grace_ms`, or sets it to a value Codex will not load**
16
+
17
+ Both read a Codex setup from before `install codex-cli` added the key as healthy -- `OK -- has "mcp" entry` and `installed` -- though it is the setup whose tools Codex 0.151 and later leave out whenever yaw-mcp takes more than a second to start (the entry above). Each now asks the plan `install` makes for the same file, so the three cannot disagree about which key a file lacks or which value Codex refuses. Beside yaw-mcp's `mcp` entry:
18
+
19
+ - **The key is missing.** doctor's CLIENTS line keeps its `OK` and ends ``; the file does not set mcp_optional_startup_grace_ms -- run `yaw-mcp install codex-cli` to add mcp_optional_startup_grace_ms = 0`` -- or, on a line that already says to rerun install, `-- install adds mcp_optional_startup_grace_ms = 0 as it writes the working entry`, and beside an entry whose launch path is for another OS, `-- set mcp_optional_startup_grace_ms = 0 by hand, on one line above the first table in the file`. DIAGNOSIS gains ``Run `yaw-mcp install codex-cli` to add mcp_optional_startup_grace_ms = 0 to <file>: <why>.`` under whichever verdict it prints, once per file, and not for the other-OS entry. It is not a warning, and the exit code stays 0: the file loads and yaw-mcp starts, the precedent a legacy entry beside a working one set. `install --list` shows `installed (setting missing)`, with a note under the table: ``Note: <file> has the Codex CLI (user) entry but does not set mcp_optional_startup_grace_ms = 0: <why>. `yaw-mcp install codex-cli` adds it.`` For the project row the run it names carries `--scope project`, and `--project-dir` when `--list` was given one.
20
+ - **The value is one a Codex that reads the key will not load** -- `-1`, `"0"`, `0.0`, `true`, a date, an array, a table. doctor's line drops its `OK -- ` and ends `; the file sets mcp_optional_startup_grace_ms to -1, a negative integer where Codex CLI needs a non-negative integer -- a Codex CLI release that reads the key will not load the file with that value, and install leaves a value you set alone; edit that value by hand (0 is recommended)`. It is a warning, so doctor exits 2, as it does for our entry in a file its client cannot load for its syntax. `install --list` shows `installed (setting refused)`, with a note in the words of install's own warning.
21
+ - **The value is one no Codex release loads** -- an integer past 9223372036854775807 or below -9223372036854775808. doctor's line is ``exists but sets mcp_optional_startup_grace_ms to 9223372036854775808, larger than a TOML integer holds, so Codex CLI will not load the file -- install refuses to write into it; change that value by hand to a non-negative integer no larger than 9223372036854775807 (0 is recommended), then run `yaw-mcp install codex-cli` `` in place of the row's usual wording -- which, for a file with no entry of ours, was ``present, no "mcp" entry -- run `yaw-mcp install codex-cli` ``, a run install refuses -- and a warning when our entry is there. `install --list` shows `installed (setting refused)`.
22
+
23
+ A value Codex takes, such as `1000`, is yours, and neither command says anything about it. `doctor --json` ends `.diagnosis.summary` with the DIAGNOSIS step, word for word, and every `clients[]` item gains `rootDefaults`: one item per top-level setting the file does not hold at the value install writes, with `key`, `recommended`, `why`, `state` (`missing`, `other`, `refused` or `refused-every-release`), `value` (always a string), `kind`, `needs`, `everyRelease` and `fix`, each null in a state that has none. It is `[]` on a JSON-family row, on a slot with no file, and on a file doctor cannot read or install will not edit. No existing field changed. `install --list` still counts these rows as installed in its headline.
24
+
25
+ **Fixed -- `install --help` no longer calls a re-run over a matching Codex CLI entry a no-op**
26
+
27
+ `install --help` said that re-running install over an entry that already matches is a no-op, and that `--repair` is one on such an entry. For Codex CLI both stopped being true when install began adding `mcp_optional_startup_grace_ms = 0` (the first entry above). The text now reads:
28
+
29
+ ```
30
+ Re-running install over an entry that already matches is a no-op (exit 0, no
31
+ prompt) -- unless the file lacks a top-level setting its client needs:
32
+ Codex CLI: mcp_optional_startup_grace_ms = 0
33
+ The re-run then adds that setting (--dry-run previews it). It is add-only:
34
+ a value you set is left alone, and install says so.
35
+ Undo it with `yaw-mcp uninstall <client>`, which leaves such a setting in place.
36
+ ```
37
+
38
+ The indented line is built from the client table rather than written by hand. `--repair` over a matching entry `does what a re-run does (above)`, `--skip` leaves `the existing entry, and the rest of the file, untouched`, and `--dry-run` lists a top-level setting it would add with the entry and any permissions patch. A new paragraph says that a file install will not write into -- one that does not parse, for example, or one that sets such a setting to a value no release of its client loads -- exits 1 with nothing written, under `--dry-run` and `--skip` too. In `yaw-mcp --help`, `install <client>` says that for codex-cli it also adds the key, even on a re-run over an entry that is already correct, and the `install --list` legend names `(setting missing)` and `(setting refused)`.
39
+
40
+ **Fixed -- `install`'s Done line names a new MCP server only when the run wrote one**
41
+
42
+ A re-run of `install` over an entry that was already correct, whose only write was taking a legacy key (`mcp.hosting`, `mcph` or `yaw-mcp`) out of the file or adding yaw-mcp's pattern to Claude Code's `permissions.allow` (for Claude Code and typed), still ended with `Restart it to pick up the new MCP server.` -- or the row's own form of it, such as `Cline starts the server when the file is saved -- no restart needed.` or `typed picks the entry up in its next session.` -- for a server the run had not added. Those runs now name the change, in the row's own words: `Restart it to pick up the change.`, `Cline picks the change up when the file is saved -- no restart needed.`, `typed picks the change up in its next session.`, `Reload the IDE window to pick up the change.` The same goes for a legacy key taken out of one of Cline's editor copies when every entry was already correct. A run that adds or changes the `mcp` entry in any file it writes -- the client's own file or an editor copy -- prints the Done line it printed before, byte for byte, with or without a legacy trim. `install --all` prints each client's Done line from the same code, so the same holds there. Claude Code at `--scope project` keeps its own Done line, which asks you to approve the `.mcp.json` server when prompted, on every run that writes a file: install cannot see whether it was approved. A run with nothing to write prints `Nothing to do` instead, as it did before.
43
+
44
+ **Fixed -- a CRLF config file with no final line break stays CRLF when yaw-mcp writes it**
45
+
46
+ When a client config it rewrites had no line break at the end, yaw-mcp added one -- in `install`, `uninstall`, `try` and `try-cleanup`, `doctor` when it sweeps an expired trial out of a client config, and `import` when it takes the originals out -- and that line break was always a bare LF. What yaw-mcp splices in already copies the file's own line ending, so a CRLF file with no final line break came back CRLF on every line but the last. Reproduced with `install codex-cli --repair` (or `--force`) replacing the `[mcp_servers.mcp]` table in the middle of such a `config.toml`; the same happened to a CRLF `~/.claude.json`, `.mcp.json` or Cline settings file, editor copies included, and to Claude Code's `settings.json` when `install` or `uninstall` changed its `permissions.allow`. The final line break now uses the file's own line ending, the one its first line break uses (CRLF, LF or a lone CR), and LF when the file has no line break at all. A file that already ends in a line break keeps exactly the one it had. A lone CR at the very end is that line break only in a file whose first line break is a lone CR; anywhere else an LF goes after it, which completes a CRLF file's last line break and gives an LF file the final LF it always got, so an LF file is written as before. A `config.toml` that holds nothing but whitespace is still written as a new file, as a missing one is; when that whitespace's first line break is a CRLF, the new file is now CRLF too, where it was LF.
47
+
48
+ **Fixed -- `heal` ends a client config it rewrites with a line break**
49
+
50
+ When `heal` -- the `yaw-mcp heal` command, and the same sweep `serve` runs at startup -- re-pointed a stale entry in a client config whose last line had no line break, it wrote the file back still without one, where `install`, `uninstall`, `try` and `import` add one to a file they rewrite. (A `config.toml` whose `[mcp_servers.mcp]` table came last was the exception: replacing that table rewrote the file's end, line break included.) It now adds one too, in the file's own line ending as the entry above describes, and a file that already ends in a line break keeps exactly the one it had. A run that re-points nothing, and `heal --dry-run`, still write nothing. The startup pass makes this change with no command run, and `YAW_MCP_AUTO_HEAL=0` turns that pass off, as before; `yaw-mcp heal` run by hand ignores the variable.
51
+
52
+ **Fixed -- a client config `install` or `uninstall` cannot write is named, with the step past it**
53
+
54
+ A failed write printed node's error, which named the temp file the write renames from and said nothing to do. Measured on Windows 11 with Node 22: a read-only `config.toml` gave `failed to write <file>: EPERM: operation not permitted, rename '<file>.tmp-...' -> '<file>'`, and a `CODEX_HOME` pointing at a file gave `EEXIST: file already exists, mkdir '<CODEX_HOME>'`. The message now names the file you know and the step past it:
55
+
56
+ - A read-only file: ``yaw-mcp install: failed to write <file>: it is read-only -- clear its read-only attribute (`attrib -R "<file>"`), then re-run.`` On macOS and Linux a read-only file does not stop the write, which replaces the file through its directory.
57
+ - A file where a directory has to be: `failed to write <file>: <that file> is a file, not a directory -- move or rename it, then re-run`, or, when an environment variable put the config under it, `failed to write <file>: <that file> is a file, not a directory, and CODEX_HOME (set to <value>) puts config.toml under it -- point CODEX_HOME at a directory, then re-run`. On macOS and Linux that fault stops the read before any write, and the `cannot read <file>:` refusal of `install` and `uninstall` now ends the same way, where it ended on node's `ENOTDIR: not a directory`; `try` gets the clause without the variable.
58
+ - On Windows, a file another program holds: `another program may be holding it open, or your account may not replace it (EPERM) -- close whatever has it open (an editor, a sync client, a virus scanner) or fix its permissions, then re-run`. A directory that will not take a new file: `your account may not create or replace files in <directory> (EACCES) -- fix that directory's permissions, then re-run`.
59
+
60
+ Any other error keeps node's message, plus the variable to check when the directory it names could not be made. Both commands still exit 1 with nothing written. `heal` words a failed write the same way (the next entry). The writes of Claude Code's `settings.json` permissions and of Cline's per-editor copies keep their wording, which already gives a by-hand step.
61
+
62
+ **Fixed -- `heal` reports a stale entry it could not re-point, and exits 1**
63
+
64
+ When `heal` found a stale entry and its rewrite failed -- a read-only `config.toml` on Windows, say -- the failure went to a log line and nowhere else: `yaw-mcp heal` printed `No stale yaw-mcp entries found.` and exited 0, straight after `heal --dry-run` had said `Would re-point 1 stale entry`. Such an entry now goes to stderr in every mode, `--json` and `--quiet` included, and the run exits 1:
65
+
66
+ ```
67
+ yaw-mcp heal: could not re-point 1 stale entry:
68
+ codex-cli (user): <file>
69
+ still -> <launch file that no longer exists>
70
+ failed to write <file>: it is read-only -- clear its read-only attribute (`attrib -R "<file>"`), then re-run
71
+ It still names a launch file that no longer exists, so its client cannot start yaw-mcp -- fix what the line above says, then re-run `yaw-mcp heal`.
72
+ ```
73
+
74
+ The last line of each entry is the write-failure wording of the entry above, or, for an edit refused before any write (a file its client cannot load, a splice that will not verify), `failed to splice the "mcp" entry into <file> (<why>)`. `heal --dry-run` now asks that same splice, so it says `cannot re-point` for an entry the live run would refuse, where it said `Would re-point`. `No stale yaw-mcp entries found.` prints only when the sweep found no stale entry, re-pointed or not. `heal --json` gains `failed`, one item per such entry with `clientId`, `scope`, `path`, `from`, `to` and `error`; `healed`, `unhealable`, `count` (still repairs only) and `dryRun` are unchanged. The startup pass `serve` runs still logs one `Could not heal a stale yaw-mcp entry` warning per such entry and carries on, now with that clause in place of node's error; `YAW_MCP_AUTO_HEAL=0` turns that pass off.
75
+
76
+ **Fixed -- `uninstall` over an `mcp` entry it will not edit says so instead of calling it absent, and `install` names the fix**
77
+
78
+ Codex reads an `mcp` entry written as an inline table under `[mcp_servers]`, as dotted keys, or inside an inline `mcp_servers = { mcp = { ... } }`, and will not load a file that writes it as an array of tables; yaw-mcp's TOML editor rewrites none of these shapes. `uninstall codex-cli` read such a file as holding no entry and printed `Nothing to do: Codex CLI (user) has no yaw-mcp entry.` at exit 0, while `doctor` and `install --list` reported the entry and, in every shape but the array of tables, Codex went on launching it. It now refuses, exit 1 with nothing written, before its confirmation prompt and under `--dry-run` too: `yaw-mcp uninstall: the "mcp" entry in <file> is <shape>, which uninstall will not edit -- nothing was removed; <fix>, then re-run.` `install` exited 1 over the same file before and still does, under every flag, but ended on `failed to splice the "mcp" entry into <file> (...). Refusing to overwrite.` with no step, after a `Runtime:` line for an entry it never wrote. It now refuses before that line: `yaw-mcp install: the "mcp" entry in <file> is <shape>, which install will not edit -- refusing to overwrite it; <fix>, then re-run.` `<shape>` and `<fix>` are the TOML reader's own, the pair doctor's CLIENTS line prints for the file -- for the inline container, `inside the inline table mcp_servers = { ... }` and `convert the inline mcp_servers = { ... } to [mcp_servers.mcp]-style tables by hand`.
79
+
80
+ **Fixed -- a `config.toml` that is not valid UTF-8 is refused, not written back with replacement characters, and `doctor` calls it malformed**
81
+
82
+ yaw-mcp decoded a client config as UTF-8 and turned each byte sequence that is not UTF-8 into U+FFFD. `install codex-cli` over a `config.toml` holding such bytes -- `model = "o3<FF><FE>"`, say -- wrote the U+FFFD characters back in their place and exited 0, changing a value that was not yaw-mcp's in a file Codex does not load: measured on Codex 0.144.0, `codex mcp list` over that file exits 1 with `Failed to read config file <path>: invalid utf-8 sequence of 1 bytes from index 11`. A TOML config that is not well-formed UTF-8 is now refused as malformed, with the 0-based byte offset of the first bad sequence, the index Codex reports: `yaw-mcp install: <file> is not valid TOML (invalid UTF-8 at byte offset 11, and a TOML file must be UTF-8 -- re-save the file as UTF-8) -- refusing to overwrite it; fix the TOML by hand, or move the file aside, then re-run.`, exit 1 and nothing written. `uninstall`, `try`, `try-cleanup`, `import` and `heal` read through the same code: `uninstall`, `try` and `import` refuse the file with the same detail, `try-cleanup` keeps the trial marker and names the offset in its reason, and `heal` lists the file under `could not be checked`.
83
+
84
+ `doctor` and `install --list` read the same bytes the same way. They decoded the file on their own and classified the U+FFFD text, which parses, so doctor reported such a file as ``present, no "mcp" entry -- run `yaw-mcp install codex-cli` `` -- a run that now refuses it -- or as `OK` when our entry was in it, and `heal`'s ``Run `yaw-mcp doctor` for what each one needs.`` led to a report that found nothing wrong. For that file doctor's CLIENTS line is now ``exists but TOML is malformed (invalid UTF-8 at byte offset 11, and a TOML file must be UTF-8 -- re-save the file as UTF-8) -- install refuses to overwrite it; fix the TOML by hand, or move the file aside, then run `yaw-mcp install codex-cli` ``, a warning like any malformed client config, so doctor exits 2, and `install --list` shows the row as `malformed`. `doctor --json` gains `malformedDetail` on every `clients[]` item: that detail on such a file, and null everywhere else -- a file that does not parse still gets no detail, and its line reads as it did.
85
+
86
+ A BOM, CRLF line endings and a real U+FFFD in the file read as before. JSON client configs are still decoded as they were.
87
+
88
+ **Fixed -- `try-cleanup` and doctor's expired-trial sweep take a Codex CLI trial out of `config.toml`, and `try-cleanup` no longer says `cleaned up` over an entry it left**
89
+
90
+ Both read the client config a trial was written into as JSON, whatever the client, so neither could remove a `yaw-mcp try <slug> --client codex-cli` trial. `try-cleanup` failed to parse `config.toml`, printed `warning -- couldn't strip ...`, deleted the trial marker anyway and ended `cleaned up` at exit 0, leaving the trial's entry -- with any `--env` value written inline in it -- wired into Codex and nothing on disk naming it, and `doctor` saying all was well. Doctor's sweep of an expired Codex trial failed the same way on every run, with ``trial "<slug>": expired but could not be removed from <file> (...) -- still wired in; run `yaw-mcp try-cleanup <slug>` or edit that file by hand`` and exit 2. Each now reads the file in the syntax the trial was written in. A trial marker records it in a new `format` field (`toml` for Codex CLI, `jsonc` for the JSON-family clients); a marker written before this release has none and is read as TOML when its file name ends in `.toml`, JSONC otherwise; and a marker naming a format this build cannot read is refused, as one from a newer schema is. An older yaw-mcp ignores the field, so it still cannot remove a Codex trial.
91
+
92
+ `try-cleanup` also stops when the entry cannot be taken out for any other reason -- a file that does not parse or cannot be read, an entry in a form yaw-mcp will not edit, a file that is not a table or an object -- instead of warning and carrying on. It prints `yaw-mcp try-cleanup: couldn't strip <entry> from <file> (<reason>) -- it may still be wired in, so the trial marker was kept.` and, indented under it, `Fix that file (or remove the <entry> entry from it by hand), then re-run: yaw-mcp try-cleanup <slug>`, keeps the marker, and exits 1, where it exited 0 -- what doctor's sweep already did with the same failure. A cleanup that succeeds prints what it did before.
93
+
94
+ **Changed -- `import` asks before it changes a server bundles.json already has, and off a terminal it needs `--force`**
95
+
96
+ An imported server that matches an entry already in `~/.yaw-mcp/bundles.json` is merged into it with the client's copy winning, and an imported entry carries no catalog slug, so nothing refused the merge: `import` named the entry in its plan (`REPLACES the "<namespace>" entry already in bundles.json:`, with the launch it replaced) and overwrote it without asking, off a terminal too. A changed launch command there is a different program run as you on the next activate. When the merge would change the stored entry, `import` now asks first, before anything is written:
97
+
98
+ ```
99
+ <bundles.json> already has an entry "fs" that differs from the one importing fs would write:
100
+ args: ["-y","@modelcontextprotocol/server-filesystem","D:/mydata"] -> ["-y","@modelcontextprotocol/server-filesystem","C:/tmp"]
101
+ [o]verwrite, [s]kip, or [a]bort? (default: skip)
102
+ ```
103
+
104
+ The diff lines are install's own for a differing `mcp` entry: `command` and `args` with their values, `env` by key only, anything else by field name. `[o]verwrite` prints `Overwriting the "fs" entry in bundles.json.` `[s]kip`, or a bare Enter, leaves the entry as it is and does not import that server -- `Left the "fs" entry in bundles.json as it is -- fs is not imported.` -- so its original stays in the client config, `--remove-originals` included. `[a]bort` exits 1 and Ctrl+C exits 130, each with nothing written, the servers that collide with nothing included. A run in which every server was skipped prints `Nothing imported: every server was skipped, so bundles.json and <file> are unchanged.` and exits 0. A stored entry the merge would leave as it is -- key order aside -- is not asked about.
105
+
106
+ Off a terminal, where it overwrote before, `import` now writes nothing and exits 2, the code `install` uses for the same refusal: `yaw-mcp import: <bundles.json> already has an entry this import would change, and there is no terminal to ask on. Nothing was written.`, then each entry's diff, then `Re-run with --force to overwrite it, or --dry-run to preview.` `--force` is the new flag that keeps the old non-interactive behaviour: it overwrites every entry the import would change without asking, and prints `Overwriting the "<namespace>" entry in bundles.json (--force):` with the diff. `--dry-run` asks nothing and prints `Would overwrite the "<namespace>" entry in bundles.json (a real run asks first, and off a terminal needs --force):` with the diff. `import --help` describes the question and the flag.
107
+
108
+ **Fixed -- `import --dry-run --remove-originals` lists the client entries a real run would remove**
109
+
110
+ The dry run said nothing about the originals, so the one step of an import that edits a file you did not name could not be previewed. With `--remove-originals` it now prints, before `--- dry run: nothing was written ---`, `Would remove 2 entries from <file> (--remove-originals):` and one indented line per key -- after `Reached through the yaw-mcp entry in <container>.` when yaw-mcp is reached through another scope's entry -- or the reason it would remove none: the real run's refusal, led by `Would not remove the originals: ` in place of `Not removing the originals: `; `yaw-mcp import: would not be removed from <file>: <key> (<why>). Remove that entry by hand; ...` for a key the real run would leave; `yaw-mcp import: would remove nothing from <file>; it would be left unchanged. The servers would be imported either way.`; or, when bundles.json does not parse and nothing would be imported, `yaw-mcp import: would remove nothing from <file> -- none of these servers would be imported, because their write to bundles.json could not be previewed (the warning above says why).` The preview runs the real run's own search for yaw-mcp's entry, its refusal and its splice over the same bytes, and the real run's removal prints what it did before. The preview assumes that every bundles.json entry the import would change is overwritten (the entry above); a real run in which one is skipped leaves that server's original where it is. A dry run without `--remove-originals` prints nothing new, and `import --help` says what `--dry-run` shows with it.
111
+
112
+ ## 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
113
+
114
+ 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.
115
+
116
+ **Fixed -- the missing-credential page's refusals say whether activating again opens a new page, an expired page says it expired, and several missing keys are worded in the plural**
117
+
118
+ 1.0.13 moved the missing-credential prompt onto the masked page (#170). Three things it did or said were wrong:
119
+
120
+ - An expired page returned the plain `Failed to load "<server>": ...` error, which says nothing about the page, and was booked as a failed activation, which is what `discover`'s failure warning and `dispatch`'s down-ranking read. It now fails with `Could not load "<server>": the page that takes the credential in a masked field expired with nothing submitted, so GITHUB_TOKEN is still missing.` and is not booked: the server's only problem is a value nobody got to type. While the server has an ask left, the message goes on `Activate "<server>" again for a new page, or set GITHUB_TOKEN in its "env" in the bundles.json that defines it (...) -- the edit is picked up on the next mcp_connect_* call, with no client restart.`; when the expired ask was its last, it says no further prompts are coming, as below. An expired page still does not end the asking.
121
+ - A page that could not start, or a browser that could not be opened for it, ends the asking for that server, yet its refusal said `Activate "<server>" again for a new page`, and every later activate repeated that without opening one. It now says `No further prompts for "<server>" this session: set GITHUB_TOKEN in its "env" in the bundles.json that defines it (...) and activate again -- the edit is picked up on the next mcp_connect_* call, with no client restart.`, the same line that ends the refusal for values the server did not accept once the asks are spent.
122
+ - With more than one key missing, these refusals say `credentials` and `are still missing` (1.0.13's two said `credential` and `is still missing`), and the page's intro says the server `reported its missing keys on its own`, not `their missing keys on their own`.
123
+
124
+ **Changed -- a credential typed at the prompt fills a gap in bundles.json instead of overriding it**
125
+
126
+ A value typed at the missing-credential prompt was merged over the server's `env` from bundles.json, so for the rest of the session it beat whatever the file said. The fix the prompt's refusals recommend -- set the key in bundles.json and activate again -- then did nothing until a client restart, and the reload that picks up a bundles.json edit saw no change to the server's launch either, so it left the server running on the typed value. A typed value now fills only a key the server's entry leaves unset or empty (a `"GITHUB_TOKEN": ""` placeholder counts as unset); a non-empty value in the file wins. A file value that differs from the typed one changes the server's launch config like any other `env` edit, so the reload unloads the running server (once no call is in flight on it) and the next activate starts it with the file's value. A key the entry already sets to a non-empty value is not asked for at all, since the answer would be ignored; when every key the server names is set there, the activation returns the plain `Failed to load` error. `mcp_connect_read_tool`'s one-off connect, which uses the typed values so that inspecting a schema does not trip the same missing-credential error, follows the same rule.
127
+
128
+ **Fixed -- a credential the server rejects is dropped instead of riding along on later launches**
129
+
130
+ When the retry a prompt bought fails with the server still naming the same keys missing, the activation says the values just provided were not accepted. The rejected values stayed in memory anyway, and went into every later launch of that server for the rest of the session until a new ask replaced them. They are now dropped at that point. A value the server did not name again -- one it accepted -- is kept.
131
+
132
+ **Fixed -- the missing-credential prompt recognises more of the ways a server says a key is missing, and a line no longer runs into the next**
133
+
134
+ The stderr patterns that bring up the prompt now also match:
135
+
136
+ - `environment variable` or `env var` between the name and the verb: `GITHUB_TOKEN environment variable is required`, `The GITHUB_TOKEN env var is not set`, `OPENAI_API_KEY environment variable must be set`.
137
+ - The plural: `Missing environment variables: OPENAI_API_KEY`, `Missing env vars: GITHUB_TOKEN`.
138
+ - A name in backticks or quotes: `` `GITHUB_TOKEN` is required ``, `Missing env var 'GITHUB_TOKEN'`, `"GITHUB_TOKEN" is not set`.
139
+ - `not set`, `unset` and `not provided` without `is`: `GITHUB_TOKEN not set`, `env var SLACK_BOT_TOKEN not set`. `is` is still required before `required`, `missing`, `empty` and `undefined`, where without it the word describes something else (`GITHUB_TOKEN required scopes` is not a match), and `is not defined` -- the JavaScript `ReferenceError` shape -- still is not a match either.
140
+ - `No GITHUB_TOKEN provided` and `No GITHUB_TOKEN set`.
141
+ - `Please set` with `the`, `environment variable` or `env var` in front of the name, in the plural, or with a colon: `Please set environment variable GITHUB_TOKEN`, `Please set the environment variable GITHUB_TOKEN`, `Please set the GITHUB_TOKEN environment variable`, `Please set env var: GITHUB_TOKEN`, `Please set environment variables: GITHUB_TOKEN`.
142
+
143
+ The gaps inside a pattern no longer cross a line break, except after a colon. The text searched is the stderr tail and the error message joined with newlines, so a line ending in `missing` (`sourcemap is missing`) could claim a credential-shaped name at the start of the next line (`OPENAI_API_KEY loaded from vault`) and put up a prompt for a key the server never asked for. `Missing:` with the name on the next line still matches, as a list. Only the first name of a comma-separated list is asked for (`Missing required environment variables: OPENAI_API_KEY, GITHUB_TOKEN` asks for `OPENAI_API_KEY`); a server that then names the second on the retry gets an ask for it while it has one left. A warning line such as `GITHUB_TOKEN not set, using unauthenticated` now matches too; the patterns are only read once a start has failed.
144
+
145
+ **Fixed -- a name ending in `_PATH`, `_FILE`, `_HOST` and the like is no longer taken for a credential**
146
+
147
+ The classifier that decides which environment variable names read as credentials counted a name as one when any segment of it did, so `SSH_KEY_PATH`, `TLS_KEY_FILE`, `AWS_SHARED_CREDENTIALS_FILE` and `TOKEN_BUCKET_SIZE` all counted. A name whose last underscore-separated segment is `PATH`, `FILE`, `DIR`, `HOST`, `PORT`, `PREFIX` or `SIZE` now does not: it names where a secret lives, or a property of something, rather than the secret. Two things read that classifier. The missing-credential prompt no longer opens a masked secret field for a file path. And the redaction of a failed start's stderr tail no longer treats an inherited environment variable with such a name as a secret: its value -- a path, say -- was replaced with `***NAME***` wherever it appeared in that output. Values yaw-mcp itself injected from bundles.json or the vault are still masked whatever their names. Names ending in `_URL`, `_URI` or `_ID` are unchanged -- a connection string can carry its password inline (`REDIS_PASSWORD_URL`), and `AWS_ACCESS_KEY_ID` is half of a credential pair -- and a name that ends in a credential segment, such as `PATH_TOKEN` or `HOST_KEY`, still counts.
148
+
149
+ **Fixed -- messages that say to edit bundles.json name the project-local file too**
150
+
151
+ A trusted project-local `.yaw-mcp/bundles.json` replaces the user-global file outright while it is in effect, with no merge, so an edit sent to `~/.yaw-mcp/bundles.json` can land in a file the session never reads. Several messages named only the global file: `discover`'s focused result for a disabled server or for a name no entry defines, `mcp_connect_read_tool`'s refusal of such a name, the refusal to load a disabled server, the missing-credential prompt and its refusals, and the pointer every activation and connect failure ends with -- including the raw error returned when a credential prompt is declined or its asks are spent, which read `-> Fix in ~/.yaw-mcp/bundles.json under "<server>", then activate it again ...` and now reads `-> Fix "<server>" in the bundles.json that defines it (...), then activate it again ...`. They now say "the bundles.json that defines it (~/.yaw-mcp/bundles.json, or a trusted project-local .yaw-mcp/bundles.json)", or "the bundles.json in effect (...)" for a name no entry defines -- the wording the no-servers-enabled message already used. The two messages about `yaw-mcp add` still name `~/.yaw-mcp/bundles.json` alone, because that is the file it writes.
152
+
153
+ **Fixed -- a URL-mode client is told when a masked-entry page stops on its own**
154
+
155
+ For a client that opens the masked-entry page from a URL-mode prompt, the broker sends `notifications/elicitation/complete` when the page is done, so the client can drop whatever waiting state it shows. It was sent when the page took a value or expired, and skipped when the page closed, on the reasoning that only shutdown closes a page. The page also closes when its listener fails after it has started listening, and that client was left waiting. The notification now goes out however the page ended, for the vault passphrase and the missing-credential page alike, and is skipped only once shutdown has begun.
156
+
157
+ **Fixed -- the Windows `taskkill` that stops a timed-out child no longer inherits yaw-mcp's own secrets**
158
+
159
+ yaw-mcp removes its own secrets (`YAW_MCP_VAULT_PASSPHRASE`, `YAW_MCP_VAULT_PASSPHRASE_NEW` and the retired `YAW_MCP_TOKEN`, in any letter case) from the environment of the processes it starts. Two did not get that: the `taskkill /T /F` that `yaw-mcp compliance` runs on Windows when the compliance suite times out or overruns its output limit, and the one that stops an `npm prefix -g` probe that has run past 3 seconds (the probe `yaw-mcp upgrade`, `doctor` and the background self-upgrade run to find npm's global prefix). Both inherited the whole environment; both now get the stripped one. A source scan in the test suite checks every spawn-family call in a file that imports `node:child_process` for the strip.
160
+
161
+ **Fixed -- `secrets rotate` says an entry is corrupt, not that the passphrase is wrong, when the vault has just verified the passphrase**
162
+
163
+ `rotate` decrypts every entry into memory before it re-encrypts anything, and aborts with the vault untouched if one fails. That failure read `rotate aborted: entry "X" failed to decrypt under the current passphrase` even on a vault whose check marker had just verified the passphrase, so it blamed the passphrase for a damaged entry -- and `secrets reset`, the way out of a wrong passphrase, refuses one that opens the vault. On a vault with a marker the message now says the passphrase is right and the entry is corrupt (or was written under a different passphrase than the rest of the vault), and to remove it with `yaw-mcp secrets remove X`, set it again, and re-run `rotate`. A vault with no marker, where nothing has verified the passphrase, keeps the old message.
164
+
165
+ **Fixed -- `doctor` and `secrets reset` no longer read a failed key derivation as a wrong passphrase**
166
+
167
+ `checkVaultPassphrase`, the check behind doctor's SECRET VAULT passphrase line and `secrets reset`'s refusal to reset a vault the passphrase already opens, answered "wrong" for any failure to unlock -- including a failure of the scrypt key derivation itself, which says nothing about the passphrase (in practice, a host that cannot allocate the working set). doctor then printed that the passphrase does NOT unlock the vault, with its pointer at `secrets reset`, and `reset` carried on as though the passphrase were wrong. The check now answers "wrong" only when nothing in the vault decrypts, or for an empty passphrase, and passes any other failure up. doctor prints the plain `passphrase: set in this environment` line for it (`vault.passphraseUnlocks` is `null` under `--json`), and `reset` refuses, exit 1, before anything is copied or written: ``could not check YAW_MCP_VAULT_PASSPHRASE against the vault at <path> (<cause>) -- nothing was changed.`` (`that passphrase` in place of the variable's name for one typed at the prompt; one `{"ok":false}` envelope under `--json`).
168
+
169
+ **Fixed -- two malformed vault files are refused as corrupt when they are loaded, like every other**
170
+
171
+ A vault whose recorded KDF parameters pair `r=1` with `N` of 2^16 or more passed the load check, although OpenSSL's scrypt refuses that pair outright (it requires `N < 2^(16r)`), and then failed at unlock with node's own `ERR_CRYPTO_INVALID_SCRYPT_PARAMS` error -- which the broker reported as a passphrase that does not unlock the vault. It is now refused at load as `vault at <path> is corrupt: invalid kdf parameters`, as every other bad pair is. And a vault whose `entries` is a JSON array is refused as `missing or invalid salt/entries`: `[]` used to load as an empty vault, and `["x"]` failed naming a corrupt entry `0` that is not there. This build writes neither shape.
172
+
173
+ **Changed -- the two messages about a damaged verification marker say what is true**
174
+
175
+ The error for a vault whose `check` marker is damaged, which every command that unlocks the vault gives, now ends `the check marker does not verify` rather than `does not decrypt`: it is also raised when the marker decrypts to the wrong text. And the warning for a marker too malformed to use, which is then ignored, now says the next `yaw-mcp secrets set` re-stamps it rather than "the next write" -- a `remove` leaves the vault without one.
176
+
177
+ **Fixed -- `yaw-mcp secrets --json` keeps stderr to one JSON object per line in the three places it did not**
178
+
179
+ `secrets --help` promises that under `--json` stderr carries one JSON object per line. Three things broke that:
180
+
181
+ - An argument error printed prose followed by the whole usage text (`yaw-mcp secrets: unknown flag "--bogus"` and so on). With `--json` anywhere in argv it is now the one line `{"ok":false,"error":"unknown flag \"--bogus\""}`, still exit 2. `--help` still prints the usage.
182
+ - `get`'s warning that it is printing a value in cleartext to a terminal was prose. It is `{"warning":"cleartext-on-tty","name":...}` now.
183
+ - A malformed check marker was reported by the vault loader's own `yaw-mcp: warning: ...` log line, on a command that then succeeded, and a vault file that is not JSON or cannot be read put the same kind of line ahead of the `{"ok":false}` envelope. `list`, `get`, `set`, `remove`, `rotate` and `reset` now print the marker warning themselves: `{"warning":"check-malformed","path":...,"message":...}` under `--json`, `yaw-mcp secrets: warning -- <path>: <message>.` otherwise. Where a vault that is not JSON or cannot be read is refused, the refusal is now the only line, with or without `--json`. For a file that cannot be read, that line now names it: `list` and `get` print `could not read the vault file at <path> (<errno>) -- fix that and re-run.`, the sentence `set`, `remove`, `rotate` and `reset` already used, where before they printed Node's bare errno message, which for `EISDIR` or `EIO` names no file.
184
+
185
+ The help text lists the new warning kinds and says argument errors are covered.
186
+
187
+ **Changed -- `secrets list --json` and `secrets audit --json` print their result on one line**
188
+
189
+ Both pretty-printed their stdout envelope over several lines, where every other `secrets --json` envelope is one compact line; the help text now promises one line for all of them. A consumer that parses the whole of stdout as JSON is unaffected; one that read the multi-line layout line by line will see the change.
190
+
191
+ **Changed -- a `yaw-mcp secrets` refusal in prose names its action once the action is known**
192
+
193
+ A refusal was labelled `yaw-mcp secrets:` or `yaw-mcp secrets <action>:` depending on which check caught it -- the empty-value refusal read `yaw-mcp secrets set: Secret value cannot be empty.` from the argument parser and `yaw-mcp secrets: Secret value cannot be empty.` from the command. Every prose refusal made once the action is known now reads `yaw-mcp secrets <action>: ...`; one made before it -- an unknown or missing action, or a bad flag ahead of the action, as in `yaw-mcp secrets --bogus set X` -- still reads `yaw-mcp secrets: ...`. The ones that change: the argument errors caught after the action (`unknown flag`, `--value requires a value`, `--secret requires a value` / `--server requires a value` and `unexpected positional argument`, so `secrets set X --bogus` now reads `yaw-mcp secrets set: unknown flag "--bogus"`); `No secret named ...` (`get`, `remove`); `Passphrase required ...` and the unlock errors (wrong passphrase, damaged marker) for `get`, `set` and `remove`; `get`'s decrypt failure; the empty-value refusal (`set`); and `Cancelled.` on every action that prompts. The `--json` envelopes are unchanged.
194
+
195
+ **Fixed -- `secrets set`'s value prompt asks again on an empty entry, and keeps a pasted Tab**
196
+
197
+ At a terminal, `set` asks for the value only after it has the passphrase (typed, or from `YAW_MCP_VAULT_PASSPHRASE`) and has derived the key. An empty value -- a bare Enter, or ^D -- refused the whole command at once, and a re-run paid for the passphrase and the derivation again. The value prompt now asks again, as the passphrase prompts do, writing `Secret value cannot be empty.` after each empty entry; after three it refuses as before (`yaw-mcp secrets set: Secret value cannot be empty.`, exit 1, nothing written). ^C still cancels, with exit 130. The prompt also dropped a Tab along with the other control characters, so a pasted token containing one was stored without it, behind a `Stored secret` line and with nothing on the no-echo line to show it. A Tab is now kept at the value prompt, as a piped value always kept it. The passphrase prompts still drop it: a vault created by typing a Tab there is keyed under the string without it, and the same keystrokes have to keep opening it.
198
+
199
+ `secrets --help` now describes `set` as it behaves: at a terminal it prompts; a piped stdin is read whole, minus one trailing newline, with no flag; and `--stdin` reads stdin even when it is a terminal (raw, multi-line, until EOF, and the terminal echoes it). For scripting it points at piping the value in, not at `--stdin`.
200
+
5
201
  ## 1.0.13 -- Codex CLI works again: `install codex-cli` under smol-toml 1.9.0, and Codex can call the tools it loads
6
202
 
7
- Published 2026-09-24, the day after 1.0.12. Five entries below, all measured against real Codex 0.144.0 and 0.156.1. `mcp_connect_exec` reaches a cached tool from the first call of a session. On a fresh install, `find_tool` and `exec` wait for the startup pre-warm. Codex, which never re-lists tools, is told to call loaded tools through `mcp_connect_exec` (#172). The TOML codec accepts smol-toml 1.9.0's null-prototype tables, which had broken `install codex-cli`, `doctor`, `install --list` and `heal` for every Codex config. It also refuses a doubled BOM the way Codex does, and pins the parser to 1.9 patch releases (#171).
203
+ Published 2026-09-24, the day after 1.0.12. Six entries below. The first three were reproduced against real Codex 0.144.0 and 0.156.1, and the doubled-BOM refusal was measured against Codex 0.144.0. `mcp_connect_exec` reaches a cached tool from the first call of a session. On a fresh install, `find_tool` and `exec` wait for the startup pre-warm. Codex, which never re-lists tools, is told to call loaded tools through `mcp_connect_exec` (#172). The TOML codec accepts smol-toml 1.9.0's null-prototype tables, which had broken `install codex-cli`, `doctor`, `install --list` and `heal` for every Codex config. It also refuses a doubled BOM the way Codex does, and pins the parser to 1.9 patch releases (#171). The sixth is the entry this release shipped without, written after it was published: a child server's missing credential is typed into a masked field on the loopback page the vault prompt uses, not into a visible form field (#170).
8
204
 
9
205
  **Fixed -- `mcp_connect_exec` reaches a cached tool from the first call of a session**
10
206
 
11
- `start()` hydrated the persisted tool cache but never built the routing table from it. The later rebuilds all wait on an activation, a config change, auto-load, or a pre-warm that learns something new, so on a machine whose servers were all already cached the table stayed empty. exec looks its steps up there, so the documented "a cached-but-unloaded server is loaded on first use" answered `Unknown tool: <name>. Use mcp_connect_discover ...` instead, until an unrelated activation rebuilt it. The table is now built once `start()` has the config, the cache and the grades. exec is the only way a client that never re-lists tools reaches an upstream tool, and typed's lite `find_tool` -> `exec` flow hit the same wall.
207
+ `start()` hydrated the persisted tool cache but never built the routing table from it. The later rebuilds all wait on an activation, a config change, auto-load, or a pre-warm that learns something new, so on a machine whose servers were all already cached the table stayed empty. exec looks its steps up there, so the documented "a cached-but-unloaded server is loaded on first use" answered `Unknown tool: <name>. Use mcp_connect_discover ...` instead, until an unrelated activation rebuilt it. The same empty table made a direct `tools/call` on a cached tool that `tools/list` advertises under `YAW_MCP_TOOL_EXPOSURE=full` answer `Unknown tool` as well, and with `YAW_MCP_PREWARM=0` the table stayed empty whatever was cached, since the pre-warm returned before rebuilding anything. The table is now built once `start()` has the config, the cache and the grades. exec is the only way a client that never re-lists tools reaches an upstream tool, and typed's lite `find_tool` -> `exec` flow hit the same wall.
12
208
 
13
209
  **Fixed -- on a fresh install, `find_tool` and `exec` wait for the startup pre-warm instead of answering "nothing"**
14
210
 
@@ -28,6 +224,23 @@ The dependency range was `^1.8.0`, so every install resolved after 2026-09-22 go
28
224
 
29
225
  smol-toml 1.9.0 also strips one leading BOM itself. This codec already strips one before parsing, so a file opening with two BOMs -- which an editor or a PowerShell 5.1 re-encode can leave -- began to parse, while Codex 0.144.0 refuses it (`failed to load configuration`). `doctor` and `install --list` called that file healthy, and `install` wrote into a config Codex will not load. The parse now refuses a second BOM with `a second byte-order mark (U+FEFF) opens the file; Codex refuses it -- delete it`. One BOM, which Notepad writes by default, reads as before.
30
226
 
227
+ **Fixed -- a child server's missing credential is typed into a masked field, not a visible form field**
228
+
229
+ When a local server fails to start and its stderr names a credential it needs (`GITHUB_TOKEN is required` and the like), the broker asks for the value in-session and retries. It asked with a form-mode MCP elicitation carrying one string field per missing key, and a client renders that as an ordinary visible text input: an API token sat on screen, in plain text, while it was typed. The MCP specification (2025-11-25) says servers must not use form mode for passwords or tokens. The 1.0.11 entry for the vault passphrase prompt named moving this prompt onto the same page as a follow-up; this is that follow-up (#170, closing #168).
230
+
231
+ The value is now typed on the one-shot page the vault prompt uses, served on `127.0.0.1`: one masked field per missing key, labelled with the key's name, with the same hardening and the same 3-minute expiry. The page takes one submission. A POST with a field missing or empty is answered 400 `Every field is required.` and the page stays open, so every value arrives non-empty. A client that declares URL-mode elicitation gets a URL-mode prompt for the page, and is sent `notifications/elicitation/complete` when the page takes a value or expires. A client with form mode only gets a form with no fields, as a yes/no consent, and on yes the broker opens the page in the default browser. A client that declares no elicitation is not asked, as before. The prompt and the page both name the server and the missing keys, and both say to set them in the server's `env` in `~/.yaw-mcp/bundles.json` to skip the prompt in future sessions. While the page waits, a client that asked for progress is told every 5 seconds how long the page has left, as with the vault prompt. Shutdown while the prompt is up refuses the activation with the usual `yaw-mcp is shutting down` message.
232
+
233
+ What is typed goes into that one server's env, merged over its `env` from bundles.json, for the retry and for every later launch of that server this session. It is held in memory only: never written to disk, never put in the vault passphrase's slot, and never passed to another server. The retry, and the message when the server still names the same keys missing after it, are unchanged.
234
+
235
+ Each server still gets at most two asks per session, and an ask is counted before anything is shown, however it ends. New in this release is a latch, set by how an ask ended, that stops the asking for that server before the budget runs out:
236
+
237
+ - A decline (or a cancel) is a decision: no further ask for that server this session. This activate and every later one return the plain `Failed to load "<server>": ...` error.
238
+ - A page that cannot start, or a browser that cannot be opened for it on a form-only client, is a wall a second ask would hit identically, and latches the same way. The activation fails with `Could not load "<server>": yaw-mcp could not start the local page that takes the credential in a masked field, so GITHUB_TOKEN is still missing.` -- or `yaw-mcp could not open a browser on this machine for the page that takes the credential in a masked field` -- followed by `Activate "<server>" again for a new page, or set GITHUB_TOKEN in its "env" in ~/.yaw-mcp/bundles.json to skip the prompt in future sessions.` Every later activate returns the same message, and opens no page.
239
+ - An expired page does not latch: the user may simply have been away. The activation returns the plain `Failed to load "<server>": ...` error, and the next activate opens a new page while the server has an ask left.
240
+ - An elicitation request that errors or times out, or a page whose listener fails after it has started listening, does not latch either: the ask is spent and the activation returns the plain error.
241
+
242
+ The plain error is booked as a failed activation, which `discover`'s failure warning and `dispatch`'s down-ranking read; the two wall refusals are not.
243
+
31
244
  ## 1.0.12 -- `yaw-mcp secrets reset` is the way out of a forgotten vault passphrase, and `doctor` says whether the passphrase it sees unlocks the vault
32
245
 
33
246
  Published 2026-09-23, two days after 1.0.11. Three entries below: the new `secrets reset` verb (#167), which moves the vault aside, lists its entry names and starts a new one under a new passphrase, and refuses when the passphrase it is given already opens the vault; the SECRET VAULT passphrase line in `doctor` gains its unlocks / does-not-unlock / marker-corrupt states; and under `--json` the two stderr warnings that were still prose become JSON lines.
package/README.md CHANGED
@@ -63,13 +63,15 @@ This edits the chosen client's config (correct path + JSON shape for your OS) to
63
63
 
64
64
  `install typed` writes typed's own `~/.config/typed/mcp.json` (the same path on every OS, whatever `CLAUDE_CONFIG_DIR` says), which typed ranks above the user-scope files it shares with Claude Code -- so it wins over an `mcp` entry Yaw Terminal manages in `~/.claude.json`, while a project's `.mcp.json` still wins over it. On a Yaw Terminal machine that is a trade when install writes an `npx` entry (no oam, or no global install to point it at): the entry replaces Yaw Terminal's local launch for typed, and npx resolves `@latest` on every typed start, which is slow and can exceed typed's MCP connect timeout. Install says so when it happens; `npm i -g @yawlabs/mcp` with oam installed, then a re-run, writes a fast absolute-path entry instead, or raise `MCP_TIMEOUT`. **It needs a typed CLI newer than 1.5.0** -- typed 1.5.0 and older do not read `~/.config/typed/mcp.json` at all; with one of those, use `install claude-code`, whose files typed also reads. `install typed` checks the typed CLI bundle on this machine (`~/.config/typed/typed-cli/cli.mjs`, or `$TYPED_CLI_BUNDLE`) and warns when it cannot read the file yet, naming `typed update`, which installs the newest typed release. Like `install claude-code`, it adds `mcp__mcp__*` to `permissions.allow` in Claude Code's user `settings.json`, which typed reads for permissions too -- `$CLAUDE_CONFIG_DIR/settings.json` when that is set, so outside a Yaw Mode pane the grant is scoped to that config dir while typed's `mcp.json` is not, and install says so. The two clients share that one grant, so `uninstall` of either keeps it while the other still has its entry (or typed still loads an `mcp` entry from another file it reads), and says so. In a Yaw Mode pane, where `CLAUDE_CONFIG_DIR` is a per-pane overlay (a `yaw-mode-*` directory) whose `settings.json` is discarded with the pane, install and uninstall of either client at user scope add and remove the grant in `~/.claude/settings.json` too (augment). In a fresh pane, which keeps nothing of its overlay, install says what goes with the pane -- the grant at user scope, and for `install claude-code` its entry in the overlay's `.claude.json` as well (at local scope, that entry alone) -- and to install from a normal shell to keep it.
65
65
 
66
+ `install codex-cli` writes an `[mcp_servers.mcp]` table into Codex's `config.toml` (`$CODEX_HOME/config.toml`, else `~/.codex/config.toml`; the project's `.codex/config.toml` at `--scope project`) and, when the file does not set it, adds `mcp_optional_startup_grace_ms = 0` on one line above the first table: without it, Codex 0.151 and later give optional MCP servers one shared second to start and leave a slower yaw-mcp's tools out of the whole session. The key is add-only -- a value you set yourself is left alone, and install says so -- and `--dry-run` shows the line before anything is written. A re-run over an entry that is already correct adds it to a file set up before install did; `install --list` marks such a row `installed (setting missing)`, and `doctor` names the run. `uninstall codex-cli` leaves the key in place.
67
+
66
68
  Claude Desktop on Linux is not supported yet. Anthropic ships a Linux beta but has not documented where it reads `claude_desktop_config.json`, so `install claude-desktop` refuses on Linux rather than write a guessed path, and `--all` skips it. Add the entry by hand, or use another client.
67
69
 
68
70
  Useful flags:
69
71
 
70
72
  - `--scope user|project|local` -- which file to write. Claude Code supports user, project and local; Cursor, VS Code, Gemini CLI, Zed, Continue and Codex CLI support user and project; Claude Desktop, Windsurf, Cline and typed are user-only.
71
73
  - `--dry-run` -- print what would be added (never the rest of the file) and exit without writing.
72
- - `--repair` / `--force` / `--skip` -- what to do about an existing `mcp` entry that differs from the one install writes. `--repair` brings it up to date and keeps the string values in its `env` block (where the [secret vault](#local-secret-vault) has you put `YAW_MCP_VAULT_PASSPHRASE`), and is a no-op on an entry that already matches. `--force` overwrites it outright, `env` included, naming each key it drops. `--skip` leaves it untouched. Without one of them install prompts on a TTY; off a TTY it shows what differs and refuses with exit 2 (a real failure, such as a malformed config, exits 1). Under `--all` the run exits 2 when every client that did not succeed was refused this way, and 1 if any one failed.
74
+ - `--repair` / `--force` / `--skip` -- what to do about an existing `mcp` entry that differs from the one install writes. `--repair` brings it up to date and keeps the string values in its `env` block (where the [secret vault](#local-secret-vault) has you put `YAW_MCP_VAULT_PASSPHRASE`); on an entry that already matches it does what a plain re-run does -- nothing, unless the file lacks a top-level setting install adds (Codex CLI's startup grace, above), which it writes. `--force` overwrites it outright, `env` included, naming each key it drops. `--skip` leaves it, and the rest of the file, untouched. Without one of them install prompts on a TTY; off a TTY it shows what differs and refuses with exit 2 (a real failure, such as a malformed config, exits 1). Under `--all` the run exits 2 when every client that did not succeed was refused this way, and 1 if any one failed.
73
75
 
74
76
  After it writes, install reports two things it did **not** change. First, how many servers `~/.yaw-mcp/bundles.json` gives yaw-mcp to serve -- and when that is none, the `yaw-mcp add <slug>` step still to take -- though no longer *before* a restart, since yaw-mcp re-reads that file while the session runs and picks up a server added afterwards on the next `mcp_connect_*` call. Second, how many other MCP servers were already configured in the client file it just edited; those keep launching directly from the client, and installing yaw-mcp does not move them behind the broker. The count is a number, never the server names. Under `--all` the bundles.json line prints once for the run, while the per-client count prints under each client.
75
77
 
@@ -187,9 +189,9 @@ yaw-mcp try-cleanup <slug> # remove a trial early (doct
187
189
  yaw-mcp trust [--yes|--list|--revoke [<path>]] # approve the project-local .yaw-mcp/bundles.json found from cwd so yaw-mcp loads it (pinned to its exact contents)
188
190
  ```
189
191
 
190
- `add` is not `install`: `install <client>` connects an AI client to yaw-mcp; `add <slug>` adds an MCP server to yaw-mcp itself. `try` points the client directly at the upstream server, bypassing yaw-mcp, so you can evaluate it in isolation. A `--env` value lands in your shell history and process argv like any argument. With `add` it is stored in plain text in `bundles.json` (written owner-only, mode `0600`, on macOS and Linux; on Windows that mode is not applied -- Node maps it to the read-only attribute only -- so the file is protected by the NTFS permissions it inherits from your user profile) -- keep real credentials in the [local secret vault](#local-secret-vault) and pass `--env KEY='${secret:NAME}'` instead (the single quotes are for bash, zsh and PowerShell; in cmd.exe pass it unquoted, since `$` is not special there and cmd.exe would keep the quotes as part of the value). A `missing` row in `yaw-mcp secrets audit` whose name starts with `<malformed ref>` is a reference that did not parse -- fix the typo in `bundles.json`. With `try` the value is written inline, in plain text, into the client's own config for the trial's lifetime, and is not vault-resolved (the client spawns the server, not yaw-mcp).
192
+ `add` is not `install`: `install <client>` connects an AI client to yaw-mcp; `add <slug>` adds an MCP server to yaw-mcp itself. `try` points the client directly at the upstream server, bypassing yaw-mcp, so you can evaluate it in isolation. `try-cleanup`, and `doctor` for an expired trial, take the entry back out of the client's config, Codex CLI's `config.toml` included; when `try-cleanup` cannot, it keeps the trial and exits 1 rather than report a cleanup that did not happen. A `--env` value lands in your shell history and process argv like any argument. With `add` it is stored in plain text in `bundles.json` (written owner-only, mode `0600`, on macOS and Linux; on Windows that mode is not applied -- Node maps it to the read-only attribute only -- so the file is protected by the NTFS permissions it inherits from your user profile) -- keep real credentials in the [local secret vault](#local-secret-vault) and pass `--env KEY='${secret:NAME}'` instead (the single quotes are for bash, zsh and PowerShell; in cmd.exe pass it unquoted, since `$` is not special there and cmd.exe would keep the quotes as part of the value). A `missing` row in `yaw-mcp secrets audit` whose name starts with `<malformed ref>` is a reference that did not parse -- fix the typo in `bundles.json`. With `try` the value is written inline, in plain text, into the client's own config for the trial's lifetime, and is not vault-resolved (the client spawns the server, not yaw-mcp).
191
193
 
192
- **Servers you already have.** If a client is already configured with MCP servers, `yaw-mcp import <client>` reads that client's own config and adds every server in it to your `bundles.json` -- command, args, url, headers and env as they stand, so the imported server starts exactly as it did before. yaw-mcp's own entry is never imported. `--dry-run` shows what would come across without writing anything.
194
+ **Servers you already have.** If a client is already configured with MCP servers, `yaw-mcp import <client>` reads that client's own config and adds every server in it to your `bundles.json` -- command, args, url, headers and env as they stand, so the imported server starts exactly as it did before. yaw-mcp's own entry is never imported. A server `bundles.json` already has is merged, the client's copy winning; when that would change the stored entry, `import` shows what differs and asks first on a terminal (`[o]verwrite`, `[s]kip` or `[a]bort`, and a bare Enter skips that server), and off one it writes nothing and exits 2 unless you pass `--force`. `--dry-run` shows what would come across without writing anything, and with `--remove-originals` it also lists the client entries a real run would remove, or says why it would remove none.
193
195
 
194
196
  After an import the client is *still* launching those servers itself, so each one would run twice -- once directly, once through yaw-mcp. `import` says so and offers to remove the originals from the client config: on a terminal it asks (a bare Enter is no), and off one it leaves them alone and names the `--remove-originals` flag. It refuses to remove them at all if the client has no yaw-mcp entry, since that entry is the only way it would still reach them -- run `yaw-mcp install <client>` first.
195
197
 
@@ -238,7 +240,7 @@ yaw-mcp compliance <target> # run the 88-test compliance suite against a serve
238
240
  yaw-mcp audit <namespace> # audit a stdio server from bundles.json, cache its A-F grade in grades.json
239
241
  ```
240
242
 
241
- `heal` exists for the entry that pins a path (see [Running yaw-mcp on oam](#running-yaw-mcp-on-oam)): an app upgrade that deletes the directory the path named leaves the client unable to start the broker, and the client cannot report that because it cannot start the thing that would. The broker runs the same sweep at every startup, cross-client, so a client whose entry still works repairs the ones that do not; `heal` is for the machine whose only configured client is the broken one. It touches only an entry yaw-mcp wrote that is currently broken -- a working entry is never rewritten, however unusual it looks -- and prints each old and new path. `--dry-run` reports without writing; `--quiet` keeps the exit code and `--json` and drops the transcript. `YAW_MCP_AUTO_HEAL=0` turns the startup sweep off; `YAW_MCP_READONLY_DIAGNOSTICS=1` turns both off.
243
+ `heal` exists for the entry that pins a path (see [Running yaw-mcp on oam](#running-yaw-mcp-on-oam)): an app upgrade that deletes the directory the path named leaves the client unable to start the broker, and the client cannot report that because it cannot start the thing that would. The broker runs the same sweep at every startup, cross-client, so a client whose entry still works repairs the ones that do not; `heal` is for the machine whose only configured client is the broken one. It touches only an entry yaw-mcp wrote that is currently broken -- a working entry is never rewritten, however unusual it looks -- and prints each old and new path. A stale entry it finds and cannot re-point -- a read-only config file on Windows, say -- is reported on stderr with the step past it, listed under `failed` in `--json`, and makes the run exit 1. `--dry-run` reports without writing; `--quiet` keeps the exit code and `--json` and drops the transcript. `YAW_MCP_AUTO_HEAL=0` turns the startup sweep off; `YAW_MCP_READONLY_DIAGNOSTICS=1` turns both off.
242
244
 
243
245
  To install completion, redirect to your shell's completions dir, e.g. `yaw-mcp completion zsh > "${fpath[1]}/_yaw-mcp"`, or `yaw-mcp completion powershell >> $PROFILE`.
244
246
 
@@ -357,13 +359,13 @@ Headers are resolved through the same fail-closed path: a missing or malformed r
357
359
 
358
360
  1. **`YAW_MCP_VAULT_PASSPHRASE` in yaw-mcp's own env** -- the `env` block of the *yaw-mcp* entry in your MCP client config, not the upstream server's (yaw-mcp strips its own secrets from the env of every child it starts: every server it spawns, the npm runs behind its self-upgrade and the daily sidecar refresh, and the compliance suite). This is the only option for a spawn, which happens over stdio with no terminal to prompt on.
359
361
  2. **An in-session prompt for the vault.** If your client supports MCP [elicitation](https://modelcontextprotocol.io/specification/server/elicitation), a locked vault asks for the passphrase and retries the server. The passphrase is never typed into your client's dialog: it goes into a masked field on a one-shot page yaw-mcp serves on `127.0.0.1`. A client with URL-mode elicitation opens that page from its own prompt. A client with form mode only (Claude Code, for one) asks whether to open it, and on yes yaw-mcp opens it in your default browser; with no browser to open (no graphical session), the call fails and names the env var instead. The page takes one submission and expires after 3 minutes. A mistyped passphrase gets one more try per session; a decline stops the asking. It's held in memory for that session only -- never written to disk, and never handed to the server being started.
360
- 3. **An in-session prompt for a child's own missing credential.** The same masked page (and the same URL / form mode rules above) is used when a child server's stderr names a key yaw-mcp does not have: a `GITHUB_TOKEN is required` line, an `AWS_ACCESS_KEY_ID is required` line, and the like. One masked field per missing key, the same URL-mode completion notification, the same page hardening (no CORS, no script, `Cache-Control: no-store`, 256-bit random token, Host header check, 3-minute TTL). The value lands in the child's env for the session -- not the vault slot, and not any other server. A decline ends the asking for the session; a no-page or no-browser is a wall that latches the same way; an expired page keeps the budget since the user may simply have been away.
362
+ 3. **An in-session prompt for a child's own missing credential.** The same masked page (and the same URL / form mode rules above) is used when a child server's stderr names a key yaw-mcp does not have: a `GITHUB_TOKEN is required` line, an `AWS_ACCESS_KEY_ID is required` line, and the like. One masked field per missing key, the same URL-mode completion notification, the same page hardening (no CORS, no script, `Cache-Control: no-store`, 256-bit random token, Host header check, 3-minute TTL). The value lands in the child's env for the session -- not the vault slot, and not any other server -- and only for a key the server's `bundles.json` entry leaves unset or empty: a non-empty value there wins, and that key is never asked for. A value the child still reports missing on the retry is dropped. Each server gets two asks per session. A decline ends the asking for the session; a no-page or no-browser is a wall that latches the same way; an expired page spends its ask but does not latch, since the user may simply have been away.
361
363
  4. **The CLI prompt**, for `yaw-mcp secrets` runs: no-echo on a real TTY. If the terminal will not switch echo off, the prompt refuses rather than show what you type. Note that Git Bash/MSYS can't offer one (Node sees pipes, not a TTY) -- use PowerShell, `winpty`, or the env var there.
362
364
 
363
365
  `yaw-mcp doctor` has a **SECRET VAULT** section showing what's stored, which servers reference it, and whether the passphrase it can see is set and unlocks the vault -- start there when a server won't load. It reports names and a yes/no, never a value.
364
366
 
365
367
  ```bash
366
- yaw-mcp secrets set <name> # store a value (no-echo prompt, or --value/--stdin)
368
+ yaw-mcp secrets set <name> # store a value (no-echo prompt, piped stdin, or --value)
367
369
  yaw-mcp secrets get <name> # decrypt and print one value
368
370
  yaw-mcp secrets list # show entry NAMES only (values stay encrypted)
369
371
  yaw-mcp secrets remove <name> # delete an entry
@@ -392,7 +394,7 @@ MCP servers are third-party code you choose to run. yaw-mcp doesn't sandbox them
392
394
  - **Compliance grades (A-F)** -- the `@yawlabs/mcp-compliance` suite (88 tests) grades a server; `yaw-mcp list` shows it in a `GRADE` column and `discover` shows it inline (`github [ready] [A]`). `YAW_MCP_MIN_COMPLIANCE=B` makes `activate` refuse anything below the floor. Ungraded servers pass (don't punish unknown); audit them yourself with `yaw-mcp compliance <target>`.
393
395
  - **Source transparency** -- `list` and `discover` show the exact `command`, `args`, and `url` each server launches with. Nothing is wrapped.
394
396
  - **Local credentials** -- vault values are encrypted at rest (scrypt + AES-256-GCM), injected at spawn, and never logged. Nothing is transmitted off the machine.
395
- - **Failure output reaches your client** -- when a server fails to start, the tail of its stderr is attached to the activation error, so it lands in your client's context (and your model's) as well as the log. That tail is the server's own output -- never your files, buffers or shell history -- and it is redacted first: values yaw-mcp injected from `bundles.json` or the vault, resolved request headers, and credential-named variables inherited from your shell (`GITHUB_TOKEN`, `AWS_SECRET_ACCESS_KEY`, `NPM_TOKEN`, ...) are each replaced with `***NAME***`, which names the credential to rotate without showing it. Redaction is exact-substring on values of 8 characters or more, so a credential parked under a name that does not read as one is not covered. There is no opt-out: the tail is what makes a failed start diagnosable, and the missing-credential prompt below reads the same text.
397
+ - **Failure output reaches your client** -- when a server fails to start, the tail of its stderr is attached to the activation error, so it lands in your client's context (and your model's) as well as the log. That tail is the server's own output -- never your files, buffers or shell history -- and it is redacted first: values yaw-mcp injected from `bundles.json` or the vault, resolved request headers, and credential-named variables inherited from your shell (`GITHUB_TOKEN`, `AWS_SECRET_ACCESS_KEY`, `NPM_TOKEN`, ...) are each replaced with `***NAME***`, which names the credential to rotate without showing it. An inherited name whose last segment is `PATH`, `FILE`, `DIR`, `HOST`, `PORT`, `PREFIX` or `SIZE` (`SSH_KEY_PATH`, `TOKEN_BUCKET_SIZE`) does not count as credential-named. Redaction is exact-substring on values of 8 characters or more, so a credential parked under a name that does not read as one is not covered. There is no opt-out: the tail is what makes a failed start diagnosable, and the missing-credential prompt below reads the same text.
396
398
  - **Response pruning** (`YAW_MCP_PRUNE_RESPONSES`, on by default) -- trims token cost by dropping no-information keys (null / empty array / empty object) and trimming trailing whitespace and long blank runs in text results. The text rules classify the block before editing it, so a unified diff comes back byte-faithful, fenced code blocks are left alone, and Markdown hard line breaks survive. Structured values are never altered or redacted; it is a token-savings feature, not a security control.
397
399
  - **Namespace isolation** -- tools are namespace-prefixed (`gh_create_issue`, never bare `create_issue`), so a server can't impersonate another's tools. `mcp_connect_read_tool` inspects a schema before any code runs.
398
400
 
@@ -9,7 +9,7 @@ import {
9
9
  readCheckMemo,
10
10
  recordAttemptAt,
11
11
  writeCheckMemo
12
- } from "./chunk-JSNVFUDY.js";
12
+ } from "./chunk-IHHY6MVU.js";
13
13
  export {
14
14
  acquireUpgradeLock,
15
15
  attemptedRecentlyAt,