@yawlabs/mcp 1.0.15 → 1.0.17
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 +119 -2
- package/README.md +6 -4
- package/dist/{auto-upgrade-ECOUS4F4.js → auto-upgrade-MT4LORBC.js} +1 -1
- package/dist/{chunk-RCDMJJCW.js → chunk-Z66T6Z6Z.js} +374 -32
- package/dist/index.js +941 -244
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,126 @@
|
|
|
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
|
-
##
|
|
5
|
+
## Unreleased
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Fixed -- `release.sh` no longer dies at step 5 waiting on npm's five-minute CDN cache, so a release finishes in one run**
|
|
8
|
+
|
|
9
|
+
Recent releases, 1.0.16 included, ended with `npm does not show @yawlabs/mcp@<version> after 60s -- refusing to publish to MCP registry (it would 400)` and needed a second `./release.sh <version>` to publish `server.json`. The wait was on the wrong document. `npm view "@yawlabs/mcp@<version>"` fetches the package's whole packument, which registry.npmjs.org serves from Cloudflare's edge under `Cache-Control: public, max-age=300` -- measured 2026-09-28: `CF-Cache-Status: HIT` with `Age: 105`, and still `HIT` with `Cache-Control: no-cache` on the request (request headers cannot opt out; a fresh query string can, but `npm view` sends none, and the packument is the wrong document anyway) -- so for up to five minutes after `npm publish` returns it can keep answering from a copy that predates the publish. Ten reads six seconds apart could not outlast that, and a single read also measured about 20 s on this workstation, so the "60s" in the message was really several minutes spent on the wrong document. The MCP registry's validator never reads it: it fetches npm's per-version document, `GET /@yawlabs%2Fmcp/<version>` (registry v1.7.9, `internal/validators/registries/npm.go`), which Cloudflare serves `DYNAMIC`, never from the edge cache.
|
|
10
|
+
|
|
11
|
+
Every "is this version on npm?" read in the script -- the pre-flight already-published probe, the tag-drift guard, step 4's skip and its ARM64 tolerance, step 5's wait and the final verification -- now reads that per-version document through one cache-busted `curl` (`npm_version_manifest`): the same URL the registry will fetch, so a hit is the strongest local evidence that the publish will be accepted, and no read goes through `npm view` or its 20 s. Step 5 waits on a clock rather than a read count: `NPM_PROPAGATION_TIMEOUT` seconds (default 180) of reads every 5 s, a progress line every 30 s, and a failure that names the document, the time spent and the re-run. The variable is checked in the pre-flight, with the step-5 tools -- whole seconds, at most six digits, `0180` read as 180 -- because its first use is after the irreversible publish, and a `3m` failing there would strand the release at the registry step. `mcp-publisher publish` itself is tried up to four times, 30, 60 and then 90 seconds apart -- in this family, ctxlint's v0.27.0 ran out its own 60 s wait on the same per-version document and was accepted by the registry only on attempt 3 of 3, about 150 s after npm accepted the tarball -- on the failures that waiting cures, in the wording of the live registry (v1.8.1, reworded in v1.8.0 by registry PR #1411): a 404 naming this version (`exists, but version '<v>' was not found (status: 404)`), `Likely transient, retry later` (npm's 429 or 5xx, or a 404 whose package-level check was inconclusive), and `failed to fetch package metadata from NPM` (no status at all). The version is matched as the validator's own `version '<v>'`, since mcp-publisher after v1.8.1 prints the version before any error. It fails at once, with the tool's own output, on anything else: an expired login, the 422 schema report, a `mcpName` mismatch, a package the registry says does not exist. A duplicate version counts as done: the registry already holds it, the state the step exists to reach. If the listing still does not show it afterwards -- a version marked deleted is held but unlisted -- the final check says so rather than prescribing a re-run that would meet the same refusal. A persisted registry token is reused only with at least 240 s left, since tokens last 5 minutes and the retry can run 180 s. Step 4 reads npm's E403 `You cannot publish over the previously published versions` as the skip its probe should have taken, so a re-run whose read still lags npm's write goes on to step 5 instead of dying with a stale-token hint. The final verification reads the version and the tarball integrity out of one manifest read instead of two `npm view` calls. The one `npm view` left is the pre-flight `latest` read for the backward-version guard, where an answer up to five minutes stale changes nothing.
|
|
12
|
+
|
|
13
|
+
**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`**
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
**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**
|
|
22
|
+
|
|
23
|
+
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:
|
|
24
|
+
|
|
25
|
+
- **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.
|
|
26
|
+
- **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.
|
|
27
|
+
- **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)`.
|
|
28
|
+
|
|
29
|
+
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.
|
|
30
|
+
|
|
31
|
+
**Fixed -- `install --help` no longer calls a re-run over a matching Codex CLI entry a no-op**
|
|
32
|
+
|
|
33
|
+
`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:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
Re-running install over an entry that already matches is a no-op (exit 0, no
|
|
37
|
+
prompt) -- unless the file lacks a top-level setting its client needs:
|
|
38
|
+
Codex CLI: mcp_optional_startup_grace_ms = 0
|
|
39
|
+
The re-run then adds that setting (--dry-run previews it). It is add-only:
|
|
40
|
+
a value you set is left alone, and install says so.
|
|
41
|
+
Undo it with `yaw-mcp uninstall <client>`, which leaves such a setting in place.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
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)`.
|
|
45
|
+
|
|
46
|
+
**Fixed -- `install`'s Done line names a new MCP server only when the run wrote one**
|
|
47
|
+
|
|
48
|
+
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.
|
|
49
|
+
|
|
50
|
+
**Fixed -- a CRLF config file with no final line break stays CRLF when yaw-mcp writes it**
|
|
51
|
+
|
|
52
|
+
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.
|
|
53
|
+
|
|
54
|
+
**Fixed -- `heal` ends a client config it rewrites with a line break**
|
|
55
|
+
|
|
56
|
+
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.
|
|
57
|
+
|
|
58
|
+
**Fixed -- a client config `install` or `uninstall` cannot write is named, with the step past it**
|
|
59
|
+
|
|
60
|
+
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:
|
|
61
|
+
|
|
62
|
+
- 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.
|
|
63
|
+
- 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.
|
|
64
|
+
- 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`.
|
|
65
|
+
|
|
66
|
+
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.
|
|
67
|
+
|
|
68
|
+
**Fixed -- `heal` reports a stale entry it could not re-point, and exits 1**
|
|
69
|
+
|
|
70
|
+
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:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
yaw-mcp heal: could not re-point 1 stale entry:
|
|
74
|
+
codex-cli (user): <file>
|
|
75
|
+
still -> <launch file that no longer exists>
|
|
76
|
+
failed to write <file>: it is read-only -- clear its read-only attribute (`attrib -R "<file>"`), then re-run
|
|
77
|
+
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`.
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
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.
|
|
81
|
+
|
|
82
|
+
**Fixed -- `uninstall` over an `mcp` entry it will not edit says so instead of calling it absent, and `install` names the fix**
|
|
83
|
+
|
|
84
|
+
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`.
|
|
85
|
+
|
|
86
|
+
**Fixed -- a `config.toml` that is not valid UTF-8 is refused, not written back with replacement characters, and `doctor` calls it malformed**
|
|
87
|
+
|
|
88
|
+
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`.
|
|
89
|
+
|
|
90
|
+
`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.
|
|
91
|
+
|
|
92
|
+
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.
|
|
93
|
+
|
|
94
|
+
**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**
|
|
95
|
+
|
|
96
|
+
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.
|
|
97
|
+
|
|
98
|
+
`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.
|
|
99
|
+
|
|
100
|
+
**Changed -- `import` asks before it changes a server bundles.json already has, and off a terminal it needs `--force`**
|
|
101
|
+
|
|
102
|
+
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:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
<bundles.json> already has an entry "fs" that differs from the one importing fs would write:
|
|
106
|
+
args: ["-y","@modelcontextprotocol/server-filesystem","D:/mydata"] -> ["-y","@modelcontextprotocol/server-filesystem","C:/tmp"]
|
|
107
|
+
[o]verwrite, [s]kip, or [a]bort? (default: skip)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
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.
|
|
111
|
+
|
|
112
|
+
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.
|
|
113
|
+
|
|
114
|
+
**Fixed -- `import --dry-run --remove-originals` lists the client entries a real run would remove**
|
|
115
|
+
|
|
116
|
+
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.
|
|
117
|
+
|
|
118
|
+
**Changed -- the oam floor moves to 0.17.0**
|
|
119
|
+
|
|
120
|
+
`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.
|
|
121
|
+
|
|
122
|
+
## 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
|
|
123
|
+
|
|
124
|
+
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.
|
|
8
125
|
|
|
9
126
|
**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**
|
|
10
127
|
|
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`),
|
|
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
|
|