@yawlabs/mcp 0.79.1 → 0.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -6
- package/dist/auto-upgrade-OHFS4H24.js +23 -0
- package/dist/{chunk-33LK4DLQ.js → chunk-EXO2NR5I.js} +985 -79
- package/dist/index.js +3187 -1708
- package/package.json +5 -4
- package/schemas/yaw-mcp.config.v1.json +7 -6
- package/dist/auto-upgrade-YUPODM3T.js +0 -16
- package/dist/chunk-3RRZQPA5.js +0 -39
- package/dist/chunk-TBJCXYS4.js +0 -639
- package/dist/oam-spawn-UUOFWXFP.js +0 -82
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ This edits the chosen client's config (correct path + JSON shape for your OS) to
|
|
|
62
62
|
Useful flags:
|
|
63
63
|
|
|
64
64
|
- `--scope user|project|local` -- which file to write (Claude Code + Cursor support project/local; VS Code is workspace-only; Claude Desktop is user-only).
|
|
65
|
-
- `--dry-run` -- print the
|
|
65
|
+
- `--dry-run` -- print what would be added (never the rest of the file) and exit without writing.
|
|
66
66
|
- `--force` / `--skip` -- overwrite or leave an existing `mcp` entry (otherwise prompts on a TTY, refuses off-TTY).
|
|
67
67
|
|
|
68
68
|
Or do every detected client at once:
|
|
@@ -171,9 +171,12 @@ yaw-mcp remove <slug-or-namespace> # drop a server
|
|
|
171
171
|
yaw-mcp list [--json] # list configured servers with their cached compliance grade
|
|
172
172
|
yaw-mcp try <slug> [--client <name>] [--ttl 1h] # wire a one-off trial straight into your client (expires)
|
|
173
173
|
yaw-mcp try-cleanup <slug> # remove a trial early (doctor GCs expired ones)
|
|
174
|
+
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)
|
|
174
175
|
```
|
|
175
176
|
|
|
176
|
-
`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.
|
|
177
|
+
`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 (file mode `0600`) in `bundles.json` -- 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).
|
|
178
|
+
|
|
179
|
+
A project-local `.yaw-mcp/bundles.json` (committed with a repo) is ignored until `yaw-mcp trust` approves it, since every server in it is a command yaw-mcp spawns as you. Approval is pinned to the file's exact contents, so an edited file needs approving again; `--list` shows approvals (stale ones flagged) and `--revoke` withdraws one. Your own `~/.yaw-mcp/bundles.json` is never gated.
|
|
177
180
|
|
|
178
181
|
**Inspection & maintenance**
|
|
179
182
|
|
|
@@ -207,14 +210,18 @@ The project `.yaw-mcp/` is found by walking up from the cwd -- stopping just bef
|
|
|
207
210
|
|
|
208
211
|
```jsonc
|
|
209
212
|
{
|
|
213
|
+
// optional -- gives editors key completion + inline validation
|
|
214
|
+
"$schema": "https://raw.githubusercontent.com/YawLabs/mcp/main/schemas/yaw-mcp.config.v1.json",
|
|
210
215
|
"version": 1, // schema version; newer versions log a warning
|
|
211
216
|
"servers": ["gh", "pg", "linear"], // allow-list of namespaces (most-specific scope wins)
|
|
212
|
-
"blocked": ["
|
|
217
|
+
"blocked": ["prod_db"], // deny-list (UNION across all scopes -- fail-safe on deny)
|
|
213
218
|
"installNudge": true // opt-in: discover may suggest installing MCP servers for
|
|
214
219
|
// CLIs found in your recent shell history (off by default)
|
|
215
220
|
}
|
|
216
221
|
```
|
|
217
222
|
|
|
223
|
+
That shape ships as a JSON Schema -- [`schemas/yaw-mcp.config.v1.json`](schemas/yaw-mcp.config.v1.json), served from the raw URL in the `$schema` line above -- so any editor that honors `$schema` completes the keys and flags a typo as you type. A namespace is `[a-z][a-z0-9_]{0,29}` (so `prod_db`, not `prod-db`); the schema rejects anything else, while the loader only warns and keeps loading.
|
|
224
|
+
|
|
218
225
|
Malformed files log a warning and fall through (fail-open). yaw-mcp reads config at startup, so restart the client after editing; `mcp_connect_health` shows which files are applied.
|
|
219
226
|
|
|
220
227
|
### Project guide -- `YAW-MCP.md`
|
|
@@ -236,7 +243,7 @@ At spawn time, if `YAW_MCP_VAULT_PASSPHRASE` is set in yaw-mcp's own env, it dec
|
|
|
236
243
|
|
|
237
244
|
**Where the passphrase comes from.** Three ways, in the order you'll meet them:
|
|
238
245
|
|
|
239
|
-
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 every child
|
|
246
|
+
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.
|
|
240
247
|
2. **An in-session prompt.** If your client supports MCP [elicitation](https://modelcontextprotocol.io/specification/server/elicitation), a locked vault asks for the passphrase once per session and retries the server. It's held in memory for that session only -- never written to disk, and never handed to the server being started.
|
|
241
248
|
3. **The CLI prompt**, for `yaw-mcp secrets` runs: no-echo on a real TTY. Note that Git Bash/MSYS can't offer one (Node sees pipes, not a TTY) -- use PowerShell, `winpty`, or the env var there.
|
|
242
249
|
|
|
@@ -247,7 +254,7 @@ yaw-mcp secrets set <name> # store a value (no-echo prompt, or --value/--st
|
|
|
247
254
|
yaw-mcp secrets get <name> # decrypt and print one value
|
|
248
255
|
yaw-mcp secrets list # show entry NAMES only (values stay encrypted)
|
|
249
256
|
yaw-mcp secrets remove <name> # delete an entry
|
|
250
|
-
yaw-mcp secrets lock #
|
|
257
|
+
yaw-mcp secrets lock # forget this process's cached passphrase -- effectively a no-op from the CLI; cannot reach a running server or change the vault
|
|
251
258
|
yaw-mcp secrets rotate # re-encrypt the whole vault under a NEW passphrase
|
|
252
259
|
yaw-mcp secrets audit [--secret NAME] [--server NS] [--json] # who consumed which secret, when
|
|
253
260
|
```
|
|
@@ -269,7 +276,7 @@ MCP servers are third-party code you choose to run. yaw-mcp doesn't sandbox them
|
|
|
269
276
|
- **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>`.
|
|
270
277
|
- **Source transparency** -- `list` and `discover` show the exact `command`, `args`, and `url` each server launches with. Nothing is wrapped.
|
|
271
278
|
- **Local credentials** -- vault values are encrypted at rest (scrypt + AES-256-GCM), injected at spawn, and never logged. Nothing is transmitted off the machine.
|
|
272
|
-
- **Response pruning** (`YAW_MCP_PRUNE_RESPONSES`, on by default) --
|
|
279
|
+
- **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. Structured values are never altered or redacted; it is a token-savings feature, not a security control.
|
|
273
280
|
- **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.
|
|
274
281
|
|
|
275
282
|
yaw-mcp does **not** block outbound traffic, firewall DNS, analyze source, or pin hashes -- a malicious server you chose to run can reach any URL your machine can. Review the command before adding a server, run untrusted ones under a restricted user or container, and prefer graded servers when alternatives are equivalent. Report a security issue in yaw-mcp itself via [GitHub private advisories](https://github.com/YawLabs/mcp/security/advisories/new) (see [`SECURITY.md`](./SECURITY.md)).
|
|
@@ -287,11 +294,17 @@ Common ones (run `yaw-mcp --help` for the full list):
|
|
|
287
294
|
| `YAW_MCP_SERVER_CAP` | Max concurrently active servers. Default `6`; `0` disables the cap. |
|
|
288
295
|
| `YAW_MCP_MIN_COMPLIANCE` | Minimum grade (`A`-`F`) an installed server must report before `activate` loads it. |
|
|
289
296
|
| `YAW_MCP_VAULT_PASSPHRASE` | Passphrase for the local secret vault. Required for spawn-time `${secret:NAME}` substitution -- set it in yaw-mcp's own env, not the upstream server's. Clients supporting elicitation prompt for it instead. |
|
|
297
|
+
| `YAW_MCP_TRUST_PROJECT` | `1` skips the consent check on a project-local `.yaw-mcp/bundles.json` and loads it unconditionally. CI/automation only -- it lets any repo you run yaw-mcp inside spawn commands as you. Default: the file must be approved with `yaw-mcp trust`. |
|
|
290
298
|
| `YAW_MCP_AUTO_ACTIVATE` | `0` disables discover auto-loading a clearly-winning server. Default on. |
|
|
291
299
|
| `YAW_MCP_AUTO_UPGRADE` | `0` disables the background self-upgrade check at startup. Default on. |
|
|
292
300
|
| `YAW_MCP_SIDECAR_REFRESH` | `0` disables the daily background check that keeps managed sidecars current. Only ever runs if you have run `yaw-mcp sidecars install`; explicit pins and semver ranges are never moved. Default on. |
|
|
301
|
+
| `OAM_BIN` | Path to the `oam` binary to use instead of the one on `PATH`. A path that does not exist is reported by `doctor` as an unusable oam (fix the variable), not as oam being absent. |
|
|
302
|
+
| `OAM_MAX_HEAP_MB` | Raises the V8 heap cap oam applies to a hosted server (4 GiB by default since oam 0.9.2). Set it in that server's `env` when a hosted sidecar dies with a heap out-of-memory error, or give that server `"runtime": "node"`. |
|
|
293
303
|
| `YAW_MCP_AUTO_LOAD` | `1` pre-activates the top recurring pack at startup (needs persistence). Default off. |
|
|
294
304
|
| `YAW_MCP_PRUNE_RESPONSES` | `0` disables response pruning. Default on. |
|
|
305
|
+
| `MCP_CONNECT_TIMEOUT` | Milliseconds to wait for a server's MCP handshake. Default `15000`; a server's own `connectTimeoutMs` in `bundles.json` always wins. Whole milliseconds in `1..2147483647` -- anything else falls back to the default with one warn. |
|
|
306
|
+
| `MCP_LIST_TIMEOUT` | Milliseconds to wait for a server's tool/resource/prompt inventory calls after the handshake. Default `15000`; same `1..2147483647` whole-millisecond parse, invalid values fall back with one warn. |
|
|
307
|
+
| `MCP_CALL_TIMEOUT` | Milliseconds to wait for a single proxied `tools/call`. Default `60000` (the SDK's own bound); raise it for legitimately slow servers. Same `1..2147483647` whole-millisecond parse, invalid values fall back with one warn. |
|
|
295
308
|
| `YAW_MCP_IDLE_THRESHOLD` | Non-matching tool calls a loaded server tolerates before it is unloaded. Default `10`; bursty servers earn more patience automatically. The older name `MCP_CONNECT_IDLE_THRESHOLD` still works as a fallback. |
|
|
296
309
|
| `YAW_MCP_DISABLE_PERSISTENCE` | `1` keeps learning + pack history process-scoped (CI, containers). Default off. |
|
|
297
310
|
| `LOG_LEVEL` | `debug` \| `info` \| `warn` \| `error`. Default `info`. |
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
acquireUpgradeLock,
|
|
4
|
+
attemptedRecentlyAt,
|
|
5
|
+
detectRunningInstallPrefix,
|
|
6
|
+
maybeAutoUpgrade,
|
|
7
|
+
quoteArgForDisplay,
|
|
8
|
+
quoteShellArgIfNeeded,
|
|
9
|
+
readCheckMemo,
|
|
10
|
+
recordAttemptAt,
|
|
11
|
+
writeCheckMemo
|
|
12
|
+
} from "./chunk-EXO2NR5I.js";
|
|
13
|
+
export {
|
|
14
|
+
acquireUpgradeLock,
|
|
15
|
+
attemptedRecentlyAt,
|
|
16
|
+
detectRunningInstallPrefix,
|
|
17
|
+
maybeAutoUpgrade,
|
|
18
|
+
quoteArgForDisplay,
|
|
19
|
+
quoteShellArgIfNeeded,
|
|
20
|
+
readCheckMemo,
|
|
21
|
+
recordAttemptAt,
|
|
22
|
+
writeCheckMemo
|
|
23
|
+
};
|