@ikuma.cloud/pix-mcp 0.0.4 → 0.0.6

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.
Files changed (3) hide show
  1. package/README.md +20 -15
  2. package/package.json +1 -1
  3. package/src/index.ts +2 -21
package/README.md CHANGED
@@ -9,29 +9,37 @@ required.
9
9
  To load this package in an existing Pi installation:
10
10
 
11
11
  ```sh
12
- pi -e /absolute/path/to/pix/packages/mcp
12
+ pi -e /absolute/path/to/pix/packages/pix-mcp
13
13
  ```
14
14
 
15
15
  Disable any other MCP adapter that would collide with the `mcp` tool or flags,
16
16
  but keep any permission-control extensions enabled. Review the configuration
17
- and trust requirements below before connecting servers.
17
+ and automatic startup behavior below before connecting servers.
18
18
 
19
- ## Configuration and trust
19
+ ## Configuration
20
20
 
21
21
  By default, read only `.mcp.json` in Pi's working directory. There is no ancestor
22
22
  search, global config merge, automatic import, or persistent metadata cache.
23
23
  Relative `--mcp-config` paths resolve from that working directory; a stdio
24
24
  server's `cwd` resolves from the config directory and defaults to that directory.
25
25
 
26
- A bare `.mcp.json` is not protected by Pi's project-trust mechanism. This adapter
27
- asks before using the default file. In a headless session, it remains disabled
28
- unless explicitly trusted. Either of these authorizes the file for one session:
26
+ The adapter automatically loads the selected file and starts its enabled servers
27
+ in all modes, without a confirmation prompt. Use `--mcp-config <path>` to select
28
+ a different file.
29
29
 
30
- - `--mcp-config <path>`: select **and trust** a file.
31
- - `--mcp-trust-config`: trust the default `.mcp.json`.
30
+ **Breaking change:** `--mcp-trust-config` has been removed. Remove it from existing
31
+ launch commands; print and JSON sessions also load the default file automatically.
32
32
 
33
- Review the file first: trusting it can launch arbitrary local programs and
34
- contact remote services. Configuration trust is not an OS sandbox.
33
+ Review the file before starting Pi: it can launch arbitrary local programs and
34
+ contact remote services. A bare `.mcp.json` is not protected by Pi's project-trust
35
+ mechanism, and the adapter is not an OS sandbox. Set a server's `disabled` field
36
+ to `true` to prevent it from starting.
37
+
38
+ At session startup, interactive and RPC sessions receive an `MCP config: <path>`
39
+ notice with the resolved absolute path after the file is read. The notice
40
+ identifies the configuration file, not whether every server connected; it never
41
+ includes configuration contents. Missing, unreadable, or malformed files produce
42
+ no notice. Print and JSON sessions remain silent.
35
43
 
36
44
  ```json
37
45
  {
@@ -104,9 +112,6 @@ count limits remain fatal for the whole file. An invalid-only configuration
104
112
  reports that no valid servers remain. Disabled entries are omitted, not reported
105
113
  as failed connections. Correct the file and reload Pi to retry.
106
114
 
107
- Configuration trust still applies before any valid server is started or its
108
- metadata exposed.
109
-
110
115
  ### Deadlines and migration
111
116
 
112
117
  All three deadline fields accept integers from 1 through 2,147,483,647 milliseconds
@@ -140,7 +145,7 @@ permission prompts in both interactive and headless sessions. Native calls pass
140
145
  through Pi's normal `tool_call` and `tool_result` hooks. For approvals or access
141
146
  policies, install a Pi extension that handles `tool_call` so it can manage MCP
142
147
  and other tools together. Server annotations do not bypass those hooks.
143
- Configuration trust above is separate: it authorizes startup, not individual calls.
148
+ These hooks govern tool calls, not automatic server startup.
144
149
 
145
150
  **Migration from 0.0.2:** Remove the server-level `approve` field. Entries that
146
151
  still contain it are rejected with migration guidance rather than silently
@@ -152,7 +157,7 @@ credentials; debug a failing server separately in a trusted environment.
152
157
 
153
158
  ## Discovery and execution
154
159
 
155
- At session startup, the adapter connects to trusted servers and fetches their
160
+ At session startup, the adapter connects to enabled servers and fetches their
156
161
  paginated tool catalogs. A server's configuration, connection, or discovery
157
162
  failure does not hide tools from other servers.
158
163
  Full schemas stay out of model context until selected. **Schema exposure is lazy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikuma.cloud/pix-mcp",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/index.ts CHANGED
@@ -60,13 +60,7 @@ export default function mcp(pi: ExtensionAPI) {
60
60
  pi.registerFlag("mcp-config", {
61
61
  type: "string",
62
62
  description:
63
- "Read and trust this MCP config file for this session (default: .mcp.json, with confirmation).",
64
- });
65
- pi.registerFlag("mcp-trust-config", {
66
- type: "boolean",
67
- default: false,
68
- description:
69
- "Trust the default .mcp.json for this session; it can launch processes and contact servers.",
63
+ "Read this MCP config file for this session (default: .mcp.json).",
70
64
  });
71
65
 
72
66
  function deactivate(names: Iterable<string>) {
@@ -375,20 +369,7 @@ export default function mcp(pi: ExtensionAPI) {
375
369
  "The explicitly selected MCP configuration does not exist.";
376
370
  return;
377
371
  }
378
- // A bare .mcp.json is not among Pi's project-trust resources. Require our
379
- // own decision rather than assuming Pi has approved launching its commands.
380
- let trusted = explicit || pi.getFlag("mcp-trust-config") === true;
381
- if (!trusted && ctx.hasUI)
382
- trusted = await ctx.ui.confirm(
383
- "Trust MCP configuration for this session?",
384
- `${path}\nThis file can launch local processes and contact remote servers. Review it before approving.`,
385
- );
386
- current(owner);
387
- if (!trusted) {
388
- owner.status =
389
- "MCP configuration not trusted. Review it, then restart with --mcp-trust-config or --mcp-config <path>.";
390
- return;
391
- }
372
+ if (ctx.hasUI) ctx.ui.notify(`MCP config: ${path}`, "info");
392
373
  owner.configIssues = config.issues;
393
374
  owner.status =
394
375
  config.issues.length > 0