@bastani/atomic 0.9.25-alpha.2 → 0.9.25-alpha.4
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/CHANGELOG.md +55 -0
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/mcp/CHANGELOG.md +43 -0
- package/dist/builtin/mcp/OAUTH.md +59 -269
- package/dist/builtin/mcp/README.md +58 -345
- package/dist/builtin/mcp/index.bundle.mjs +4 -27792
- package/dist/builtin/mcp/native-client-licenses/LICENSES/modelcontextprotocol-typescript-sdk.txt +21 -0
- package/dist/builtin/mcp/native-client-licenses/NOTICE +30 -0
- package/dist/builtin/mcp/package.json +4 -25
- package/dist/builtin/subagents/package.json +3 -3
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +12 -0
- package/dist/builtin/workflows/builtin/{chunk-e1254zvd.js → chunk-kfsnh3w7.js} +40 -12
- package/dist/builtin/workflows/builtin/{chunk-cpw5gtzg.js → chunk-rqmasd3d.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-qy6g0baf.js → chunk-wz783pvd.js} +1 -1
- package/dist/builtin/workflows/builtin/goal.js +2 -2
- package/dist/builtin/workflows/builtin/index.js +3 -3
- package/dist/builtin/workflows/builtin/ralph.js +2 -2
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +472 -88
- package/dist/builtin/workflows/src/index.js +65 -28
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +2 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-session-accessors.d.ts.map +1 -1
- package/dist/core/agent-session-accessors.js +7 -0
- package/dist/core/agent-session-accessors.js.map +1 -1
- package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
- package/dist/core/agent-session-extension-bindings.js +103 -7
- package/dist/core/agent-session-extension-bindings.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +7 -1
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-state.d.ts.map +1 -1
- package/dist/core/agent-session-state.js +3 -2
- package/dist/core/agent-session-state.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +6 -3
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +1 -0
- package/dist/core/agent-session-types.d.ts.map +1 -1
- package/dist/core/agent-session-types.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +6 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/api-types.d.ts +3 -0
- package/dist/core/extensions/api-types.d.ts.map +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/context-types.d.ts +3 -1
- package/dist/core/extensions/context-types.d.ts.map +1 -1
- package/dist/core/extensions/context-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +2 -0
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -0
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader-api.d.ts.map +1 -1
- package/dist/core/extensions/loader-api.js +15 -0
- package/dist/core/extensions/loader-api.js.map +1 -1
- package/dist/core/extensions/loader-runtime.d.ts.map +1 -1
- package/dist/core/extensions/loader-runtime.js +3 -0
- package/dist/core/extensions/loader-runtime.js.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.js +3 -0
- package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
- package/dist/core/extensions/mcp-server-registry.d.ts.map +1 -1
- package/dist/core/extensions/mcp-server-registry.js +4 -0
- package/dist/core/extensions/mcp-server-registry.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +3 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +4 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/runtime-types.d.ts +3 -0
- package/dist/core/extensions/runtime-types.d.ts.map +1 -1
- package/dist/core/extensions/runtime-types.js.map +1 -1
- package/dist/core/extensions/tool-types.d.ts +1 -0
- package/dist/core/extensions/tool-types.d.ts.map +1 -1
- package/dist/core/extensions/tool-types.js.map +1 -1
- package/dist/core/extensions/workflow-run-control-hub.d.ts +23 -0
- package/dist/core/extensions/workflow-run-control-hub.d.ts.map +1 -0
- package/dist/core/extensions/workflow-run-control-hub.js +57 -0
- package/dist/core/extensions/workflow-run-control-hub.js.map +1 -0
- package/dist/core/extensions/workflow-run-control.d.ts +163 -0
- package/dist/core/extensions/workflow-run-control.d.ts.map +1 -0
- package/dist/core/extensions/workflow-run-control.js +73 -0
- package/dist/core/extensions/workflow-run-control.js.map +1 -0
- package/dist/core/mcp-child-policy.d.ts +11 -0
- package/dist/core/mcp-child-policy.d.ts.map +1 -0
- package/dist/core/mcp-child-policy.js +31 -0
- package/dist/core/mcp-child-policy.js.map +1 -0
- package/dist/core/mcp-servers.d.ts +34 -25
- package/dist/core/mcp-servers.d.ts.map +1 -1
- package/dist/core/mcp-servers.js +148 -1
- package/dist/core/mcp-servers.js.map +1 -1
- package/dist/core/package-manager-manifest.js.map +1 -1
- package/dist/core/package-manager-mcp-servers.js +1 -1
- package/dist/core/package-manager-mcp-servers.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +4 -9
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/sdk.js +11 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/tool-loadout.d.ts +1 -0
- package/dist/core/tool-loadout.d.ts.map +1 -1
- package/dist/core/tool-loadout.js +3 -0
- package/dist/core/tool-loadout.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +11 -30
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/truncate.d.ts +8 -0
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +24 -0
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/extensions/codemode/execute.d.ts.map +1 -1
- package/dist/extensions/codemode/execute.js +26 -0
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/renderer.d.ts.map +1 -1
- package/dist/extensions/codemode/renderer.js +38 -23
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js +22 -10
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts +21 -0
- package/dist/extensions/mcp/cli.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.js +500 -0
- package/dist/extensions/mcp/cli.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.d.ts +3 -0
- package/dist/extensions/mcp/cli.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.lazy.js +3 -0
- package/dist/extensions/mcp/cli.lazy.js.map +1 -0
- package/dist/extensions/mcp/client/auth-provider.d.ts +15 -0
- package/dist/extensions/mcp/client/auth-provider.d.ts.map +1 -0
- package/dist/extensions/mcp/client/auth-provider.js +2 -0
- package/dist/extensions/mcp/client/auth-provider.js.map +1 -0
- package/dist/extensions/mcp/client/client.d.ts +89 -0
- package/dist/extensions/mcp/client/client.d.ts.map +1 -0
- package/dist/extensions/mcp/client/client.js +457 -0
- package/dist/extensions/mcp/client/client.js.map +1 -0
- package/dist/extensions/mcp/client/index.d.ts +9 -0
- package/dist/extensions/mcp/client/index.d.ts.map +1 -0
- package/dist/extensions/mcp/client/index.js +7 -0
- package/dist/extensions/mcp/client/index.js.map +1 -0
- package/dist/extensions/mcp/client/oauth/callback.d.ts +42 -0
- package/dist/extensions/mcp/client/oauth/callback.d.ts.map +1 -0
- package/dist/extensions/mcp/client/oauth/callback.js +106 -0
- package/dist/extensions/mcp/client/oauth/callback.js.map +1 -0
- package/dist/extensions/mcp/client/oauth/discovery.d.ts +27 -0
- package/dist/extensions/mcp/client/oauth/discovery.d.ts.map +1 -0
- package/dist/extensions/mcp/client/oauth/discovery.js +153 -0
- package/dist/extensions/mcp/client/oauth/discovery.js.map +1 -0
- package/dist/extensions/mcp/client/oauth/errors.d.ts +24 -0
- package/dist/extensions/mcp/client/oauth/errors.d.ts.map +1 -0
- package/dist/extensions/mcp/client/oauth/errors.js +46 -0
- package/dist/extensions/mcp/client/oauth/errors.js.map +1 -0
- package/dist/extensions/mcp/client/oauth/flow.d.ts +82 -0
- package/dist/extensions/mcp/client/oauth/flow.d.ts.map +1 -0
- package/dist/extensions/mcp/client/oauth/flow.js +292 -0
- package/dist/extensions/mcp/client/oauth/flow.js.map +1 -0
- package/dist/extensions/mcp/client/oauth/index.d.ts +7 -0
- package/dist/extensions/mcp/client/oauth/index.d.ts.map +1 -0
- package/dist/extensions/mcp/client/oauth/index.js +6 -0
- package/dist/extensions/mcp/client/oauth/index.js.map +1 -0
- package/dist/extensions/mcp/client/oauth/provider.d.ts +59 -0
- package/dist/extensions/mcp/client/oauth/provider.d.ts.map +1 -0
- package/dist/extensions/mcp/client/oauth/provider.js +116 -0
- package/dist/extensions/mcp/client/oauth/provider.js.map +1 -0
- package/dist/extensions/mcp/client/oauth/types.d.ts +77 -0
- package/dist/extensions/mcp/client/oauth/types.d.ts.map +1 -0
- package/dist/extensions/mcp/client/oauth/types.js +109 -0
- package/dist/extensions/mcp/client/oauth/types.js.map +1 -0
- package/dist/extensions/mcp/client/protocol/content.d.ts +82 -0
- package/dist/extensions/mcp/client/protocol/content.d.ts.map +1 -0
- package/dist/extensions/mcp/client/protocol/content.js +41 -0
- package/dist/extensions/mcp/client/protocol/content.js.map +1 -0
- package/dist/extensions/mcp/client/protocol/jsonrpc.d.ts +59 -0
- package/dist/extensions/mcp/client/protocol/jsonrpc.d.ts.map +1 -0
- package/dist/extensions/mcp/client/protocol/jsonrpc.js +67 -0
- package/dist/extensions/mcp/client/protocol/jsonrpc.js.map +1 -0
- package/dist/extensions/mcp/client/protocol/types.d.ts +123 -0
- package/dist/extensions/mcp/client/protocol/types.d.ts.map +1 -0
- package/dist/extensions/mcp/client/protocol/types.js +7 -0
- package/dist/extensions/mcp/client/protocol/types.js.map +1 -0
- package/dist/extensions/mcp/client/testing/index.d.ts +2 -0
- package/dist/extensions/mcp/client/testing/index.d.ts.map +1 -0
- package/dist/extensions/mcp/client/testing/index.js +2 -0
- package/dist/extensions/mcp/client/testing/index.js.map +1 -0
- package/dist/extensions/mcp/client/transports/in-memory.d.ts +19 -0
- package/dist/extensions/mcp/client/transports/in-memory.d.ts.map +1 -0
- package/dist/extensions/mcp/client/transports/in-memory.js +50 -0
- package/dist/extensions/mcp/client/transports/in-memory.js.map +1 -0
- package/dist/extensions/mcp/client/transports/stdio.d.ts +32 -0
- package/dist/extensions/mcp/client/transports/stdio.d.ts.map +1 -0
- package/dist/extensions/mcp/client/transports/stdio.js +201 -0
- package/dist/extensions/mcp/client/transports/stdio.js.map +1 -0
- package/dist/extensions/mcp/client/transports/streamable-http.d.ts +96 -0
- package/dist/extensions/mcp/client/transports/streamable-http.d.ts.map +1 -0
- package/dist/extensions/mcp/client/transports/streamable-http.js +456 -0
- package/dist/extensions/mcp/client/transports/streamable-http.js.map +1 -0
- package/dist/extensions/mcp/client/transports/transport.d.ts +28 -0
- package/dist/extensions/mcp/client/transports/transport.d.ts.map +1 -0
- package/dist/extensions/mcp/client/transports/transport.js +38 -0
- package/dist/extensions/mcp/client/transports/transport.js.map +1 -0
- package/dist/extensions/mcp/config.d.ts +72 -0
- package/dist/extensions/mcp/config.d.ts.map +1 -0
- package/dist/extensions/mcp/config.js +158 -0
- package/dist/extensions/mcp/config.js.map +1 -0
- package/dist/extensions/mcp/index.d.ts +76 -0
- package/dist/extensions/mcp/index.d.ts.map +1 -0
- package/dist/extensions/mcp/index.js +1119 -0
- package/dist/extensions/mcp/index.js.map +1 -0
- package/dist/extensions/mcp/log.d.ts +16 -0
- package/dist/extensions/mcp/log.d.ts.map +1 -0
- package/dist/extensions/mcp/log.js +66 -0
- package/dist/extensions/mcp/log.js.map +1 -0
- package/dist/extensions/mcp/oauth.d.ts +103 -0
- package/dist/extensions/mcp/oauth.d.ts.map +1 -0
- package/dist/extensions/mcp/oauth.js +382 -0
- package/dist/extensions/mcp/oauth.js.map +1 -0
- package/dist/extensions/mcp/resources.d.ts +43 -0
- package/dist/extensions/mcp/resources.d.ts.map +1 -0
- package/dist/extensions/mcp/resources.js +262 -0
- package/dist/extensions/mcp/resources.js.map +1 -0
- package/dist/extensions/mcp/runtime.d.ts +104 -0
- package/dist/extensions/mcp/runtime.d.ts.map +1 -0
- package/dist/extensions/mcp/runtime.js +546 -0
- package/dist/extensions/mcp/runtime.js.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts +3 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.js +3 -0
- package/dist/extensions/mcp/runtime.lazy.js.map +1 -0
- package/dist/extensions/mcp/tools.d.ts +84 -0
- package/dist/extensions/mcp/tools.d.ts.map +1 -0
- package/dist/extensions/mcp/tools.js +251 -0
- package/dist/extensions/mcp/tools.js.map +1 -0
- package/dist/extensions/mcp/ui.d.ts +60 -0
- package/dist/extensions/mcp/ui.d.ts.map +1 -0
- package/dist/extensions/mcp/ui.js +175 -0
- package/dist/extensions/mcp/ui.js.map +1 -0
- package/dist/extensions/tool-search/tool.d.ts +1 -1
- package/dist/extensions/tool-search/tool.d.ts.map +1 -1
- package/dist/extensions/tool-search/tool.js +3 -13
- package/dist/extensions/tool-search/tool.js.map +1 -1
- package/dist/index-extensions.d.ts +2 -1
- package/dist/index-extensions.d.ts.map +1 -1
- package/dist/index-extensions.js +1 -1
- package/dist/index-extensions.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +7 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +27 -3
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js +39 -6
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/docs/extensions/api-reference.md +3 -3
- package/docs/extensions/events.md +2 -0
- package/docs/extensions.md +8 -8
- package/docs/mcp-servers.md +171 -50
- package/docs/packages/authoring.md +2 -2
- package/docs/providers.md +8 -0
- package/docs/sdk/reference.md +16 -0
- package/docs/sdk.md +67 -1
- package/docs/settings.md +2 -0
- package/docs/tools.md +6 -0
- package/docs/workflows/operations.md +3 -1
- package/examples/extensions/built-in-tool-renderer.ts +16 -40
- package/examples/extensions/minimal-mode.ts +28 -108
- package/npm-shrinkwrap.json +69 -69
- package/package.json +8 -8
- package/dist/builtin/mcp/app-bridge.bundle.js +0 -67
- package/dist/builtin/mcp/xdg-open +0 -1267
|
@@ -1,388 +1,101 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="banner.png" alt="pi-mcp-adapter" width="1100">
|
|
3
|
-
</p>
|
|
1
|
+
# Atomic MCP
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
Atomic's bundled [Model Context Protocol](https://modelcontextprotocol.io) support connects to servers over stdio and streamable HTTP. It provides a server manager, shell commands, OAuth, codemode and deferred tool discovery, direct tools, and standard resource tools. No separate installation is needed with Atomic.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
See the [MCP servers guide](../coding-agent/docs/mcp-servers.md) for configuration and [OAuth](OAUTH.md) for authentication.
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
## Quick setup
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
But the MCP ecosystem has useful stuff - databases, browsers, APIs. This adapter gives you access without the bloat. One proxy tool (~200 tokens) instead of hundreds. The agent discovers what it needs on-demand. Servers only start when you actually use them.
|
|
18
|
-
|
|
19
|
-
## Install
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
pi install npm:pi-mcp-adapter
|
|
9
|
+
```sh
|
|
10
|
+
atomic mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem .
|
|
11
|
+
atomic mcp add docs --url https://example.com/mcp
|
|
12
|
+
atomic mcp list
|
|
13
|
+
atomic
|
|
23
14
|
```
|
|
24
15
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## What happens on first run
|
|
28
|
-
|
|
29
|
-
The adapter reads standard MCP files automatically. No extra setup needed if you already have them.
|
|
30
|
-
|
|
31
|
-
| You already have... | What happens |
|
|
32
|
-
|---------------------|--------------|
|
|
33
|
-
| `.mcp.json` or `~/.config/mcp/mcp.json` | Pi uses it immediately. The first time you open `/mcp`, you'll see a short heads-up explaining which file Pi detected and that Pi only writes adapter-specific overrides to its own files. |
|
|
34
|
-
| Host-specific configs (Claude Code, Codex, etc.) but no standard MCP files | Run `/mcp setup` to adopt those host configs into Pi. The setup flow shows exactly what it found, lets you pick which ones to import, and previews the exact file changes before writing. |
|
|
35
|
-
| Nothing configured yet | Run `/mcp setup` to scaffold a minimal `.mcp.json`, quick-add RepoPrompt, or inspect what the adapter discovered on your machine. |
|
|
16
|
+
Commands write `~/.atomic/agent/mcp.json` by default. Add `--local` (`-l`) to use `.atomic/mcp.json` in the current project. Project servers are read only after project trust is granted; a project entry replaces a user-level entry of the same name.
|
|
36
17
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## Quick Start
|
|
40
|
-
|
|
41
|
-
Preferred project config: `.mcp.json`
|
|
18
|
+
Both files use this shape:
|
|
42
19
|
|
|
43
20
|
```json
|
|
44
21
|
{
|
|
45
22
|
"mcpServers": {
|
|
46
|
-
"
|
|
23
|
+
"filesystem": {
|
|
47
24
|
"command": "npx",
|
|
48
|
-
"args": ["-y", "
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Preferred user-global shared config: `~/.config/mcp/mcp.json`
|
|
55
|
-
|
|
56
|
-
Pi also reads Pi-owned override files for settings and host-specific compatibility:
|
|
57
|
-
|
|
58
|
-
- `<Pi agent dir>/mcp.json` — Pi global override (`~/.pi/agent/mcp.json` by default)
|
|
59
|
-
- `.pi/mcp.json` — Pi project override
|
|
60
|
-
|
|
61
|
-
Precedence is:
|
|
62
|
-
|
|
63
|
-
1. `~/.config/mcp/mcp.json`
|
|
64
|
-
2. `<Pi agent dir>/mcp.json`
|
|
65
|
-
3. `.mcp.json`
|
|
66
|
-
4. `.pi/mcp.json`
|
|
67
|
-
|
|
68
|
-
Servers are **lazy by default** — they won't connect until you actually call one of their tools. The adapter caches tool metadata so search and describe work without live connections when a valid cache exists; on a cold cache, explicit proxy search/describe/server-list requests may connect lazy server(s) once to hydrate metadata on demand. `describe` narrows cold-cache hydration to an explicitly requested server or the server identified by the configured tool-name prefix before falling back to broader discovery. Unscoped `search` intentionally hydrates every configured lazy server that lacks cached metadata so the search can see all available tools.
|
|
69
|
-
|
|
70
|
-
MCP startup and first-use calls share one initialization attempt per session. If background initialization fails, the next proxy, direct-tool, `/mcp`, or `/mcp-auth` use retries it; concurrent callers join that retry rather than starting duplicates, and a stale attempt cannot publish after session shutdown or context disposal. Replacement sessions normally wait for retired initialization, state, and OAuth cleanup; teardown uses a finite deadline so a non-abortable SDK producer cannot permanently block later sessions, while late settlement stays observed and fenced from publication. Shared lazy server connections and auto-authentication flows use the same caller-local cancellation rule: a pre-cancelled call starts nothing, while cancelling one waiter promptly rejects that call with its exact host reason without cancelling the producer needed by surviving callers. Session restart/shutdown deterministically rejects retired OAuth callers with retry guidance and clears old ownership before replacement authentication begins. Direct tools, proxy modes, metadata hydration, and readiness-critical commands revalidate the exact session lease after lifecycle-spanning waits and before SDK calls or state mutation; a UI runtime produced after caller cancellation is closed rather than orphaned. Direct and proxy resource/tool requests still forward the call's abort signal to the MCP SDK; protocol-level remote cancellation remains advisory.
|
|
71
|
-
|
|
72
|
-
Await SDK session disposal even when MCP initialization is still pending. If an unpublished candidate fails cleanup, disposal rejects with `ShutdownFailed` and retains that cause; cancellation is not treated as successful resource release. Other owned cleanup, including OAuth cleanup, is still attempted.
|
|
73
|
-
|
|
74
|
-
For MCP Apps tools, host cancellation sends one terminal `tool-cancelled` event after tool input and before session teardown, then rejects with the exact host abort reason even when the SDK wraps cancellation or the browser notification fails. A successful `tool-result` is mutually exclusive with that cancellation event. Non-UI tools and resource reads do not participate in the Apps lifecycle.
|
|
75
|
-
|
|
76
|
-
```
|
|
77
|
-
mcp({ search: "screenshot" })
|
|
78
|
-
```
|
|
79
|
-
```
|
|
80
|
-
chrome_devtools_take_screenshot
|
|
81
|
-
Take a screenshot of the page or element.
|
|
82
|
-
|
|
83
|
-
Parameters:
|
|
84
|
-
format (enum: "png", "jpeg", "webp") [default: "png"]
|
|
85
|
-
fullPage (boolean) - Full page instead of viewport
|
|
86
|
-
```
|
|
87
|
-
```
|
|
88
|
-
mcp({ tool: "chrome_devtools_take_screenshot", args: '{"format": "png"}' })
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Note: `args` is a JSON string, not an object.
|
|
92
|
-
|
|
93
|
-
Two calls instead of 26 tools cluttering the context.
|
|
94
|
-
|
|
95
|
-
## Config
|
|
96
|
-
|
|
97
|
-
### File Layout
|
|
98
|
-
|
|
99
|
-
Use the shared MCP files when you want one setup to work across hosts, and Pi-owned files when you need Pi-specific overrides or settings.
|
|
100
|
-
|
|
101
|
-
| File | Purpose |
|
|
102
|
-
|------|---------|
|
|
103
|
-
| `~/.config/mcp/mcp.json` | User-global shared MCP config |
|
|
104
|
-
| `.mcp.json` | Project-local shared MCP config |
|
|
105
|
-
| `<Pi agent dir>/mcp.json` | Pi global override and compatibility imports (`~/.pi/agent/mcp.json` by default) |
|
|
106
|
-
| `.pi/mcp.json` | Pi project override |
|
|
107
|
-
|
|
108
|
-
Pi-specific files are the write targets for imported or shared global servers when Pi needs to persist adapter-only settings such as `directTools`.
|
|
109
|
-
|
|
110
|
-
### Server Options
|
|
111
|
-
|
|
112
|
-
```json
|
|
113
|
-
{
|
|
114
|
-
"mcpServers": {
|
|
115
|
-
"my-server": {
|
|
116
|
-
"command": "npx",
|
|
117
|
-
"args": ["-y", "some-mcp-server"],
|
|
118
|
-
"lifecycle": "lazy",
|
|
119
|
-
"idleTimeout": 10,
|
|
120
|
-
"timeoutMs": 30000
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
| Field | Description |
|
|
127
|
-
|-------|-------------|
|
|
128
|
-
| `command` | Executable for stdio transport |
|
|
129
|
-
| `args` | Command arguments |
|
|
130
|
-
| `env` | Environment variables; supports `${VAR}` and `$env:VAR` interpolation |
|
|
131
|
-
| `cwd` | Working directory; supports `${VAR}`, `$env:VAR`, and `~` expansion |
|
|
132
|
-
| `url` | HTTP(S) endpoint (StreamableHTTP with SSE fallback); supports `${VAR}` and `$env:VAR` interpolation. Unset variables become empty strings; an empty or invalid resolved endpoint is rejected before connecting. |
|
|
133
|
-
| `headers` | HTTP headers; supports `${VAR}` and `$env:VAR` interpolation |
|
|
134
|
-
| `auth` | `"bearer"` or `"oauth"` |
|
|
135
|
-
| `oauth.grantType` | `"authorization_code"` (default) or `"client_credentials"` for non-interactive machine auth |
|
|
136
|
-
| `bearerToken` / `bearerTokenEnv` | Token or env var name; `bearerToken` supports `${VAR}` and `$env:VAR` interpolation |
|
|
137
|
-
| `lifecycle` | `"lazy"` (default), `"eager"`, or `"keep-alive"` |
|
|
138
|
-
| `idleTimeout` | Minutes before idle disconnect (overrides global) |
|
|
139
|
-
| `timeoutMs` | Per-tool-call inactivity timeout in milliseconds for local or remote servers; omit to use the MCP SDK default |
|
|
140
|
-
| `exposeResources` | Expose MCP resources as tools (default: true) |
|
|
141
|
-
| `directTools` | `true`, `string[]`, or `false` — register tools individually instead of through proxy |
|
|
142
|
-
| `excludeTools` | `string[]` of tool names to hide (matches original names like `get_screenshot` and prefixed names like `figma_get_screenshot`) |
|
|
143
|
-
| `debug` | Show server stderr (default: false) |
|
|
144
|
-
| `disabled` | `true` removes the server from the effective config; `{ "disabled": true }` alone turns off a server contributed by a package or extension |
|
|
145
|
-
|
|
146
|
-
`timeoutMs` is an **inactivity timeout**, not a total wall-clock limit. Each MCP progress notification resets the timer, so a tool that continues reporting progress can run indefinitely. The value must be a finite number greater than zero; invalid values produce a configuration error when the MCP config loads.
|
|
147
|
-
|
|
148
|
-
### Lifecycle Modes
|
|
149
|
-
|
|
150
|
-
- **`lazy`** (default) — Don't connect at startup. Connect on first tool call or explicit cold-cache proxy metadata request (`search`, `describe`, or `server` list). Disconnect after idle timeout. Cached metadata keeps search/list working without connections.
|
|
151
|
-
- **`eager`** — Connect at startup but don't auto-reconnect if the connection drops. No idle timeout by default (set `idleTimeout` explicitly to enable).
|
|
152
|
-
- **`keep-alive`** — Connect at startup. Auto-reconnect via health checks. No idle timeout. Use for servers you always need available.
|
|
153
|
-
|
|
154
|
-
### Settings
|
|
155
|
-
|
|
156
|
-
```json
|
|
157
|
-
{
|
|
158
|
-
"settings": {
|
|
159
|
-
"toolPrefix": "server",
|
|
160
|
-
"idleTimeout": 10
|
|
161
|
-
},
|
|
162
|
-
"mcpServers": { }
|
|
163
|
-
}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
| Setting | Description |
|
|
167
|
-
|---------|-------------|
|
|
168
|
-
| `toolPrefix` | `"server"` (default), `"short"` (strips `-mcp` suffix), or `"none"` |
|
|
169
|
-
| `idleTimeout` | Global idle timeout in minutes (default: 10, 0 to disable) |
|
|
170
|
-
| `directTools` | Global default for all servers (default: false). Per-server overrides this. |
|
|
171
|
-
| `disableProxyTool` | Hide the `mcp` proxy tool once configured direct tools are fully available from cache. |
|
|
172
|
-
| `autoAuth` | Auto-run OAuth on `connect`/tool calls when a server needs auth, then retry once (default: false). |
|
|
173
|
-
| `sampling` | Allow MCP servers to sample through Pi models, honoring `modelPreferences.hints` before current/default fallback (default: true when UI approval is available). |
|
|
174
|
-
| `samplingAutoApprove` | Skip sampling confirmation prompts. Required for sampling in non-UI sessions (default: false). |
|
|
175
|
-
|
|
176
|
-
Per-server `idleTimeout` overrides the global setting.
|
|
177
|
-
|
|
178
|
-
### Direct Tools
|
|
179
|
-
|
|
180
|
-
By default, all MCP tools are accessed through the single `mcp` proxy tool. This keeps context small but means the LLM has to discover MCP tools via proxy search. If you want specific tools to show up directly in the agent's tool list — alongside `read`, `bash`, `edit`, etc. — add `directTools` to your config.
|
|
181
|
-
|
|
182
|
-
Per-server:
|
|
183
|
-
|
|
184
|
-
```json
|
|
185
|
-
{
|
|
186
|
-
"mcpServers": {
|
|
187
|
-
"chrome-devtools": {
|
|
188
|
-
"command": "npx",
|
|
189
|
-
"args": ["-y", "chrome-devtools-mcp@latest"],
|
|
190
|
-
"directTools": true
|
|
25
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
|
|
191
26
|
},
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
"
|
|
195
|
-
"directTools": ["search_repositories", "get_file_contents"]
|
|
196
|
-
},
|
|
197
|
-
"huge-server": {
|
|
198
|
-
"command": "npx",
|
|
199
|
-
"args": ["-y", "mega-mcp@latest"]
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
| Value | Behavior |
|
|
206
|
-
|-------|----------|
|
|
207
|
-
| `true` | Register all tools from this server as individual Pi tools |
|
|
208
|
-
| `["tool_a", "tool_b"]` | Register only these tools (use original MCP names) |
|
|
209
|
-
| Omitted or `false` | Proxy only (default) |
|
|
210
|
-
|
|
211
|
-
To set a global default for all servers:
|
|
212
|
-
|
|
213
|
-
```json
|
|
214
|
-
{
|
|
215
|
-
"settings": {
|
|
216
|
-
"directTools": true
|
|
217
|
-
},
|
|
218
|
-
"mcpServers": {
|
|
219
|
-
"huge-server": {
|
|
220
|
-
"directTools": false
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
Per-server `directTools` overrides the global setting. The example above registers direct tools for every server except `huge-server`.
|
|
227
|
-
|
|
228
|
-
To exclude specific tools while still using `directTools: true`, add `excludeTools` on the server:
|
|
229
|
-
|
|
230
|
-
```json
|
|
231
|
-
{
|
|
232
|
-
"mcpServers": {
|
|
233
|
-
"figma": {
|
|
234
|
-
"url": "http://localhost:3845/mcp",
|
|
235
|
-
"directTools": true,
|
|
236
|
-
"excludeTools": ["get_figjam", "figma_get_code_connect_map"]
|
|
27
|
+
"docs": {
|
|
28
|
+
"url": "https://example.com/mcp",
|
|
29
|
+
"description": "Search and read the product documentation"
|
|
237
30
|
}
|
|
238
31
|
}
|
|
239
32
|
}
|
|
240
33
|
```
|
|
241
34
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
Each direct tool costs ~150-300 tokens in the system prompt (name + description + schema). Good for targeted sets of 5-20 tools. For servers with 75+ tools, stick with the proxy or pick specific tools with a `string[]`.
|
|
245
|
-
|
|
246
|
-
Direct tools register from the metadata cache in the Pi agent dir (`~/.pi/agent/mcp-cache.json` by default, or `$PI_CODING_AGENT_DIR/mcp-cache.json` when set), so no server connections are needed at startup when the cache is warm. On the first session after adding `directTools` to a new server, or when a child/subagent selects tools, the cache may not exist yet — tools fall back to proxy-only while the selected/configured direct-tool servers populate in the background, then the extension refreshes tool registration so the warmed direct tools become available in the current session. To force it immediately: `/mcp reconnect <server>`.
|
|
247
|
-
|
|
248
|
-
In-process subagents receive direct-tool selection through the typed admission policy rather than an environment bridge. An omitted `mcpDirectTools` field preserves the session's MCP configuration defaults, a list selects exactly those server/tool names, and an empty list explicitly disables direct tools. The legacy environment override is removed; parent sessions should use MCP configuration instead.
|
|
249
|
-
|
|
250
|
-
When you change direct-tool toggles in `/mcp` or write new config through `/mcp setup`, the extension triggers Pi's normal reload flow automatically. That refreshes extensions, prompts, skills, and MCP tool registration in one shot, so newly configured direct tools can appear without a manual restart.
|
|
251
|
-
|
|
252
|
-
**Interactive configuration:** Run `/mcp` to open an interactive panel showing all servers with connection status, tools, and direct/proxy toggles. You can reconnect servers and toggle tools between direct and proxy from the same overlay. For OAuth, press Enter on a server that needs auth or `ctrl+a` on any OAuth server.
|
|
253
|
-
|
|
254
|
-
**Guided first-run setup:** Run `/mcp setup` to inspect detected shared MCP files, adopt compatibility imports from other hosts, open discovered config paths, preview exact before/after file diffs for writes, scaffold a minimal project `.mcp.json`, or quick-add RepoPrompt into a standard/shared MCP file.
|
|
255
|
-
|
|
256
|
-
**Subagent integration:** If you use the subagent extension, agents can request direct MCP tools in their frontmatter with `mcp:server-name` syntax. See the subagent README for details.
|
|
257
|
-
|
|
258
|
-
### MCP UI Integration
|
|
259
|
-
|
|
260
|
-
MCP servers can ship interactive UIs via the [MCP UI](https://github.com/MCP-UI-Org/mcp-ui) standard. When you call a tool that has a UI resource, the adapter opens it in a native macOS window via [Glimpse](https://github.com/hazat/glimpse) if available, otherwise falls back to the browser.
|
|
261
|
-
|
|
262
|
-
**How it works:**
|
|
263
|
-
|
|
264
|
-
1. Agent calls a tool like `launch_dashboard`
|
|
265
|
-
2. The tool's metadata includes `_meta.ui.resourceUri` pointing to a UI resource
|
|
266
|
-
3. pi-mcp-adapter fetches the UI HTML and opens it in an iframe
|
|
267
|
-
4. The UI can call MCP tools and send messages back to the agent
|
|
268
|
-
|
|
269
|
-
**Native rendering:** On macOS, if [Glimpse](https://github.com/hazat/glimpse) is installed (`pi install npm:glimpseui`), UIs open in a native WKWebView window instead of a browser tab. Set `MCP_UI_VIEWER=browser` to force the browser, or `MCP_UI_VIEWER=glimpse` to require native rendering.
|
|
270
|
-
|
|
271
|
-
**Bidirectional communication:** The UI talks back. When it sends a prompt or intent, the message is stored and `triggerTurn()` wakes the agent. The agent retrieves messages via `mcp({ action: "ui-messages" })` and responds, enabling conversational UIs where the app and agent collaborate in real-time.
|
|
35
|
+
## Commands
|
|
272
36
|
|
|
273
|
-
|
|
37
|
+
Run `/mcp` to inspect connection state, tools, exposure, source, and errors. Select a server to sign in or out, reconnect, change exposure, or enable and disable it. File-backed changes are saved to the defining file; extension-server changes apply only to the session. Run `/reload` or restart Atomic after editing configuration outside the session.
|
|
274
38
|
|
|
275
|
-
|
|
39
|
+
| Session command | Action |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `/mcp` | Open the manager, or show status outside the TUI. |
|
|
42
|
+
| `/mcp login [server]` | Sign in with OAuth. |
|
|
43
|
+
| `/mcp logout [server]` | Remove stored OAuth credentials. |
|
|
44
|
+
| `/mcp reconnect [server]` | Reconnect one server and refresh tools. |
|
|
276
45
|
|
|
277
|
-
|
|
278
|
-
|------|---------|
|
|
279
|
-
| `prompt` | User message that triggers an agent response |
|
|
280
|
-
| `intent` | Structured action with name + params |
|
|
281
|
-
| `notify` | Fire-and-forget notification |
|
|
282
|
-
| `message` | Generic message payload |
|
|
283
|
-
| (custom) | Any other type forwarded as intent |
|
|
46
|
+
Completion suggests actions and eligible server names. Omitting the name selects an eligible server when unambiguous, otherwise opens a picker. Session login requires an interactive UI. If the browser is on another machine, paste its complete redirected URL into the waiting sign-in prompt.
|
|
284
47
|
|
|
285
|
-
|
|
48
|
+
Shell commands work without a session and do not load extensions:
|
|
286
49
|
|
|
50
|
+
```sh
|
|
51
|
+
atomic mcp add <server> [options] -- <command> [args...]
|
|
52
|
+
atomic mcp add <server> [options] --url <url>
|
|
53
|
+
atomic mcp remove <server> [-l]
|
|
54
|
+
atomic mcp list [--json]
|
|
55
|
+
atomic mcp login <server> [--timeout <seconds>]
|
|
56
|
+
atomic mcp logout <server>
|
|
287
57
|
```
|
|
288
|
-
mcp({ action: "ui-messages" })
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
Returns accumulated messages from UI sessions. Each message includes `type`, `sessionId`, `serverName`, `toolName`, and `timestamp`. Prompt messages include `prompt`, intent messages include `intent` and `params`.
|
|
292
|
-
|
|
293
|
-
**Browser controls:**
|
|
294
|
-
|
|
295
|
-
- **CMD/CTRL+Enter** — Complete and close
|
|
296
|
-
- **Escape** — Cancel and close
|
|
297
|
-
- **Done/Cancel buttons** — Same as keyboard shortcuts
|
|
298
|
-
|
|
299
|
-
**Technical notes:**
|
|
300
58
|
|
|
301
|
-
|
|
302
|
-
- Works with both stdio and HTTP MCP servers
|
|
303
|
-
- Uses a local 408KB AppBridge bundle (MCP SDK + Zod) for browser↔server communication
|
|
59
|
+
`list` connects to enabled servers and exits with status 1 for invalid entries or an enabled server that is not connected. Shell login opens the browser and waits up to 300 seconds by default. Run `atomic mcp --help` for all options.
|
|
304
60
|
|
|
305
|
-
|
|
61
|
+
## Configuration
|
|
306
62
|
|
|
307
|
-
|
|
63
|
+
Stdio uses `command`, `args`, `env`, and `cwd`. HTTP uses `url`, `headers`, and `oauth`. URLs support `${NAME}` and `$env:NAME` environment references, resolved in memory before validation without rewriting files. `env`, `headers`, and `oauth.clientSecret` support `${NAME}` references and whole-value `!command` expressions. Only use commands from configuration you trust.
|
|
308
64
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
65
|
+
| Setting | Meaning |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `description` | Short summary used in discovery and the system prompt. |
|
|
68
|
+
| `timeout` | Inactivity timeout in seconds, default 60. Progress resets it. |
|
|
69
|
+
| `enabled: false` | Keep the server listed without connecting. |
|
|
70
|
+
| `exposure` | `codemode`, `deferred`, `direct`, or `hidden`. |
|
|
71
|
+
| `toolExposure` | Per-tool overrides, with exact names or `*` patterns. |
|
|
314
72
|
|
|
315
|
-
|
|
73
|
+
Package and extension contributions use the same server shape and sit below file-configured servers. `ATOMIC_CODING_AGENT_DIR` relocates the Atomic agent directory.
|
|
316
74
|
|
|
317
|
-
|
|
75
|
+
## Tools and resources
|
|
318
76
|
|
|
319
|
-
|
|
77
|
+
Tools use names such as `mcp__github__search_code`. Collisions after identifier normalization receive deterministic hash suffixes. Call names returned by discovery instead of constructing them.
|
|
320
78
|
|
|
321
|
-
|
|
322
|
-
{
|
|
323
|
-
"imports": ["claude-code", "claude-desktop"],
|
|
324
|
-
"mcpServers": { }
|
|
325
|
-
}
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
Supported compatibility imports: `claude-code`, `claude-desktop`, `vscode`, `windsurf`, `codex`
|
|
79
|
+
The default exposure is `codemode`: scripts discover tools through `searchTools()`, `describeTool()`, and `ALL_TOOLS`, then call them. `deferred` tools become declared after `tool_search` loads a match. `direct` tools are declared immediately; `hidden` tools are unreachable. `toolExposure` overrides the server's default. Exact names win over patterns; among patterns, the first match wins.
|
|
329
80
|
|
|
330
|
-
|
|
81
|
+
Atomic activates codemode for codemode servers and tool search for deferred servers. Set `"autoEnableCodemode": false` beside `mcpServers` to prevent automatic codemode activation. A project value overrides the user-level value. Scripts read server instructions with `describeNamespace("mcp__github")`.
|
|
331
82
|
|
|
332
|
-
|
|
83
|
+
Enabled servers connect in the background. The first prompt waits up to 10 seconds for direct-tool servers. Discovery and calls wait for the servers they need. Dropped connections reconnect on the next call, and tool-list notifications update registrations.
|
|
333
84
|
|
|
334
|
-
|
|
85
|
+
The resource tools are `list_mcp_resources`, `list_mcp_resource_templates`, and `read_mcp_resource`. They reach enabled, non-hidden resource servers. Text and image resources are returned directly; other binary content is saved to temporary files. MCP Apps UI resources are omitted because Atomic does not render them.
|
|
335
86
|
|
|
336
|
-
|
|
87
|
+
MCP calls pass through Atomic's permission pipeline, including nested calls from codemode. Scripts receive the full MCP result. Model-facing text over 20 KB is shortened, with its full text saved to a temporary file named in the result.
|
|
337
88
|
|
|
338
|
-
|
|
339
|
-
|------|---------|
|
|
340
|
-
| Status | `mcp({ })` |
|
|
341
|
-
| List server | `mcp({ server: "name" })` |
|
|
342
|
-
| Search | `mcp({ search: "screenshot navigate" })` |
|
|
343
|
-
| Describe | `mcp({ describe: "tool_name" })` |
|
|
344
|
-
| Call | `mcp({ tool: "...", args: '{"key": "value"}' })` |
|
|
345
|
-
| Connect | `mcp({ connect: "server-name" })` |
|
|
346
|
-
| UI messages | `mcp({ action: "ui-messages" })` |
|
|
89
|
+
## Authentication
|
|
347
90
|
|
|
348
|
-
|
|
91
|
+
Run `/mcp login <server>`, choose **Sign in** in the manager, or run `atomic mcp login <server>`. HTTP servers without an `Authorization` header or provider-token configuration use OAuth when challenged. Atomic registers as `atomic` and stores credentials in `~/.atomic/agent/mcp-auth.json`.
|
|
349
92
|
|
|
350
|
-
|
|
93
|
+
OAuth options include `clientId`, `clientSecret`, `scope`, `clientName`, `callbackPort`, `callbackUrl`, and `authServerMetadataUrl`. See [OAuth](OAUTH.md) for examples and troubleshooting.
|
|
351
94
|
|
|
352
|
-
|
|
95
|
+
An HTTP server may instead set `"auth": { "provider": "radius" }` to use the current `/login radius` token. This is allowed only in global configuration and extension registrations, not project files or package manifests. HTTPS is required except on loopback hosts, and credentials are sent only to the configured origin.
|
|
353
96
|
|
|
354
|
-
|
|
97
|
+
## Native configuration only
|
|
355
98
|
|
|
356
|
-
|
|
99
|
+
The old adapter has been replaced by the native client. Only `~/.atomic/agent/mcp.json` and trusted `.atomic/mcp.json` files are read. Shared configuration files, client imports, old-field translations, and imports of old OAuth credential files are not supported. Sign in through the native client.
|
|
357
100
|
|
|
358
|
-
|
|
359
|
-
|---------|--------------|
|
|
360
|
-
| `/mcp` | Interactive panel and first-run onboarding surface |
|
|
361
|
-
| `/mcp setup` | Guided setup for imports, a minimal `.mcp.json`, RepoPrompt quick-add, and config-path inspection |
|
|
362
|
-
| `/mcp tools` | List all tools |
|
|
363
|
-
| `/mcp reconnect` | Reconnect all servers |
|
|
364
|
-
| `/mcp reconnect <server>` | Connect or reconnect a single server |
|
|
365
|
-
| `/mcp logout <server>` | Clear stored OAuth credentials for a server and disconnect it |
|
|
366
|
-
| `/mcp-auth` | Open an OAuth server picker in interactive UI sessions |
|
|
367
|
-
| `/mcp-auth <server>` | OAuth setup for a specific server |
|
|
368
|
-
|
|
369
|
-
If `settings.autoAuth` is `true`, `mcp({ connect: ... })`, `mcp({ tool: ... })`, and direct tool calls automatically run OAuth when needed and retry once.
|
|
370
|
-
|
|
371
|
-
In interactive sessions, you can also authenticate from `/mcp` with `CTRL+A` or Enter on a server that needs auth. In non-interactive sessions, browser-based OAuth still requires `/mcp-auth <server>`. `/mcp-auth` without a server only opens a picker in the interactive UI.
|
|
372
|
-
|
|
373
|
-
## How It Works
|
|
374
|
-
|
|
375
|
-
- One `mcp` tool in context (~200 tokens) instead of hundreds
|
|
376
|
-
- Servers are lazy by default — they connect on first tool call or explicit cold-cache proxy metadata request, not at startup
|
|
377
|
-
- Tool metadata is cached to disk so search/list/describe work without live connections when the cache is valid; cold-cache explicit search/describe/server-list requests hydrate metadata on demand
|
|
378
|
-
- Idle servers disconnect after 10 minutes (configurable), reconnect automatically on next use
|
|
379
|
-
- npx-based servers resolve to direct binary paths, skipping the ~143 MB npm parent process
|
|
380
|
-
- MCP server validates arguments, not the adapter
|
|
381
|
-
- Keep-alive servers get health checks and auto-reconnect
|
|
382
|
-
- Specific tools can be promoted from the proxy to first-class Pi tools via `directTools` config, so the LLM sees them directly instead of having to search
|
|
383
|
-
|
|
384
|
-
## Limitations
|
|
385
|
-
|
|
386
|
-
- Cross-session server sharing not yet implemented (each Pi session runs its own server processes)
|
|
387
|
-
- Compact MCP result rendering summarizes text, but inline images are still controlled by Pi's image display settings and may render below the compact text summary.
|
|
388
|
-
- MCP sampling support is text-only; context inclusion, tools, stop sequences, audio, and image content are rejected with explicit errors.
|
|
101
|
+
The old gateway tool, configurable prefixes, lazy/idle lifecycle settings, metadata cache, SSE transport, MCP Apps rendering, and setup command are no longer available. Use the native configuration, tools, and commands documented above.
|