@jangmanj/mcp 0.13.0 → 0.14.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
@@ -292,8 +292,8 @@ Pi as `mcp__<server>__<tool>`.
292
292
  ```sh
293
293
  pi install npm:@jangmanj/mcp
294
294
  # or from a checkout / git ref:
295
- pi install ./path/to/mcp-client
296
- pi install git:github.com/JangMan-J/mcp-client@v0.1.1
295
+ pi install ./path/to/mcp
296
+ pi install git:github.com/JangMan-J/mcp-client@v0.13.0
297
297
  ```
298
298
 
299
299
  The extension reads the same `mcp.json` files as built-in MCP
@@ -310,13 +310,14 @@ Beyond tools, it covers built-in MCP parity: `list_mcp_resources`,
310
310
  tool updates, `/mcp prompts|prompt|resources|task|enable|disable|exposure`
311
311
  subcommands, MRTR elicitation through Pi's UI, task handles with `tasks/get`
312
312
  and `tasks/cancel`, 20 KB middle-out text truncation with temp-file offload,
313
- and a rotating `$PI_CODING_AGENT_DIR/mcp-client.log`.
313
+ and a rotating `$PI_CODING_AGENT_DIR/mcp.log`.
314
314
 
315
315
  OAuth works out of the box for HTTP servers without a static `Authorization` header: the
316
316
  first 401 marks the server "needs sign-in" in `/mcp`, and `/mcp login <name>` runs the
317
317
  authorization-code + PKCE flow with CIMD/DCR registration through the system browser.
318
- Credentials persist in `$PI_CODING_AGENT_DIR/mcp-client-oauth.json` (issuer-keyed);
319
- `/mcp logout <name>` deletes them. The full `oauth` config shape is supported:
318
+ Credentials persist in `$PI_CODING_AGENT_DIR/mcp-oauth.json` (issuer-keyed);
319
+ `/mcp logout <name>` deletes them. Earlier versions stored them in
320
+ `mcp-client-oauth.json`; rename that file once to keep existing sign-ins. The full `oauth` config shape is supported:
320
321
  `clientId`, `clientSecret`, `clientName`, `callbackPort`, `callbackUrl` (loopback HTTP),
321
322
  `scope` (space-separated, merged with advertised scopes), and `authServerMetadataUrl`
322
323
  (trusted as configured, skips PRM discovery).
@@ -184,7 +184,7 @@ export interface BridgeOptions {
184
184
  readonly allowInsecureAuth?: boolean;
185
185
  /** Host UI for elicitation prompts; without it elicitations decline. */
186
186
  readonly ui?: Ui;
187
- /** Diagnostics log path (mcp-client.log). */
187
+ /** Diagnostics log path (mcp.log). */
188
188
  readonly diagnosticsLogPath?: string;
189
189
  }
190
190
 
@@ -394,7 +394,7 @@ export class McpBridge {
394
394
  const client = new McpClient({
395
395
  transport,
396
396
  server: { key: config.name, label: config.name },
397
- clientInfo: { name: "pi", version: "mcp-client-bridge" },
397
+ clientInfo: { name: "pi", version: "pi-adapter" },
398
398
  defaults: { timeoutMs: config.timeoutMs },
399
399
  ports: { consent: consentPort(this.ui, config.name) },
400
400
  });
@@ -1,4 +1,4 @@
1
- /** Bounded diagnostics log (mcp-client.log), rotated at 5 MB like Pi's mcp.log. */
1
+ /** Bounded diagnostics log (mcp.log), rotated at 5 MB like Pi's mcp.log. */
2
2
 
3
3
  import { appendFile, mkdir, rename, stat } from "node:fs/promises";
4
4
  import { dirname } from "node:path";
@@ -44,8 +44,8 @@ export default function (pi: ExtensionAPI) {
44
44
  const bridge = new McpBridge({
45
45
  pi,
46
46
  notify: (message, level) => currentUi?.notify(message, level),
47
- credentialStorePath: join(agentDir(process.env, homedir()), "mcp-client-oauth.json"),
48
- diagnosticsLogPath: join(agentDir(process.env, homedir()), "mcp-client.log"),
47
+ credentialStorePath: join(agentDir(process.env, homedir()), "mcp-oauth.json"),
48
+ diagnosticsLogPath: join(agentDir(process.env, homedir()), "mcp.log"),
49
49
  confirm: (title, message) => currentUi?.confirm?.(title, message) ?? Promise.resolve(false),
50
50
  ui: {
51
51
  notify: (message, level) => currentUi?.notify(message, level),
@@ -57,7 +57,7 @@ export default function (pi: ExtensionAPI) {
57
57
 
58
58
  // Registering /mcp replaces built-in MCP support for sessions.
59
59
  pi.registerCommand("mcp", {
60
- description: "MCP (mcp-client bridge): list, reconnect, login, logout, tools, prompts, resources, task, enable/disable, exposure",
60
+ description: "MCP (mcp bridge): list, reconnect, login, logout, tools, prompts, resources, task, enable/disable, exposure",
61
61
  handler: async (args, ctx) => {
62
62
  const [sub, ...rest] = args.trim().split(/\s+/).filter(Boolean);
63
63
  const name = rest[0];
@@ -15,7 +15,7 @@ export interface OffloadedText {
15
15
  /** Middle-out truncation at 20 KB with the full text saved to a temp file. */
16
16
  export async function offloadText(text: string): Promise<OffloadedText> {
17
17
  if (text.length <= MAX_INLINE_TEXT) return { text };
18
- const filePath = join(tmpdir(), `mcp-client-${randomUUID()}.txt`);
18
+ const filePath = join(tmpdir(), `mcp-${randomUUID()}.txt`);
19
19
  await writeFile(filePath, text);
20
20
  const removed = text.length - MAX_INLINE_TEXT;
21
21
  const half = MAX_INLINE_TEXT / 2;
@@ -26,7 +26,7 @@ export async function offloadText(text: string): Promise<OffloadedText> {
26
26
  }
27
27
 
28
28
  export async function offloadBinary(bytes: Uint8Array, extension = "bin"): Promise<string> {
29
- const filePath = join(tmpdir(), `mcp-client-${randomUUID()}.${extension}`);
29
+ const filePath = join(tmpdir(), `mcp-${randomUUID()}.${extension}`);
30
30
  await writeFile(filePath, bytes);
31
31
  return filePath;
32
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jangmanj/mcp",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "MCP 2026-07-28 client and server library: push events/subscriptions, core, transports, auth, ops, MRTR/cache, OTEL telemetry, and extensions.",
5
5
  "license": "MIT",
6
6
  "author": "JangMan-J",