@ikuma.cloud/pix-mcp 0.0.5 → 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.
- package/README.md +17 -19
- package/package.json +1 -1
- package/src/index.ts +1 -21
package/README.md
CHANGED
|
@@ -14,31 +14,32 @@ pi -e /absolute/path/to/pix/packages/pix-mcp
|
|
|
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
|
|
17
|
+
and automatic startup behavior below before connecting servers.
|
|
18
18
|
|
|
19
|
-
## Configuration
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
31
|
-
|
|
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
|
|
34
|
-
contact remote services.
|
|
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.
|
|
35
37
|
|
|
36
38
|
At session startup, interactive and RPC sessions receive an `MCP config: <path>`
|
|
37
|
-
notice with the resolved absolute path after the file is read
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
Print and JSON sessions remain silent.
|
|
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.
|
|
42
43
|
|
|
43
44
|
```json
|
|
44
45
|
{
|
|
@@ -111,9 +112,6 @@ count limits remain fatal for the whole file. An invalid-only configuration
|
|
|
111
112
|
reports that no valid servers remain. Disabled entries are omitted, not reported
|
|
112
113
|
as failed connections. Correct the file and reload Pi to retry.
|
|
113
114
|
|
|
114
|
-
Configuration trust still applies before any valid server is started or its
|
|
115
|
-
metadata exposed.
|
|
116
|
-
|
|
117
115
|
### Deadlines and migration
|
|
118
116
|
|
|
119
117
|
All three deadline fields accept integers from 1 through 2,147,483,647 milliseconds
|
|
@@ -147,7 +145,7 @@ permission prompts in both interactive and headless sessions. Native calls pass
|
|
|
147
145
|
through Pi's normal `tool_call` and `tool_result` hooks. For approvals or access
|
|
148
146
|
policies, install a Pi extension that handles `tool_call` so it can manage MCP
|
|
149
147
|
and other tools together. Server annotations do not bypass those hooks.
|
|
150
|
-
|
|
148
|
+
These hooks govern tool calls, not automatic server startup.
|
|
151
149
|
|
|
152
150
|
**Migration from 0.0.2:** Remove the server-level `approve` field. Entries that
|
|
153
151
|
still contain it are rejected with migration guidance rather than silently
|
|
@@ -159,7 +157,7 @@ credentials; debug a failing server separately in a trusted environment.
|
|
|
159
157
|
|
|
160
158
|
## Discovery and execution
|
|
161
159
|
|
|
162
|
-
At session startup, the adapter connects to
|
|
160
|
+
At session startup, the adapter connects to enabled servers and fetches their
|
|
163
161
|
paginated tool catalogs. A server's configuration, connection, or discovery
|
|
164
162
|
failure does not hide tools from other servers.
|
|
165
163
|
Full schemas stay out of model context until selected. **Schema exposure is lazy;
|
package/package.json
CHANGED
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
|
|
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,6 @@ 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
|
-
}
|
|
392
372
|
if (ctx.hasUI) ctx.ui.notify(`MCP config: ${path}`, "info");
|
|
393
373
|
owner.configIssues = config.issues;
|
|
394
374
|
owner.status =
|