pi-mcp-client 0.6.0 → 0.7.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 CHANGED
@@ -33,7 +33,7 @@ Use these commands in Pi to manage your connections:
33
33
  | --- | --- |
34
34
  | `/mcp` | Inspect server status and loaded-tool counts. Idle connections are normal; servers connect on demand. |
35
35
  | `/mcp login <server>` | Sign in to an HTTP server. Only this command opens the login browser. |
36
- | `/mcp prompts <server>` | Browse prompts, enter arguments, and review a preview before using it. |
36
+ | `/mcp prompt <server> [name] [argument=value ...]` | Browse prompts or open one by name, then review a preview before using it. |
37
37
  | `/mcp reload` | Apply changes after editing your MCP configuration files. |
38
38
 
39
39
  Only configure servers you trust: local servers and secret commands run with your
package/dist/index.js CHANGED
@@ -2814,10 +2814,10 @@ function promptSelector(title, choices, theme, keys, done, render) {
2814
2814
  // src/prompt-command.ts
2815
2815
  var PromptCommandError = class extends Error {
2816
2816
  };
2817
- var PROMPT_USAGE = "Use /mcp prompts <server> or /mcp prompt <server> <name> [argument=value ...].";
2817
+ var PROMPT_USAGE = "Use /mcp prompt <server> [name] [argument=value ...].";
2818
2818
  function parsePromptCommand(input) {
2819
2819
  const [action, server, name, ...words] = commandWords(input);
2820
- if (!["prompt", "prompts"].includes(action) || !server || (action === "prompts" ? name !== void 0 : !name)) throw new PromptCommandError(PROMPT_USAGE);
2820
+ if (action !== "prompt" || !server) throw new PromptCommandError(PROMPT_USAGE);
2821
2821
  const args = /* @__PURE__ */ Object.create(null);
2822
2822
  for (const word of words) {
2823
2823
  const equals = word.indexOf("=");
@@ -6331,9 +6331,9 @@ Variables: ${(candidate.variables ?? []).join(", ") || "none"}. Supply known val
6331
6331
  }
6332
6332
  });
6333
6333
  pi.registerCommand("mcp", {
6334
- description: "Manage MCP servers: add|remove|import --scope global|project, list, status, reload, enable|disable|get|tools|prompts|login|logout|reconnect|refresh <server>; prompt <server> <name> [argument=value ...]; subscriptions; subscribe|unsubscribe <server> <uri>",
6334
+ description: "Manage MCP servers: add|remove|import --scope global|project, list, status, reload, enable|disable|get|tools|login|logout|reconnect|refresh <server>; prompt <server> [name] [argument=value ...]; subscriptions; subscribe|unsubscribe <server> <uri>",
6335
6335
  getArgumentCompletions(prefix) {
6336
- const serverActions = ["enable", "disable", "get", "tools", "prompts", "prompt", "login", "logout", "reconnect", "refresh", "subscribe", "unsubscribe"];
6336
+ const serverActions = ["enable", "disable", "get", "tools", "prompt", "login", "logout", "reconnect", "refresh", "subscribe", "unsubscribe"];
6337
6337
  const input = prefix.trimStart();
6338
6338
  const configuration = configCommandCompletions(input, Object.keys(config));
6339
6339
  if (configuration !== void 0) return configuration;
@@ -6382,7 +6382,7 @@ Variables: ${(candidate.variables ?? []).join(", ") || "none"}. Supply known val
6382
6382
  }
6383
6383
  return;
6384
6384
  }
6385
- if (action === "prompt" || action === "prompts") {
6385
+ if (action === "prompt") {
6386
6386
  if (promptController) throw new PromptCommandError("A prompt selection is already open.");
6387
6387
  const activeRuntime = current();
6388
6388
  const controller = new AbortController();
@@ -6629,7 +6629,7 @@ Opening browser. Esc to cancel.`
6629
6629
  const message = error instanceof CommandUsageError || error instanceof ConfigMutationError || error instanceof PromptCommandError ? error.message : formatDiagnostic(
6630
6630
  diagnose(error, {
6631
6631
  server,
6632
- operation: ["reload", "get", "enable", "disable", "add", "remove", "import"].includes(action) ? "configuration" : ["tools", "prompts"].includes(action) ? "search" : action === "prompt" ? "prompt" : ["login", "logout"].includes(action) ? "auth" : ["subscribe", "unsubscribe"].includes(action) ? "subscribe" : action === "refresh" ? "refresh" : "reconnect",
6632
+ operation: ["reload", "get", "enable", "disable", "add", "remove", "import"].includes(action) ? "configuration" : action === "tools" ? "search" : action === "prompt" ? "prompt" : ["login", "logout"].includes(action) ? "auth" : ["subscribe", "unsubscribe"].includes(action) ? "subscribe" : action === "refresh" ? "refresh" : "reconnect",
6633
6633
  oauth: usesOAuth(config[server]),
6634
6634
  signal: ctx.signal
6635
6635
  })
package/docs/behavior.md CHANGED
@@ -33,7 +33,7 @@ contain sensitive data and aren't automatically deleted.
33
33
  ## Prompt snapshots
34
34
 
35
35
  Prompt discovery fetches metadata only. You explicitly enter arguments and fetch a
36
- preview through `/mcp prompts` or `/mcp prompt`. Only **Use prompt** adds the
36
+ preview through `/mcp prompt`. Only **Use prompt** adds the
37
37
  reviewed snapshot to the conversation and starts a model turn. Cancelling a
38
38
  preview adds no message and doesn't write a spill file. Arguments already sent to
39
39
  the server can't be recalled.
package/docs/commands.md CHANGED
@@ -16,8 +16,7 @@ separate interface is documented in the [tool reference](tool-reference.md).
16
16
  | `/mcp import --scope <scope> <path>` | Preview and select servers from Claude/Cursor JSON or Codex TOML, then confirm a scoped import. |
17
17
  | `/mcp get <server>` | Inspect status and configuration, including disabled servers. Connection values are hidden. |
18
18
  | `/mcp tools <server>` | Browse the server's tools and inspect descriptions without activating tools. |
19
- | `/mcp prompts <server>` | Browse prompt metadata, then select a prompt and enter arguments. |
20
- | `/mcp prompt <server> <name> [argument=value ...]` | Open a named prompt with prefilled arguments, then fetch and review a preview. |
19
+ | `/mcp prompt <server> [name] [argument=value ...]` | Browse prompts or open a named prompt with prefilled arguments, then fetch and review a preview. |
21
20
  | `/mcp reload` | Apply configuration changes without restarting Pi. |
22
21
  | `/mcp enable <server>` | Enable a server in its effective configuration file. |
23
22
  | `/mcp disable <server>` | Disable a server, close its connection, and deactivate its tools. |
@@ -68,7 +67,7 @@ Prompts are server-maintained task instructions that **you** choose to use. For
68
67
  server that provides an `explain` prompt, browse or open it directly:
69
68
 
70
69
  ```text
71
- /mcp prompts docs
70
+ /mcp prompt docs
72
71
  /mcp prompt docs explain topic="OAuth flows"
73
72
  ```
74
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-mcp-client",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "MCP tools for Pi, discovered on demand and called natively through the official SDK.",
5
5
  "type": "module",
6
6
  "license": "MIT",