@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.
- package/README.md +20 -15
- package/package.json +1 -1
- 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
|
|
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.
|
|
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
|
-
|
|
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
|
|
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
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,7 @@ export default function mcp(pi: ExtensionAPI) {
|
|
|
375
369
|
"The explicitly selected MCP configuration does not exist.";
|
|
376
370
|
return;
|
|
377
371
|
}
|
|
378
|
-
|
|
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
|