@engramx/mcp 0.16.0-rc.12 → 0.16.0-rc.14
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 +19 -15
- package/dist/connect.js +12 -42
- package/dist/connect.js.map +1 -1
- package/dist/profile-tools.js +4 -8
- package/dist/profile-tools.js.map +1 -1
- package/dist/server.js +11 -8
- package/dist/server.js.map +1 -1
- package/dist/tools.js +15 -16
- package/dist/tools.js.map +1 -1
- package/package.json +2 -4
- package/dist/connect-config.d.ts +0 -106
- package/dist/connect-config.js +0 -240
- package/dist/connect-config.js.map +0 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ EngramX speaks MCP from two places, and installing the wrong one is the most com
|
|
|
10
10
|
|---|---|---|
|
|
11
11
|
| Where it runs | On-chain, at the engram's `/mcp` HTTPS endpoint | On the machine the agent runs on, spawned over stdin/stdout |
|
|
12
12
|
| Credential | OAuth 2.1 bearer token, installed once (an agent connected by sign-in) | The Ed25519 key for this engram, on disk (a paired agent) |
|
|
13
|
-
| Install | Nothing to install — point the MCP client at the URL | `npx @engramx/mcp@0.16.0-rc.
|
|
13
|
+
| Install | Nothing to install — point the MCP client at the URL | `npx @engramx/mcp@0.16.0-rc.14` |
|
|
14
14
|
| Tools | 10 | 19 |
|
|
15
15
|
| Has money tools | No — payment vouchers are signed with a client-held key, which a canister cannot hold ⟨corrected 2026-09-30: no voucher is signed; paying is a ledger approval plus a call made as the buyer's own key, which a canister cannot make on the agent's behalf⟩ | Yes |
|
|
16
16
|
| Docs | [engramx.ai/docs](https://engramx.ai/docs) | this file |
|
|
@@ -19,7 +19,7 @@ EngramX speaks MCP from two places, and installing the wrong one is the most com
|
|
|
19
19
|
package can print the config for it without starting a server:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
npx @engramx/mcp@0.16.0-rc.
|
|
22
|
+
npx @engramx/mcp@0.16.0-rc.14 connect --canister xxxxx-xxxxx-xxxxx-xxxxx-xxx
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
That prints the engram's remote MCP URL plus per-client setup for 14 supported MCP clients (11
|
|
@@ -44,12 +44,12 @@ tools, the profile/session helpers, or a client-held key you control.
|
|
|
44
44
|
## Prerequisites
|
|
45
45
|
|
|
46
46
|
- Node.js >= 22.12 (inherited from `@engramx/client`, which this package depends on)
|
|
47
|
-
- An engram your agent is paired with (the key for this engram, from `npx @engramx/client@0.16.0-rc.
|
|
47
|
+
- An engram your agent is paired with (the key for this engram, from `npx @engramx/client@0.16.0-rc.14 pair`)
|
|
48
48
|
|
|
49
49
|
## Quick Start
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
ENGRAM_CANISTER_ID=xxxxx-xxxxx-xxxxx-xxxxx-xxx npx @engramx/mcp@0.16.0-rc.
|
|
52
|
+
ENGRAM_CANISTER_ID=xxxxx-xxxxx-xxxxx-xxxxx-xxx npx @engramx/mcp@0.16.0-rc.14
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
## Configuration
|
|
@@ -69,7 +69,7 @@ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_
|
|
|
69
69
|
"mcpServers": {
|
|
70
70
|
"engramx": {
|
|
71
71
|
"command": "npx",
|
|
72
|
-
"args": ["@engramx/mcp@0.16.0-rc.
|
|
72
|
+
"args": ["@engramx/mcp@0.16.0-rc.14"],
|
|
73
73
|
"env": {
|
|
74
74
|
"ENGRAM_CANISTER_ID": "xxxxx-xxxxx-xxxxx-xxxxx-xxx",
|
|
75
75
|
"ENGRAM_SESSION_KEY_PATH": "/Users/you/.engramx/session.key"
|
|
@@ -88,7 +88,7 @@ Add to `.cursor/mcp.json` in your project root:
|
|
|
88
88
|
"mcpServers": {
|
|
89
89
|
"engramx": {
|
|
90
90
|
"command": "npx",
|
|
91
|
-
"args": ["@engramx/mcp@0.16.0-rc.
|
|
91
|
+
"args": ["@engramx/mcp@0.16.0-rc.14"],
|
|
92
92
|
"env": {
|
|
93
93
|
"ENGRAM_CANISTER_ID": "xxxxx-xxxxx-xxxxx-xxxxx-xxx",
|
|
94
94
|
"ENGRAM_SESSION_KEY_PATH": "/Users/you/.engramx/session.key"
|
|
@@ -106,7 +106,7 @@ from mcp.client.stdio import stdio_client
|
|
|
106
106
|
|
|
107
107
|
server = StdioServerParameters(
|
|
108
108
|
command="npx",
|
|
109
|
-
args=["@engramx/mcp@0.16.0-rc.
|
|
109
|
+
args=["@engramx/mcp@0.16.0-rc.14"],
|
|
110
110
|
env={
|
|
111
111
|
"ENGRAM_CANISTER_ID": "xxxxx-xxxxx-xxxxx-xxxxx-xxx",
|
|
112
112
|
"ENGRAM_SESSION_KEY_PATH": "/path/to/session.key",
|
|
@@ -125,7 +125,7 @@ Any MCP-compatible client can spawn the server over stdio:
|
|
|
125
125
|
```bash
|
|
126
126
|
ENGRAM_CANISTER_ID=xxxxx-xxxxx-xxxxx-xxxxx-xxx \
|
|
127
127
|
ENGRAM_SESSION_KEY_PATH=/path/to/session.key \
|
|
128
|
-
npx @engramx/mcp@0.16.0-rc.
|
|
128
|
+
npx @engramx/mcp@0.16.0-rc.14
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
The server communicates over stdin/stdout using the MCP protocol. Set environment variables for authentication.
|
|
@@ -142,7 +142,7 @@ behind the catalog; the source is private during the beta, so it names none.⟩
|
|
|
142
142
|
| Tool | Parameters | Description |
|
|
143
143
|
|------|-----------|-------------|
|
|
144
144
|
| `engram_read_memory` | `path` | Read one memory file by exact path — content, version, timestamp |
|
|
145
|
-
| `engram_append_memory` | `path`, `content`, `source?` | Append to a memory file (created if missing). Returns the write receipt `{path, version, seq, head}` — `head` is the
|
|
145
|
+
| `engram_append_memory` | `path`, `content`, `source?` | Append to a memory file (created if missing). Returns the write receipt `{path, version, seq, head}` — `head` is the memory file's chain head after this write, and is what you hand a verifier. It is not the audit-chain head: this write's audit-log entry records it, and the certified audit head covers that entry ⟨2026-10-13: this called `head` the audit-chain head⟩ |
|
|
146
146
|
| `engram_list_memory_files` | _(none)_ | List all memory files (paths, versions, timestamps — no content) |
|
|
147
147
|
| `engram_read_memory_batch` | `paths` | Read up to 50 files in one call; per-file success or error |
|
|
148
148
|
| `engram_memory_history` | `path` | Version history of one file — commitments and eviction disclosures, not content |
|
|
@@ -164,7 +164,9 @@ claim; it records it in the record beside your principal, which makes a false on
|
|
|
164
164
|
| `engram_confirm_job` | `jobId` | **SPENDS.** Irreversibly releases escrow to the seller (BuyerConfirm services) |
|
|
165
165
|
| `engram_dispute_job` | `jobId`, `reason` | Blocks payout on a completed job instead of releasing it |
|
|
166
166
|
|
|
167
|
-
`engram_list_services` and `engram_get_job_result` also exist on the remote surface.
|
|
167
|
+
`engram_list_services` and `engram_get_job_result` also exist on the remote surface. ⟨2026-10-13: no
|
|
168
|
+
longer — they left the remote surface, where they could only refuse (services and jobs live on the
|
|
169
|
+
market); all five commerce tools are stdio-only.⟩ The three
|
|
168
170
|
money tools — `submit_service_request`, `confirm_job`, `dispute_job` — are **stdio-only, and
|
|
169
171
|
structurally so**: submitting signs a payment voucher with the key the agent holds, and the
|
|
170
172
|
canister cannot sign as the buyer.
|
|
@@ -207,11 +209,13 @@ what else the credential carries.
|
|
|
207
209
|
|
|
208
210
|
## Pairing Your Agent (the key for this engram)
|
|
209
211
|
|
|
210
|
-
1. Create an engram at [engramx.ai](https://engramx.ai) or via the CLI
|
|
212
|
+
1. Create an engram at [engramx.ai](https://engramx.ai) ⟨2026-10-13: it said "or via the CLI"; creating
|
|
213
|
+
an engram from the CLI was retired on 2026-10-05 — a person creates one on the set-up page, an agent
|
|
214
|
+
opens its own with `open-engram`⟩
|
|
211
215
|
2. Generate an agent invite in the engram dashboard
|
|
212
216
|
3. Pair your agent:
|
|
213
217
|
```bash
|
|
214
|
-
npx @engramx/client@0.16.0-rc.
|
|
218
|
+
npx @engramx/client@0.16.0-rc.14 pair <invite-code> --engram <canister-id>
|
|
215
219
|
```
|
|
216
220
|
⟨2026-10-03⟩ Every pairing command in this README names the package and the version it ships
|
|
217
221
|
with. Before, it called the globally installed `engramx` command, which runs whatever version is
|
|
@@ -227,7 +231,7 @@ Point the published server at a local replica:
|
|
|
227
231
|
```bash
|
|
228
232
|
ENGRAM_CANISTER_ID=<local-canister-id> \
|
|
229
233
|
ENGRAM_HOST=http://localhost:4943 \
|
|
230
|
-
npx @engramx/mcp@0.16.0-rc.
|
|
234
|
+
npx @engramx/mcp@0.16.0-rc.14
|
|
231
235
|
```
|
|
232
236
|
|
|
233
237
|
⟨2026-09-30: this section began with building the server from a clone of its source, and the
|
|
@@ -237,7 +241,7 @@ came out; the published package is all you need to run or test the server.⟩
|
|
|
237
241
|
Inspect with the MCP Inspector:
|
|
238
242
|
|
|
239
243
|
```bash
|
|
240
|
-
npx @modelcontextprotocol/inspector -- npx @engramx/mcp@0.16.0-rc.
|
|
244
|
+
npx @modelcontextprotocol/inspector -- npx @engramx/mcp@0.16.0-rc.14
|
|
241
245
|
```
|
|
242
246
|
|
|
243
247
|
## Troubleshooting
|
|
@@ -246,7 +250,7 @@ npx @modelcontextprotocol/inspector -- npx @engramx/mcp@0.16.0-rc.12
|
|
|
246
250
|
The server exits with a clear error. Set the environment variable to your engram canister ID.
|
|
247
251
|
|
|
248
252
|
**The key for this engram was not found**
|
|
249
|
-
Generate one with `npx @engramx/client@0.16.0-rc.
|
|
253
|
+
Generate one with `npx @engramx/client@0.16.0-rc.14 pair`. The default path is `~/.engramx/session.key`. Override with `ENGRAM_SESSION_KEY_PATH`.
|
|
250
254
|
|
|
251
255
|
**Canister unreachable**
|
|
252
256
|
Check that `ENGRAM_HOST` is correct (default: `https://ic0.app` for mainnet). For local development, use `http://localhost:4943`. Verify network connectivity.
|
package/dist/connect.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
// `npx @engramx/mcp connect` — print ready-to-use config for connecting any MCP client to an
|
|
2
2
|
// engram's remote MCP endpoint, and optionally write the Claude Desktop config file. Uses the
|
|
3
|
-
// shared connect-config module (connect-config
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
// shared connect-config module (`@engramx/client/connect-config`) so every consumer emits identical
|
|
4
|
+
// config.
|
|
5
|
+
//
|
|
6
|
+
// ⟨2026-10-13, the bloat audit⟩ The config generator moved into @engramx/client, and `--write` uses
|
|
7
|
+
// the client's one writer (`installMcpConfig`: atomic, and it refuses a config it cannot parse);
|
|
8
|
+
// this file's own writer and per-OS path went with the merge (claude-setup.ts says what had drifted).
|
|
9
|
+
import { connectInfo } from '@engramx/client/connect-config';
|
|
10
|
+
import { claudeConfigPaths, installMcpConfig } from '@engramx/client';
|
|
8
11
|
import { VERSION } from './version.js';
|
|
9
12
|
function parseFlags(argv) {
|
|
10
13
|
const f = {};
|
|
@@ -24,38 +27,6 @@ function parseFlags(argv) {
|
|
|
24
27
|
}
|
|
25
28
|
return f;
|
|
26
29
|
}
|
|
27
|
-
/** Default claude_desktop_config.json path per OS. */
|
|
28
|
-
function defaultClaudeDesktopPath() {
|
|
29
|
-
const home = homedir();
|
|
30
|
-
switch (platform()) {
|
|
31
|
-
case 'darwin':
|
|
32
|
-
return join(home, 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json');
|
|
33
|
-
case 'win32':
|
|
34
|
-
return join(process.env['APPDATA'] || join(home, 'AppData', 'Roaming'), 'Claude', 'claude_desktop_config.json');
|
|
35
|
-
default:
|
|
36
|
-
return join(home, '.config', 'Claude', 'claude_desktop_config.json');
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Merge the engramx server into an existing claude_desktop_config.json without clobbering others.
|
|
41
|
-
* ⟨2026-10-13⟩ The server entry runs `@engramx/mcp@<this tool's version>` (connect-config.ts
|
|
42
|
-
* `mcpPackage` says why); it wrote the bare `@engramx/mcp` until then.
|
|
43
|
-
*/
|
|
44
|
-
function writeClaudeDesktopConfig(path, p) {
|
|
45
|
-
let existing = {};
|
|
46
|
-
if (existsSync(path)) {
|
|
47
|
-
try {
|
|
48
|
-
existing = JSON.parse(readFileSync(path, 'utf-8'));
|
|
49
|
-
}
|
|
50
|
-
catch {
|
|
51
|
-
throw new Error(`${path} exists but is not valid JSON — fix or remove it, then retry.`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
existing.mcpServers = existing.mcpServers || {};
|
|
55
|
-
existing.mcpServers.engramx = claudeDesktopConfig(p).mcpServers.engramx;
|
|
56
|
-
mkdirSync(dirname(path), { recursive: true });
|
|
57
|
-
writeFileSync(path, JSON.stringify(existing, null, 2) + '\n');
|
|
58
|
-
}
|
|
59
30
|
/**
|
|
60
31
|
* ⟨2026-10-13⟩ Names this tool at its own version (`npx @engramx/mcp@<version> connect …`); it said the
|
|
61
32
|
* bare `npx @engramx/mcp connect …` until then, which runs npm's `latest` — the last final release,
|
|
@@ -68,9 +39,8 @@ export async function runConnect(argv) {
|
|
|
68
39
|
console.log(USAGE);
|
|
69
40
|
return;
|
|
70
41
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
process.env['VAULT_CANISTER_ID'];
|
|
42
|
+
// ⟨2026-10-13⟩ The retired VAULT_CANISTER_ID alias is gone (server.ts says why).
|
|
43
|
+
const canisterId = f['canister'] || process.env['ENGRAM_CANISTER_ID'];
|
|
74
44
|
const host = f['host'] || process.env['ENGRAM_HOST'] || 'https://icp0.io';
|
|
75
45
|
if (!canisterId) {
|
|
76
46
|
console.error('Error: --canister <id> (or ENGRAM_CANISTER_ID) is required.');
|
|
@@ -90,8 +60,8 @@ export async function runConnect(argv) {
|
|
|
90
60
|
console.log(` ${line}`);
|
|
91
61
|
}
|
|
92
62
|
if (f['write']) {
|
|
93
|
-
const path = typeof f['write'] === 'string' ? f['write'] :
|
|
94
|
-
|
|
63
|
+
const path = typeof f['write'] === 'string' ? f['write'] : claudeConfigPaths().claudeDesktop;
|
|
64
|
+
installMcpConfig(path, { canisterId, host, version: VERSION });
|
|
95
65
|
console.log(`\n✓ Wrote the engramx MCP server to ${path}. Restart Claude Desktop to load it.`);
|
|
96
66
|
}
|
|
97
67
|
else {
|
package/dist/connect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,8FAA8F;AAC9F,
|
|
1
|
+
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,8FAA8F;AAC9F,oGAAoG;AACpG,UAAU;AACV,EAAE;AACF,oGAAoG;AACpG,iGAAiG;AACjG,sGAAsG;AAEtG,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,SAAS,UAAU,CAAC,IAAc;IAChC,MAAM,CAAC,GAAqC,EAAE,CAAC;IAC/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACzB,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBACjD,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;gBACZ,CAAC,EAAE,CAAC;YACN,CAAC;iBAAM,CAAC;gBACN,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;YACd,CAAC;QACH,CA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AAK;YAAE,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACnD,IAAI,CAAC,CAAC,OAAO;YAAE,KAAK,MAAM,IAAI,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;gBAAE,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;IACxF,CAAC;IAED,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;QACf,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC,aAAa,CAAC;QAC7F,gBAAgB,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,uCAAuC,IAAI,sCAAsC,CAAC,CAAC;IACjG,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CACT,oFAAoF,CACrF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/profile-tools.js
CHANGED
|
@@ -7,16 +7,12 @@ function jsonText(value) {
|
|
|
7
7
|
* Render what a save actually did.
|
|
8
8
|
*
|
|
9
9
|
* The ProfileManager/SessionManager methods hand back the write RECEIPT as of the 2026-08-16
|
|
10
|
-
* canister release,
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* COMMITTED; `head` is the hex audit-chain head after the write, the value the agent hands a
|
|
15
|
-
* third party who wants to verify it without trusting the agent.
|
|
10
|
+
* canister release, and throw on every failure. `saved` here means COMMITTED; `head` is the hex
|
|
11
|
+
* audit-chain head after the write, the value the agent hands a third party who wants to verify it
|
|
12
|
+
* without trusting the agent. ⟨2026-10-13, the owner's 4A⟩ The `{saved: false, queued: true}` arm
|
|
13
|
+
* for a null receipt went with the SDK's offline queue.
|
|
16
14
|
*/
|
|
17
15
|
function saveResult(receipt, extra = {}) {
|
|
18
|
-
if (receipt === null)
|
|
19
|
-
return { saved: false, queued: true, ...extra };
|
|
20
16
|
return { saved: true, version: receipt.version, seq: receipt.seq, head: receipt.head, ...extra };
|
|
21
17
|
}
|
|
22
18
|
// MCP ToolAnnotations for the profile/session convenience tools. These have no entry in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-tools.js","sourceRoot":"","sources":["../src/profile-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACxD,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"profile-tools.js","sourceRoot":"","sources":["../src/profile-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,UAAU,CACjB,OAAsB,EACtB,QAAiC,EAAE;IAEnC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC;AACnG,CAAC;AAED,wFAAwF;AACxF,8FAA8F;AAC9F,qCAAqC;AACrC,EAAE;AACF,kGAAkG;AAClG,gGAAgG;AACh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CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAC5C,CAAC;YACD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;QACjE,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE;iBACrF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -10,10 +10,14 @@ import { HttpAgent } from '@icp-sdk/core/agent';
|
|
|
10
10
|
import { registerTools } from './tools.js';
|
|
11
11
|
import { registerProfileTools } from './profile-tools.js';
|
|
12
12
|
import { registerResources } from './resources.js';
|
|
13
|
-
import { pairCommand } from '
|
|
13
|
+
import { pairCommand } from '@engramx/client/connect-config';
|
|
14
14
|
import { VERSION } from './version.js';
|
|
15
15
|
// --- Environment variables ---
|
|
16
|
-
|
|
16
|
+
// ⟨2026-10-13⟩ ENGRAM_* names only. The retired pre-launch VAULT_CANISTER_ID / VAULT_SESSION_KEY_PATH
|
|
17
|
+
// aliases and the undocumented second session-key name ENGRAMX_SESSION_KEY_PATH went in the bloat
|
|
18
|
+
// audit: no doc names them and nothing in this repo, the platform or the Medivox checkouts sets them
|
|
19
|
+
// (the same class as the Vault* export aliases removed 2026-08-17).
|
|
20
|
+
const canisterId = process.env['ENGRAM_CANISTER_ID'];
|
|
17
21
|
if (!canisterId) {
|
|
18
22
|
console.error('Error: ENGRAM_CANISTER_ID environment variable is required.\n' +
|
|
19
23
|
'Set it to your engram canister ID (e.g. "xxxxx-xxxxx-xxxxx-xxxxx-xxx").\n' +
|
|
@@ -21,10 +25,7 @@ if (!canisterId) {
|
|
|
21
25
|
`To connect a client instead, run: npx @engramx/mcp@${VERSION} connect --canister <id>`);
|
|
22
26
|
process.exit(1);
|
|
23
27
|
}
|
|
24
|
-
const sessionKeyPath = process.env['ENGRAM_SESSION_KEY_PATH'] ||
|
|
25
|
-
process.env['ENGRAMX_SESSION_KEY_PATH'] ||
|
|
26
|
-
process.env['VAULT_SESSION_KEY_PATH'] ||
|
|
27
|
-
join(homedir(), '.engramx', 'session.key');
|
|
28
|
+
const sessionKeyPath = process.env['ENGRAM_SESSION_KEY_PATH'] || join(homedir(), '.engramx', 'session.key');
|
|
28
29
|
if (!existsSync(sessionKeyPath)) {
|
|
29
30
|
console.error(`Error: the key for this engram was not found at ${sessionKeyPath}.\n` +
|
|
30
31
|
`Generate one with: ${pairCommand(VERSION, '<invite-code>', '<canister-id>')}`);
|
|
@@ -72,8 +73,10 @@ const market = marketCanisterId
|
|
|
72
73
|
marketCanisterId)
|
|
73
74
|
: null;
|
|
74
75
|
// --- MCP Server ---
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
// ⟨2026-10-13⟩ The server announces this package's own version. It said a hard-coded '0.1.0' until
|
|
77
|
+
// then, while every command it prints already named VERSION. Held by test/server-version.test.ts.
|
|
78
|
+
const server = new McpServer({ name: 'engramx', version: VERSION }, {
|
|
79
|
+
instructions: 'engramx gives this agent persistent memory in a user-owned canister (an engram) plus an ic402 paid-services marketplace. Agent sessions are APPEND-ONLY: memory can be read and appended to, never overwritten or deleted. Memory flow: engram_list_memory_files (discover paths) -> engram_read_memory or engram_read_memory_batch (fetch content) -> engram_append_memory (add content; memory.append scope; config/ and secrets/ paths are owner-only). engram_memory_history shows prior versions of one file; engram_read_audit_log shows the record of this engram: all of it to the owner or a guardian, only its own entries in full to an agent, every other entry as a hash-only row. Free reads: engram_status and engram_list_services. engram_wallet_balance reports canister cycles (infrastructure fuel), NOT token money. MONEY: engram_submit_service_request SPENDS ckUSDC (settles a payment at the quoted service price into escrow at submit time) and engram_confirm_job irreversibly releases that escrow to the seller; call these only when the user intends to pay. engram_dispute_job blocks payout instead. engram_get_job_result is a free read.',
|
|
77
80
|
});
|
|
78
81
|
const profile = new ProfileManager(engram);
|
|
79
82
|
const sessions = new SessionManager(engram);
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,yFAAyF;AAEzF,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,yFAAyF;AAEzF,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO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cAAc,CAAC,MAAM,CAAC,CAAC;AAE5C,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACtC,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAChD,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAElC,4BAA4B;AAE5B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAEhC,qDAAqD;AACrD,OAAO,CAAC,KAAK,CAAC,yCAAyC,UAAU,WAAW,IAAI,GAAG,CAAC,CAAC"}
|
package/dist/tools.js
CHANGED
|
@@ -128,7 +128,13 @@ market = null) {
|
|
|
128
128
|
// are append-only. Owner uses the dashboard at engramx.ai or the canister IDL
|
|
129
129
|
// directly via Internet Identity.)
|
|
130
130
|
// 2. engram_append_memory
|
|
131
|
-
|
|
131
|
+
// ⟨2026-10-13⟩ The description called head "the hex audit-chain head". It is the memory file's own
|
|
132
|
+
// chain head after the write (src/ledgerfs/Chain.mo `commit`); the write's audit-log entry records
|
|
133
|
+
// it (`receiptSuffix` in src/engram/main.mo), and the certified audit head (getCertifiedAuditHead)
|
|
134
|
+
// and the registry's anchor cover that entry. Neither equals head, so a verifier told to compare
|
|
135
|
+
// them saw a mismatch that is not a defect. tool-schemas.json, the canister's HTTP catalog, already
|
|
136
|
+
// said it right. test/tools.test.ts holds these words.
|
|
137
|
+
server.tool('engram_append_memory', 'Append text to a memory file; the file is created if it does not exist. APPEND-ONLY: never overwrites or deletes, and this is the ONLY mutating memory tool on this surface (no write/delete/rollback exists here). Requires the memory.append scope (agent with canAppendMemory, or owner). Rejected: config/ and secrets/ paths (owner-only), owner-protected paths, and while guardian writes are paused. Returns JSON {path, version, seq, head} — the write receipt: version is the file version after this write, seq its position in the engram event sequence, and head the hex chain head of this memory file after this write. head is not the audit-chain head: it is recorded in the audit-log entry for this write, which the certified audit head and the registry anchor cover, so it is what you hand a third party who wants to verify this write without trusting you.', {
|
|
132
138
|
path: z
|
|
133
139
|
.string()
|
|
134
140
|
.describe(`Target file path to append to; created if absent. Max ${MAX_PATH_LENGTH} characters, no ".."; agents cannot use the config/ or secrets/ prefixes (owner-only).`),
|
|
@@ -144,19 +150,11 @@ market = null) {
|
|
|
144
150
|
if (pathErr)
|
|
145
151
|
return { content: [{ type: 'text', text: pathErr }], isError: true };
|
|
146
152
|
try {
|
|
147
|
-
// The SDK returns the RECEIPT
|
|
148
|
-
//
|
|
149
|
-
//
|
|
150
|
-
//
|
|
151
|
-
// describing an outcome no configuration of this server can produce is the fabrication
|
|
152
|
-
// class this product refuses. Surfacing `head` is the point — it is what an agent hands
|
|
153
|
-
// a verifier.
|
|
153
|
+
// The SDK returns the write RECEIPT, and throws on every failure. Surfacing `head` is the
|
|
154
|
+
// point — it is what an agent hands a verifier. ⟨2026-10-13, the owner's 4A⟩ The `queued`
|
|
155
|
+
// branch for a null receipt went with the SDK's offline queue, which this server never
|
|
156
|
+
// configured.
|
|
154
157
|
const receipt = await engram.appendMemory(path, content, source);
|
|
155
|
-
if (receipt === null) {
|
|
156
|
-
return {
|
|
157
|
-
content: [{ type: 'text', text: jsonText({ path, queued: true }) }],
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
158
|
return {
|
|
161
159
|
content: [
|
|
162
160
|
{
|
|
@@ -345,7 +343,7 @@ market = null) {
|
|
|
345
343
|
}
|
|
346
344
|
});
|
|
347
345
|
// engram_read_audit_log
|
|
348
|
-
server.tool('engram_read_audit_log', "Read the engram's chained record. An agent reads only the entries it caused; the owner and guardians read all of it. Returns a page {items, total,
|
|
346
|
+
server.tool('engram_read_audit_log', "Read the engram's chained record. An agent reads only the entries it caused; the owner and guardians read all of it. Returns a page {items, sealed, total, ringFloor, hashFirstFrom}: items are the entries you may read in full {id, timestamp, caller, callerRole, operation, details, success}; sealed are hash-only rows {id, digest, entryHash} for every other entry in the window (another party caused them) — enough to walk the chain through them, never their content; items + sealed is the window examined. total is how many entries the record has ever held; ringFloor is the oldest id still retained (a window below it starts there); hashFirstFrom is the first id hashed under the hash-first rule. For content changes of ONE file use engram_memory_history instead. Requires an authenticated owner/agent/guardian session; an unauthorized call is REFUSED with an error naming the method, never an empty page.", {
|
|
349
347
|
fromIndex: z
|
|
350
348
|
.number()
|
|
351
349
|
.optional()
|
|
@@ -356,10 +354,11 @@ market = null) {
|
|
|
356
354
|
.max(1000)
|
|
357
355
|
.optional()
|
|
358
356
|
.default(100)
|
|
359
|
-
.describe('How many record ids the window spans (default 100, max 1000; the canister caps a single window at 500); items +
|
|
357
|
+
.describe('How many record ids the window spans (default 100, max 1000; the canister caps a single window at 500); items + sealed = the entries examined'),
|
|
360
358
|
}, READ_ONLY, async ({ fromIndex, limit }) => {
|
|
361
359
|
try {
|
|
362
|
-
// ⟨2026-09-29, follow-up 16⟩ the whole page, so `withheld` reaches the agent
|
|
360
|
+
// ⟨2026-09-29, follow-up 16⟩ the whole page, so `withheld` reaches the agent ⟨2026-10-18: since
|
|
361
|
+
// ruling 6B the page carries `sealed` hash-only rows in place of `withheld`; the whole page still passes⟩
|
|
363
362
|
const page = await engram.readAuditLog(fromIndex ?? 0, limit);
|
|
364
363
|
// ⟨2026-10-02⟩ The SDK's entry carries `timestampNs` (the canister's spelling since the
|
|
365
364
|
// 0.16.0 cut); this tool's JSON keeps `timestamp`, the key its description names.
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACxD,CAAC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E;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,UAAU,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,yMAAyM;qBAC1Q;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;IAEF,+EAA+E;IAC/E,6EAA6E;IAC7E,6EAA6E;AAC/E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@engramx/mcp",
|
|
3
|
-
"version": "0.16.0-rc.
|
|
3
|
+
"version": "0.16.0-rc.14",
|
|
4
4
|
"description": "MCP server for EngramX — persistent, decentralized agent memory",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "EngramX <developer@engramx.ai>",
|
|
7
7
|
"type": "module",
|
|
8
|
-
"main": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
8
|
"bin": {
|
|
11
9
|
"engramx-mcp": "./dist/index.js"
|
|
12
10
|
},
|
|
@@ -18,7 +16,7 @@
|
|
|
18
16
|
"access": "public"
|
|
19
17
|
},
|
|
20
18
|
"dependencies": {
|
|
21
|
-
"@engramx/client": "^0.16.0-rc.
|
|
19
|
+
"@engramx/client": "^0.16.0-rc.14",
|
|
22
20
|
"@icp-sdk/core": "^6.1.0",
|
|
23
21
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
24
22
|
"zod": "^4.6.5"
|
package/dist/connect-config.d.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
export interface ConnectParams {
|
|
2
|
-
canisterId: string;
|
|
3
|
-
/** IC gateway host. Defaults to mainnet (icp0.io). Local replica: http://localhost:4943 */
|
|
4
|
-
host?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const MAINNET_HOST = "https://icp0.io";
|
|
7
|
-
/** What a surface that prints the per-client guides passes: the engram, and the build's version. */
|
|
8
|
-
export interface GuideParams extends ConnectParams {
|
|
9
|
-
/**
|
|
10
|
-
* The @engramx/client version the surface printing these guides was BUILT with — its own
|
|
11
|
-
* package.json's version, which the release's version change stamps (X.Y.Z-rc.N while a release
|
|
12
|
-
* candidate soaks, X.Y.Z once the final release is cut). Every pairing command in the guides
|
|
13
|
-
* names it.
|
|
14
|
-
*
|
|
15
|
-
* ⟨2026-10-13⟩ It is also the @engramx/mcp version the local (stdio) server config names
|
|
16
|
-
* (`mcpPackage`): the protocol's packages share one version number, which each release's version
|
|
17
|
-
* change stamps into every one of them, so the surface's own version is both.
|
|
18
|
-
*/
|
|
19
|
-
clientVersion: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* The pairing command, pinned to the version the surface printing it was built with.
|
|
23
|
-
*
|
|
24
|
-
* WHY (the owner's ruling of 2026-10-03: print the exact version each page was built with).
|
|
25
|
-
* A bare `npx @engramx/client pair …` installs npm's default (`latest`), which is the last FINAL
|
|
26
|
-
* release: while a release candidate soaks under the `next` tag, every surface built from it would
|
|
27
|
-
* hand out a command that installs the previous release, and a previous release cannot pair with
|
|
28
|
-
* this release's engram (the 0.15.0 → 0.16.0 enrolment change). Pinned to the build's own version,
|
|
29
|
-
* the command names the final version once the final release is cut — through that release's own
|
|
30
|
-
* version change, with nothing to undo. WHAT WOULD MAKE THIS WRONG: a surface that prints the guides
|
|
31
|
-
* for a different release than the one it was built from (then `clientVersion` must be that
|
|
32
|
-
* release's), or a published version being withdrawn from npm (a pinned command then fails loudly,
|
|
33
|
-
* where a bare one would quietly install another release).
|
|
34
|
-
*/
|
|
35
|
-
export declare function pairCommand(clientVersion: string, inviteCode: string, canisterId: string): string;
|
|
36
|
-
/** The remote MCP endpoint URL for an engram canister (boundary-node subdomain routing). */
|
|
37
|
-
export declare function mcpUrl({ canisterId, host }: ConnectParams): string;
|
|
38
|
-
/**
|
|
39
|
-
* The @engramx/mcp package the local (stdio) server config runs, pinned to the version the surface
|
|
40
|
-
* printing it was built with: `@engramx/mcp@<version>`.
|
|
41
|
-
*
|
|
42
|
-
* ⟨ADDED 2026-10-13, the owner's "fix … the MCP version in rc.12"⟩ WHY. The config said
|
|
43
|
-
* `npx -y @engramx/mcp`, and a bare name installs npm's default (`latest`) — the last FINAL release.
|
|
44
|
-
* While a release candidate soaks under `next`, that is the previous release (0.15.0 during the
|
|
45
|
-
* 0.16.0 soak, read from npm's dist-tags 2026-10-13), which cannot talk to this release's engram, so
|
|
46
|
-
* the first session started from the copied config failed. The defect class is the bare pairing
|
|
47
|
-
* command's (`pairCommand` above); that fix missed this one because the package name sits in an
|
|
48
|
-
* argument list, not a command line.
|
|
49
|
-
*
|
|
50
|
-
* A version that is not a release version — a surface that could not read its own — prints the
|
|
51
|
-
* visible blank `<version>`, which npm refuses by name (EINVALIDTAGNAME). Never `@engramx/mcp@` or
|
|
52
|
-
* the bare name: npm reads both as the range `*` and installs `latest`, the very failure this
|
|
53
|
-
* prevents (npm-package-arg, measured 2026-10-13 with npm 11.19.1).
|
|
54
|
-
*
|
|
55
|
-
* WHAT WOULD MAKE THIS WRONG: the packages no longer sharing one version number (then the surface
|
|
56
|
-
* must pass @engramx/mcp's own version), a surface printing the config for a release other than the
|
|
57
|
-
* one it was built from, or the named version being withdrawn from npm (the pinned config then
|
|
58
|
-
* fails loudly, where a bare one would quietly run another release).
|
|
59
|
-
*/
|
|
60
|
-
export declare function mcpPackage(version: string): string;
|
|
61
|
-
/**
|
|
62
|
-
* Claude Desktop / Cursor STDIO server entry (local @engramx/mcp, session-key auth), running the
|
|
63
|
-
* @engramx/mcp version the surface was built with (`mcpPackage`).
|
|
64
|
-
*/
|
|
65
|
-
export declare function stdioServerConfig({ canisterId, host, clientVersion }: GuideParams): {
|
|
66
|
-
command: string;
|
|
67
|
-
args: string[];
|
|
68
|
-
env: Record<string, string>;
|
|
69
|
-
};
|
|
70
|
-
/** The claude_desktop_config.json fragment with the engramx server under mcpServers. */
|
|
71
|
-
export declare function claudeDesktopConfig(p: GuideParams): {
|
|
72
|
-
mcpServers: {
|
|
73
|
-
engramx: {
|
|
74
|
-
command: string;
|
|
75
|
-
args: string[];
|
|
76
|
-
env: Record<string, string>;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
export interface ClientGuide {
|
|
81
|
-
id: string;
|
|
82
|
-
name: string;
|
|
83
|
-
/** 'remote' = canister-hosted HTTP MCP + OAuth; 'stdio' = local @engramx/mcp + session key */
|
|
84
|
-
transport: 'remote' | 'stdio';
|
|
85
|
-
steps: string[];
|
|
86
|
-
/** Optional copy-paste install snippet (CLI command, YAML, or JSON). */
|
|
87
|
-
snippet?: string;
|
|
88
|
-
}
|
|
89
|
-
/** Per-client connection guides — identical wording in the CLI and the web page. */
|
|
90
|
-
export declare function clientGuides(p: GuideParams): ClientGuide[];
|
|
91
|
-
/** Everything a consumer needs in one call. */
|
|
92
|
-
export declare function connectInfo(p: GuideParams): {
|
|
93
|
-
canisterId: string;
|
|
94
|
-
host: string;
|
|
95
|
-
mcpUrl: string;
|
|
96
|
-
claudeDesktopConfig: {
|
|
97
|
-
mcpServers: {
|
|
98
|
-
engramx: {
|
|
99
|
-
command: string;
|
|
100
|
-
args: string[];
|
|
101
|
-
env: Record<string, string>;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
guides: ClientGuide[];
|
|
106
|
-
};
|
package/dist/connect-config.js
DELETED
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
// Canonical config generation for connecting AI clients (Claude.ai web, Claude Desktop, Cursor, …)
|
|
2
|
-
// to an engram's remote MCP endpoint. Used by the `@engramx/mcp connect` CLI.
|
|
3
|
-
//
|
|
4
|
-
// Dependency-free and free of Node/browser-only APIs so any consumer (this CLI, or a web UI) can
|
|
5
|
-
// import it unchanged. The contract test (connect-config.test.ts) pins the output — downstream UIs
|
|
6
|
-
// that re-render this config should reuse this module + that test so every surface stays identical.
|
|
7
|
-
//
|
|
8
|
-
// ⟨2026-10-03⟩ Every pairing command this module prints names the exact @engramx/client version the
|
|
9
|
-
// surface printing it was built with (`npx @engramx/client@<version> pair …`), so the caller passes
|
|
10
|
-
// that version in (`GuideParams.clientVersion`): this module cannot read a package.json and stay
|
|
11
|
-
// usable in a browser. This CLI passes its own package.json's version; a web UI passes the version
|
|
12
|
-
// it was built with. See `pairCommand` below for why.
|
|
13
|
-
// ⟨2026-10-13⟩ The local (stdio) server config takes that same version and names
|
|
14
|
-
// `@engramx/mcp@<version>` (`mcpPackage` below) — it named the bare package until then.
|
|
15
|
-
export const MAINNET_HOST = 'https://icp0.io';
|
|
16
|
-
/**
|
|
17
|
-
* The pairing command, pinned to the version the surface printing it was built with.
|
|
18
|
-
*
|
|
19
|
-
* WHY (the owner's ruling of 2026-10-03: print the exact version each page was built with).
|
|
20
|
-
* A bare `npx @engramx/client pair …` installs npm's default (`latest`), which is the last FINAL
|
|
21
|
-
* release: while a release candidate soaks under the `next` tag, every surface built from it would
|
|
22
|
-
* hand out a command that installs the previous release, and a previous release cannot pair with
|
|
23
|
-
* this release's engram (the 0.15.0 → 0.16.0 enrolment change). Pinned to the build's own version,
|
|
24
|
-
* the command names the final version once the final release is cut — through that release's own
|
|
25
|
-
* version change, with nothing to undo. WHAT WOULD MAKE THIS WRONG: a surface that prints the guides
|
|
26
|
-
* for a different release than the one it was built from (then `clientVersion` must be that
|
|
27
|
-
* release's), or a published version being withdrawn from npm (a pinned command then fails loudly,
|
|
28
|
-
* where a bare one would quietly install another release).
|
|
29
|
-
*/
|
|
30
|
-
export function pairCommand(clientVersion, inviteCode, canisterId) {
|
|
31
|
-
return `npx @engramx/client@${clientVersion} pair ${inviteCode} --engram ${canisterId}`;
|
|
32
|
-
}
|
|
33
|
-
function isLocal(host) {
|
|
34
|
-
return host.includes('localhost') || host.includes('127.0.0.1');
|
|
35
|
-
}
|
|
36
|
-
/** The remote MCP endpoint URL for an engram canister (boundary-node subdomain routing). */
|
|
37
|
-
export function mcpUrl({ canisterId, host = MAINNET_HOST }) {
|
|
38
|
-
if (isLocal(host))
|
|
39
|
-
return `http://${canisterId}.localhost:4943/mcp`;
|
|
40
|
-
return `https://${canisterId}.icp0.io/mcp`;
|
|
41
|
-
}
|
|
42
|
-
/** A release version as the release's version change writes it: X.Y.Z, or X.Y.Z-<pre-release>. */
|
|
43
|
-
const RELEASE_VERSION = /^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$/;
|
|
44
|
-
/**
|
|
45
|
-
* The @engramx/mcp package the local (stdio) server config runs, pinned to the version the surface
|
|
46
|
-
* printing it was built with: `@engramx/mcp@<version>`.
|
|
47
|
-
*
|
|
48
|
-
* ⟨ADDED 2026-10-13, the owner's "fix … the MCP version in rc.12"⟩ WHY. The config said
|
|
49
|
-
* `npx -y @engramx/mcp`, and a bare name installs npm's default (`latest`) — the last FINAL release.
|
|
50
|
-
* While a release candidate soaks under `next`, that is the previous release (0.15.0 during the
|
|
51
|
-
* 0.16.0 soak, read from npm's dist-tags 2026-10-13), which cannot talk to this release's engram, so
|
|
52
|
-
* the first session started from the copied config failed. The defect class is the bare pairing
|
|
53
|
-
* command's (`pairCommand` above); that fix missed this one because the package name sits in an
|
|
54
|
-
* argument list, not a command line.
|
|
55
|
-
*
|
|
56
|
-
* A version that is not a release version — a surface that could not read its own — prints the
|
|
57
|
-
* visible blank `<version>`, which npm refuses by name (EINVALIDTAGNAME). Never `@engramx/mcp@` or
|
|
58
|
-
* the bare name: npm reads both as the range `*` and installs `latest`, the very failure this
|
|
59
|
-
* prevents (npm-package-arg, measured 2026-10-13 with npm 11.19.1).
|
|
60
|
-
*
|
|
61
|
-
* WHAT WOULD MAKE THIS WRONG: the packages no longer sharing one version number (then the surface
|
|
62
|
-
* must pass @engramx/mcp's own version), a surface printing the config for a release other than the
|
|
63
|
-
* one it was built from, or the named version being withdrawn from npm (the pinned config then
|
|
64
|
-
* fails loudly, where a bare one would quietly run another release).
|
|
65
|
-
*/
|
|
66
|
-
export function mcpPackage(version) {
|
|
67
|
-
return `@engramx/mcp@${RELEASE_VERSION.test(version) ? version : '<version>'}`;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Claude Desktop / Cursor STDIO server entry (local @engramx/mcp, session-key auth), running the
|
|
71
|
-
* @engramx/mcp version the surface was built with (`mcpPackage`).
|
|
72
|
-
*/
|
|
73
|
-
export function stdioServerConfig({ canisterId, host = MAINNET_HOST, clientVersion }) {
|
|
74
|
-
const env = { ENGRAM_CANISTER_ID: canisterId };
|
|
75
|
-
// Only pin a non-default host (e.g. local replica); mainnet is the @engramx/mcp default.
|
|
76
|
-
if (host !== MAINNET_HOST && host !== 'https://ic0.app')
|
|
77
|
-
env['ENGRAM_HOST'] = host;
|
|
78
|
-
// ⟨2026-10-13⟩ Was `args: ['-y', '@engramx/mcp']` — unpinned; `mcpPackage` says why.
|
|
79
|
-
return { command: 'npx', args: ['-y', mcpPackage(clientVersion)], env };
|
|
80
|
-
}
|
|
81
|
-
/** The claude_desktop_config.json fragment with the engramx server under mcpServers. */
|
|
82
|
-
export function claudeDesktopConfig(p) {
|
|
83
|
-
return { mcpServers: { engramx: stdioServerConfig(p) } };
|
|
84
|
-
}
|
|
85
|
-
/** Per-client connection guides — identical wording in the CLI and the web page. */
|
|
86
|
-
export function clientGuides(p) {
|
|
87
|
-
const url = mcpUrl(p);
|
|
88
|
-
const pair = pairCommand(p.clientVersion, '<invite-code>', p.canisterId);
|
|
89
|
-
return [
|
|
90
|
-
{
|
|
91
|
-
id: 'claude-web',
|
|
92
|
-
name: 'Claude (claude.ai)',
|
|
93
|
-
transport: 'remote',
|
|
94
|
-
steps: [
|
|
95
|
-
'Open claude.ai → Settings → Connectors → Add custom connector.',
|
|
96
|
-
`Paste the MCP URL: ${url}`,
|
|
97
|
-
'Sign in with the wallet that owns this engram, then approve.',
|
|
98
|
-
'Your engram tools (read/append/list memory, audit log, wallet) appear in new chats.',
|
|
99
|
-
],
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
id: 'claude-code',
|
|
103
|
-
name: 'Claude Code (CLI)',
|
|
104
|
-
transport: 'remote',
|
|
105
|
-
snippet: `claude mcp add engramx-memory ${url}`,
|
|
106
|
-
steps: [
|
|
107
|
-
'Run the command, then restart claude-code — OAuth opens in your browser on first use.',
|
|
108
|
-
],
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
id: 'claude-desktop',
|
|
112
|
-
name: 'Claude Desktop (remote)',
|
|
113
|
-
transport: 'remote',
|
|
114
|
-
steps: [
|
|
115
|
-
'Claude Desktop → Settings → Connectors → Add custom connector.',
|
|
116
|
-
`Paste the MCP URL: ${url}`,
|
|
117
|
-
'Authorize with your wallet.',
|
|
118
|
-
],
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
id: 'cursor',
|
|
122
|
-
name: 'Cursor',
|
|
123
|
-
transport: 'remote',
|
|
124
|
-
steps: [
|
|
125
|
-
'Cursor → Settings → MCP → Add new MCP server.',
|
|
126
|
-
`Paste the remote URL ${url}; the OAuth flow opens in your browser.`,
|
|
127
|
-
],
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
id: 'copilot',
|
|
131
|
-
name: 'GitHub Copilot (VS Code, agent mode)',
|
|
132
|
-
transport: 'remote',
|
|
133
|
-
snippet: `{\n "servers": {\n "engramx-memory": { "type": "http", "url": "${url}" }\n }\n}`,
|
|
134
|
-
steps: [
|
|
135
|
-
'VS Code → Command Palette → "MCP: Add Server" → HTTP → paste the URL; or add the JSON above to .vscode/mcp.json (workspace) or your user mcp.json.',
|
|
136
|
-
'Open Copilot Chat in Agent mode and authorize with the wallet that owns this engram; your engram tools appear in the tool picker.',
|
|
137
|
-
'Note: the GitHub Copilot CLI is a separate surface (gh copilot) — this flow is for Copilot Chat in VS Code.',
|
|
138
|
-
],
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
id: 'continue',
|
|
142
|
-
name: 'Continue.dev',
|
|
143
|
-
transport: 'remote',
|
|
144
|
-
snippet: `mcpServers:\n - name: engramx-memory\n transport: streamable-http\n url: ${url}`,
|
|
145
|
-
steps: ['Add this YAML to .continue/mcpServers/engramx.yaml.'],
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
id: 'chatgpt',
|
|
149
|
-
name: 'ChatGPT (developer mode)',
|
|
150
|
-
transport: 'remote',
|
|
151
|
-
steps: [
|
|
152
|
-
'ChatGPT → Settings → Apps & Connectors → enable Developer mode → New connector.',
|
|
153
|
-
`Add the MCP server URL: ${url}, then authorize with the wallet that owns this engram.`,
|
|
154
|
-
'Web + paid tiers only (Plus/Pro/Business); the desktop/mobile apps and free tier cannot add a custom MCP.',
|
|
155
|
-
'Our connector handshake with ChatGPT is still being verified — if the authorize step fails, seed via a paste prompt for now.',
|
|
156
|
-
],
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
id: 'gemini-cli',
|
|
160
|
-
name: 'Gemini CLI',
|
|
161
|
-
transport: 'remote',
|
|
162
|
-
snippet: `gemini mcp add --transport http engramx-memory ${url}`,
|
|
163
|
-
steps: [
|
|
164
|
-
'Run the command, then restart gemini-cli.',
|
|
165
|
-
'If the OAuth handshake misbehaves, add an auth header (the key for this engram) or use the local stdio proxy instead.',
|
|
166
|
-
'The consumer Gemini app has no custom-MCP support — use gemini-cli, or seed the app’s Saved Info via a paste prompt.',
|
|
167
|
-
],
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
id: 'grok',
|
|
171
|
-
name: 'Grok',
|
|
172
|
-
transport: 'remote',
|
|
173
|
-
steps: [
|
|
174
|
-
'Grok → Settings → Connectors → Bring your own MCP → add a custom connector.',
|
|
175
|
-
`Paste the MCP URL: ${url} and authorize. Paid tier.`,
|
|
176
|
-
],
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
id: 'perplexity',
|
|
180
|
-
name: 'Perplexity',
|
|
181
|
-
transport: 'remote',
|
|
182
|
-
steps: [
|
|
183
|
-
'Perplexity → Settings → Connectors → Add → Custom MCP (Pro / Max / Enterprise).',
|
|
184
|
-
`Paste the remote URL: ${url}; authorize with your wallet.`,
|
|
185
|
-
],
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
id: 'lechat',
|
|
189
|
-
name: 'Mistral Le Chat',
|
|
190
|
-
transport: 'remote',
|
|
191
|
-
steps: [
|
|
192
|
-
'Le Chat → + Add Connector → Custom MCP.',
|
|
193
|
-
`Name it "engramx" and paste the server URL: ${url}. Available on all tiers, including free.`,
|
|
194
|
-
],
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
id: 'openclaw',
|
|
198
|
-
name: 'OpenClaw (self-hosted)',
|
|
199
|
-
transport: 'stdio',
|
|
200
|
-
snippet: pair,
|
|
201
|
-
steps: [
|
|
202
|
-
'Run the command; it auto-detects OpenClaw and installs the engramx memory plugin.',
|
|
203
|
-
'The engram becomes OpenClaw’s memory backend — it reads at session start and syncs new memories automatically.',
|
|
204
|
-
'Get <invite-code> from the engram’s owner — you, if this is your engram — who creates it under Access → Agents; it works for thirty minutes.',
|
|
205
|
-
],
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
id: 'sdk',
|
|
209
|
-
name: 'Your own agent (@engramx/client SDK)',
|
|
210
|
-
transport: 'stdio',
|
|
211
|
-
snippet: pair,
|
|
212
|
-
steps: [
|
|
213
|
-
'Pair a key for this engram once with the command; get <invite-code> from the engram’s owner — you, if this is your engram — who creates it under Access → Agents. It works for thirty minutes.',
|
|
214
|
-
`In your agent: new EngramClient({ canisterId: '${p.canisterId}', sessionKeyPath: '~/.engramx/session.key' }), then startSession() to read this owner's memory back and appendMemory() as it learns.`,
|
|
215
|
-
'This grant is append-only for writes — your agent can read and add memory, and cannot delete it. Overwriting existing content requires a separate grant the owner issues deliberately, per path: only on paths the owner lists for agents, and never on paths the owner has locked.',
|
|
216
|
-
],
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
id: 'claude-desktop-stdio',
|
|
220
|
-
name: 'Claude Desktop / Cursor (local stdio)',
|
|
221
|
-
transport: 'stdio',
|
|
222
|
-
snippet: JSON.stringify(claudeDesktopConfig(p), null, 2),
|
|
223
|
-
steps: [
|
|
224
|
-
`Pair a key for this engram once: ${pair}`,
|
|
225
|
-
'Add the JSON to claude_desktop_config.json under "mcpServers", then restart the app.',
|
|
226
|
-
],
|
|
227
|
-
},
|
|
228
|
-
];
|
|
229
|
-
}
|
|
230
|
-
/** Everything a consumer needs in one call. */
|
|
231
|
-
export function connectInfo(p) {
|
|
232
|
-
return {
|
|
233
|
-
canisterId: p.canisterId,
|
|
234
|
-
host: p.host ?? MAINNET_HOST,
|
|
235
|
-
mcpUrl: mcpUrl(p),
|
|
236
|
-
claudeDesktopConfig: claudeDesktopConfig(p),
|
|
237
|
-
guides: clientGuides(p),
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
//# sourceMappingURL=connect-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect-config.js","sourceRoot":"","sources":["../src/connect-config.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,8EAA8E;AAC9E,EAAE;AACF,iGAAiG;AACjG,mGAAmG;AACnG,oGAAoG;AACpG,EAAE;AACF,oGAAoG;AACpG,oGAAoG;AACpG,iGAAiG;AACjG,mGAAmG;AACnG,sDAAsD;AACtD,iFAAiF;AACjF,wFAAwF;AAQxF,MAAM,CAAC,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAiB9C;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,aAAqB,EAAE,UAAkB,EAAE,UAAkB;IACvF,OAAO,uBAAuB,aAAa,SAAS,UAAU,aAAa,UAAU,EAAE,CAAC;AAC1F,CAAC;AAED,SAAS,OAAO,CAAC,IAAY;IAC3B,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAClE,CA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