@yawlabs/mcph 0.42.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to `@yawlabs/mcph` are documented here. This project uses [semantic versioning](https://semver.org) and a CI-gated release flow: pushing a `vX.Y.Z` tag triggers `.github/workflows/release.yml`, which publishes to npm.
4
4
 
5
+ ## 0.43.0 — 2026-04-18
6
+
7
+ - **`mcph servers <namespace-filter>` — positional filter** — Passing a bare positional argument now filters the listing to servers whose namespace contains that substring (case-insensitive): `mcph servers git` matches both `github` and `gitlab`. Applies to both the text table and the `--json` output so the two surfaces agree. Summary line reflects the filtered count, and a filter that matches nothing prints an explanatory "No servers match …" instead of an empty table (which previously looked like an empty account).
8
+ - **README catch-up — `CLI reference` block + `doctor --json` documented** — The README was missing the subcommands that landed in v0.38.0 onward (`servers`, `bundles`, `reset-learning`, `completion`) and hadn't been updated to mention doctor's `--json` mode. New compact "Other CLI subcommands" block lists every user-facing command with a one-line purpose, documents the `--json` pattern as the pipeline interface across doctor/servers/bundles, and includes copy-paste install snippets for bash/zsh/fish/powershell completions. The doctor paragraph now lists the actual section coverage (env overrides, persisted state, reliability rollup, shell-shadow hits, upgrade check) so first-time readers know what they get.
9
+
5
10
  ## 0.42.0 — 2026-04-18
6
11
 
7
12
  - **`mcph completion <shell>` — shell completion scripts** — Prints a completion script for `bash`, `zsh`, `fish`, or `powershell` to stdout so users can one-line it into their completions directory. Each script covers every known subcommand (install, doctor, servers, bundles, compliance, reset-learning, completion) with positional choices (install clients, bundles actions, completion shells) and per-subcommand flags (`--json`, `--scope`, `--token`, `--force`, etc.). Every template derives from a single `SUBCOMMAND_SPEC` table so adding a new subcommand elsewhere updates all four shells at once — no drift between what the CLI accepts and what it completes. Install hints are inlined as comments at the top of each generated script: the bash file drops into `~/.local/share/bash-completion/completions/mcph`, zsh into any `$fpath` dir as `_mcph`, fish into `~/.config/fish/completions/mcph.fish`, pwsh appended to `$PROFILE`.
package/README.md CHANGED
@@ -70,10 +70,40 @@ Or [edit the JSON by hand](#manual-install) if you'd rather.
70
70
  ### Diagnose problems — `mcph doctor`
71
71
 
72
72
  ```bash
73
- npx -y @yawlabs/mcph doctor
73
+ npx -y @yawlabs/mcph doctor # human-readable report
74
+ npx -y @yawlabs/mcph doctor --json # machine-readable snapshot for pipelines
74
75
  ```
75
76
 
76
- Prints the loaded config files, your token's source + fingerprint (last 4 chars), the API base URL, and which MCP clients on this machine have an `mcp.hosting` entry. Exits `0` healthy / `1` no token / `2` warnings (e.g. world-readable token file). Paste the full output into a support ticket and we can usually pinpoint the issue from that alone.
77
+ Prints the loaded config files, your token's source + fingerprint (last 4 chars), the API base URL, installed clients, env overrides, persisted learning state, flaky-namespace reliability rollup, shell-history "shadow" hits (CLIs you run that an MCP server could replace), and an upgrade check against the npm registry. Exits `0` healthy / `1` no token / `2` warnings (e.g. world-readable token file). Paste the text output into a support ticket; the `--json` blob is the same data as a structured snapshot, so dashboards and CI scripts can `jq` instead of parsing the text layout.
78
+
79
+ ### Other CLI subcommands
80
+
81
+ ```bash
82
+ mcph servers [<namespace-filter>] [--json] # list servers; optional substring filter on namespace
83
+ mcph bundles [list|match] [--json] # browse curated multi-server bundles (PR review, DevOps incident, etc.)
84
+ mcph reset-learning # clear cross-session learning history (~/.mcph/state.json)
85
+ mcph completion <bash|zsh|fish|powershell> # print shell completion script
86
+ mcph compliance <target> [--publish] # run the compliance suite against an MCP server
87
+ mcph --version # print version
88
+ ```
89
+
90
+ Every CLI that reads state has a `--json` mode for pipeline use. `mcph servers` hits the backend; `mcph bundles list` and `mcph completion` are fully static (no network, no token). `mcph bundles match` partitions the curated set against your enabled servers so you see the same ready-to-activate vs. partially-installed view the LLM-facing `mcp_connect_bundles` meta-tool produces.
91
+
92
+ To wire up shell completion:
93
+
94
+ ```bash
95
+ # bash
96
+ mcph completion bash > ~/.local/share/bash-completion/completions/mcph
97
+
98
+ # zsh (must be on $fpath, then rebuild compinit)
99
+ mcph completion zsh > "${fpath[1]}/_mcph"
100
+
101
+ # fish
102
+ mcph completion fish > ~/.config/fish/completions/mcph.fish
103
+
104
+ # powershell
105
+ mcph completion powershell >> $PROFILE
106
+ ```
77
107
 
78
108
  ### Getting your token
79
109
 
package/dist/index.js CHANGED
@@ -1435,7 +1435,7 @@ function selectFlakyNamespaces(entries, limit) {
1435
1435
  }
1436
1436
 
1437
1437
  // src/doctor-cmd.ts
1438
- var VERSION = true ? "0.42.0" : "dev";
1438
+ var VERSION = true ? "0.43.0" : "dev";
1439
1439
  async function runDoctor(opts = {}) {
1440
1440
  if (opts.json) return runDoctorJson(opts);
1441
1441
  const lines = [];
@@ -4519,7 +4519,7 @@ function categorizeSpawnError(err) {
4519
4519
  }
4520
4520
  async function connectToUpstream(config, onDisconnect, onListChanged) {
4521
4521
  const client = new Client(
4522
- { name: "mcph", version: true ? "0.42.0" : "dev" },
4522
+ { name: "mcph", version: true ? "0.43.0" : "dev" },
4523
4523
  { capabilities: {} }
4524
4524
  );
4525
4525
  let transport;
@@ -5000,7 +5000,7 @@ var ConnectServer = class _ConnectServer {
5000
5000
  this.apiUrl = apiUrl6;
5001
5001
  this.token = token6;
5002
5002
  this.server = new Server(
5003
- { name: "mcph", version: true ? "0.42.0" : "dev" },
5003
+ { name: "mcph", version: true ? "0.43.0" : "dev" },
5004
5004
  {
5005
5005
  capabilities: {
5006
5006
  tools: { listChanged: true },
@@ -7055,24 +7055,33 @@ To load the top pack in one step, call \`mcp_connect_activate\` with namespaces=
7055
7055
  // src/servers-cmd.ts
7056
7056
  function parseServersArgs(argv) {
7057
7057
  let json = false;
7058
+ let filter;
7058
7059
  for (const a of argv) {
7059
7060
  if (a === "--json") {
7060
7061
  json = true;
7061
7062
  } else if (a === "--help" || a === "-h") {
7062
7063
  return { ok: false, error: SERVERS_USAGE };
7063
- } else {
7064
+ } else if (a.startsWith("-")) {
7064
7065
  return { ok: false, error: `mcph servers: unknown argument "${a}"
7065
7066
 
7067
+ ${SERVERS_USAGE}` };
7068
+ } else if (filter === void 0) {
7069
+ filter = a;
7070
+ } else {
7071
+ return { ok: false, error: `mcph servers: unexpected extra argument "${a}"
7072
+
7066
7073
  ${SERVERS_USAGE}` };
7067
7074
  }
7068
7075
  }
7069
- return { ok: true, options: { json } };
7076
+ return { ok: true, options: { json, ...filter !== void 0 ? { filter } : {} } };
7070
7077
  }
7071
- var SERVERS_USAGE = `Usage: mcph servers [--json]
7078
+ var SERVERS_USAGE = `Usage: mcph servers [<namespace-filter>] [--json]
7072
7079
 
7073
7080
  List the servers configured in your mcp.hosting dashboard.
7074
7081
 
7075
- --json Emit machine-readable JSON instead of a table.`;
7082
+ <namespace-filter> Case-insensitive substring filter on namespace (e.g.,
7083
+ \`mcph servers git\` matches github + gitlab).
7084
+ --json Emit machine-readable JSON instead of a table.`;
7076
7085
  async function runServersCommand(opts = {}) {
7077
7086
  const write = opts.out ?? ((s) => process.stdout.write(s));
7078
7087
  const writeErr = opts.err ?? ((s) => process.stderr.write(s));
@@ -7109,11 +7118,19 @@ async function runServersCommand(opts = {}) {
7109
7118
  printErr("mcph servers: backend returned no data (unexpected 304).");
7110
7119
  return { exitCode: 2, lines };
7111
7120
  }
7121
+ const filtered = opts.filter ? {
7122
+ ...backend,
7123
+ servers: backend.servers.filter((s) => s.namespace.toLowerCase().includes(opts.filter.toLowerCase()))
7124
+ } : backend;
7112
7125
  if (opts.json) {
7113
- print(JSON.stringify(backend, null, 2));
7126
+ print(JSON.stringify(filtered, null, 2));
7127
+ return { exitCode: 0, lines };
7128
+ }
7129
+ if (opts.filter && filtered.servers.length === 0) {
7130
+ print(`No servers match "${opts.filter}". Run \`mcph servers\` to see the full list.`);
7114
7131
  return { exitCode: 0, lines };
7115
7132
  }
7116
- renderTable(backend, print);
7133
+ renderTable(filtered, print);
7117
7134
  return { exitCode: 0, lines };
7118
7135
  }
7119
7136
  function renderTable(cfg, print) {
@@ -7259,7 +7276,7 @@ ${installBlock}
7259
7276
  );
7260
7277
  process.exit(0);
7261
7278
  } else if (subcommand === "--version" || subcommand === "-V") {
7262
- process.stdout.write(`mcph ${true ? "0.42.0" : "dev"}
7279
+ process.stdout.write(`mcph ${true ? "0.43.0" : "dev"}
7263
7280
  `);
7264
7281
  process.exit(0);
7265
7282
  } else if (subcommand && !subcommand.startsWith("-")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yawlabs/mcph",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "description": "mcp.hosting — one install, all your MCP servers, managed from the cloud",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Yaw Labs <contact@yaw.sh> (https://yaw.sh)",