@engramx/mcp 0.1.0-rc.2
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/LICENSE +190 -0
- package/README.md +166 -0
- package/dist/connect-config.d.ts +51 -0
- package/dist/connect-config.js +108 -0
- package/dist/connect-config.js.map +1 -0
- package/dist/connect-config.test.d.ts +1 -0
- package/dist/connect-config.test.js +49 -0
- package/dist/connect-config.test.js.map +1 -0
- package/dist/connect.d.ts +1 -0
- package/dist/connect.js +89 -0
- package/dist/connect.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/profile-tools.d.ts +3 -0
- package/dist/profile-tools.js +144 -0
- package/dist/profile-tools.js.map +1 -0
- package/dist/resources.d.ts +3 -0
- package/dist/resources.js +22 -0
- package/dist/resources.js.map +1 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +51 -0
- package/dist/server.js.map +1 -0
- package/dist/tools.d.ts +3 -0
- package/dist/tools.js +398 -0
- package/dist/tools.js.map +1 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +30 -0
- package/dist/utils.js.map +1 -0
- package/package.json +40 -0
package/dist/connect.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// `npx @engramx/mcp connect` — print ready-to-use config for connecting any MCP client to an
|
|
2
|
+
// engram's remote MCP endpoint, and optionally write the Claude Desktop config file. Uses the
|
|
3
|
+
// shared connect-config module (connect-config.ts) so every consumer emits identical config.
|
|
4
|
+
import { writeFileSync, mkdirSync, existsSync, readFileSync } from 'node:fs';
|
|
5
|
+
import { dirname, join } from 'node:path';
|
|
6
|
+
import { homedir, platform } from 'node:os';
|
|
7
|
+
import { connectInfo, claudeDesktopConfig } from './connect-config.js';
|
|
8
|
+
function parseFlags(argv) {
|
|
9
|
+
const f = {};
|
|
10
|
+
for (let i = 0; i < argv.length; i++) {
|
|
11
|
+
const arg = argv[i];
|
|
12
|
+
if (arg && arg.startsWith('--')) {
|
|
13
|
+
const k = arg.slice(2);
|
|
14
|
+
const next = argv[i + 1];
|
|
15
|
+
if (next !== undefined && !next.startsWith('--')) {
|
|
16
|
+
f[k] = next;
|
|
17
|
+
i++;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
f[k] = true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return f;
|
|
25
|
+
}
|
|
26
|
+
/** Default claude_desktop_config.json path per OS. */
|
|
27
|
+
function defaultClaudeDesktopPath() {
|
|
28
|
+
const home = homedir();
|
|
29
|
+
switch (platform()) {
|
|
30
|
+
case 'darwin':
|
|
31
|
+
return join(home, 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json');
|
|
32
|
+
case 'win32':
|
|
33
|
+
return join(process.env['APPDATA'] || join(home, 'AppData', 'Roaming'), 'Claude', 'claude_desktop_config.json');
|
|
34
|
+
default:
|
|
35
|
+
return join(home, '.config', 'Claude', 'claude_desktop_config.json');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Merge the engramx server into an existing claude_desktop_config.json without clobbering others. */
|
|
39
|
+
function writeClaudeDesktopConfig(path, p) {
|
|
40
|
+
let existing = {};
|
|
41
|
+
if (existsSync(path)) {
|
|
42
|
+
try {
|
|
43
|
+
existing = JSON.parse(readFileSync(path, 'utf-8'));
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
throw new Error(`${path} exists but is not valid JSON — fix or remove it, then retry.`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
existing.mcpServers = existing.mcpServers || {};
|
|
50
|
+
existing.mcpServers.engramx = claudeDesktopConfig(p).mcpServers.engramx;
|
|
51
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
52
|
+
writeFileSync(path, JSON.stringify(existing, null, 2) + '\n');
|
|
53
|
+
}
|
|
54
|
+
export async function runConnect(argv) {
|
|
55
|
+
const f = parseFlags(argv);
|
|
56
|
+
if (f['help'] || f['h']) {
|
|
57
|
+
console.log('Usage: npx @engramx/mcp connect --canister <id> [--host <url>] [--write [path]]');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const canisterId = f['canister'] ||
|
|
61
|
+
process.env['ENGRAM_CANISTER_ID'] ||
|
|
62
|
+
process.env['VAULT_CANISTER_ID'];
|
|
63
|
+
const host = f['host'] || process.env['ENGRAM_HOST'] || 'https://icp0.io';
|
|
64
|
+
if (!canisterId) {
|
|
65
|
+
console.error('Error: --canister <id> (or ENGRAM_CANISTER_ID) is required.');
|
|
66
|
+
console.error('Usage: npx @engramx/mcp connect --canister <id> [--host <url>] [--write [path]]');
|
|
67
|
+
process.exit(2);
|
|
68
|
+
}
|
|
69
|
+
const info = connectInfo({ canisterId, host });
|
|
70
|
+
console.log('\nConnect Claude (and other MCP clients) to your engram\n');
|
|
71
|
+
console.log(`Remote MCP URL:\n ${info.mcpUrl}\n`);
|
|
72
|
+
for (const g of info.guides) {
|
|
73
|
+
console.log(`• ${g.name} [${g.transport}]`);
|
|
74
|
+
for (const s of g.steps)
|
|
75
|
+
console.log(` - ${s}`);
|
|
76
|
+
if (g.snippet)
|
|
77
|
+
for (const line of g.snippet.split('\n'))
|
|
78
|
+
console.log(` ${line}`);
|
|
79
|
+
}
|
|
80
|
+
if (f['write']) {
|
|
81
|
+
const path = typeof f['write'] === 'string' ? f['write'] : defaultClaudeDesktopPath();
|
|
82
|
+
writeClaudeDesktopConfig(path, { canisterId, host });
|
|
83
|
+
console.log(`\n✓ Wrote the engramx MCP server to ${path}. Restart Claude Desktop to load it.`);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
console.log('\n(Re-run with --write to merge the stdio config into claude_desktop_config.json.)');
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=connect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mapp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AAC,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,wBAAwB,EAAE,CAAC;QACtF,wBAAwB,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QACrD,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/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Entry router. With no subcommand, start the stdio MCP server (the default). The `connect`
|
|
3
|
+
// subcommand only generates client config, so it's handled BEFORE importing ./server.js — which
|
|
4
|
+
// statically pulls in @engramx/client and requires a session key.
|
|
5
|
+
import { runConnect } from './connect.js';
|
|
6
|
+
if (process.argv[2] === 'connect') {
|
|
7
|
+
await runConnect(process.argv.slice(3));
|
|
8
|
+
process.exit(0);
|
|
9
|
+
}
|
|
10
|
+
await import('./server.js');
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,4FAA4F;AAC5F,gGAAgG;AAChG,kEAAkE;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;IAClC,MAAM,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { toSerializable } from './utils.js';
|
|
3
|
+
function jsonText(value) {
|
|
4
|
+
return JSON.stringify(toSerializable(value), null, 2);
|
|
5
|
+
}
|
|
6
|
+
export function registerProfileTools(server, profile, sessions) {
|
|
7
|
+
// 1. engram_get_profile
|
|
8
|
+
server.tool('engram_get_profile', 'Load the user identity (soul, user, preferences) and accumulated lessons in one call. Use at session start to learn who the user is.', async () => {
|
|
9
|
+
try {
|
|
10
|
+
const p = await profile.getProfile();
|
|
11
|
+
return { content: [{ type: 'text', text: jsonText(p) }] };
|
|
12
|
+
}
|
|
13
|
+
catch (err) {
|
|
14
|
+
return {
|
|
15
|
+
content: [
|
|
16
|
+
{ type: 'text', text: `Error: ${err instanceof Error ? err.message : String(err)}` },
|
|
17
|
+
],
|
|
18
|
+
isError: true,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
// 2. engram_save_preference
|
|
23
|
+
server.tool('engram_save_preference', 'Save a user preference (e.g. "prefers terse responses", "uses dark mode"). Persists across platforms.', { preference: z.string().describe('The preference to save') }, async ({ preference }) => {
|
|
24
|
+
try {
|
|
25
|
+
const version = await profile.savePreference(preference);
|
|
26
|
+
return { content: [{ type: 'text', text: jsonText({ saved: true, version }) }] };
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
return {
|
|
30
|
+
content: [
|
|
31
|
+
{ type: 'text', text: `Error: ${err instanceof Error ? err.message : String(err)}` },
|
|
32
|
+
],
|
|
33
|
+
isError: true,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
// 3. engram_save_insight
|
|
38
|
+
server.tool('engram_save_insight', 'Save a lesson learned or insight. Optionally provide a topic for domain-specific knowledge.', {
|
|
39
|
+
content: z.string().describe('The insight or lesson to save'),
|
|
40
|
+
topic: z
|
|
41
|
+
.string()
|
|
42
|
+
.optional()
|
|
43
|
+
.describe('Optional domain topic (e.g. "typescript", "devops"). Lowercase, alphanumeric.'),
|
|
44
|
+
}, async ({ content, topic }) => {
|
|
45
|
+
try {
|
|
46
|
+
const version = await profile.saveInsight({ content, topic });
|
|
47
|
+
return { content: [{ type: 'text', text: jsonText({ saved: true, version, topic }) }] };
|
|
48
|
+
}
|
|
49
|
+
catch (err) {
|
|
50
|
+
return {
|
|
51
|
+
content: [
|
|
52
|
+
{ type: 'text', text: `Error: ${err instanceof Error ? err.message : String(err)}` },
|
|
53
|
+
],
|
|
54
|
+
isError: true,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
// 4. engram_save_decision
|
|
59
|
+
server.tool('engram_save_decision', 'Record a decision and its rationale for future reference across platforms.', {
|
|
60
|
+
decision: z.string().describe('What was decided'),
|
|
61
|
+
rationale: z.string().describe('Why this decision was made'),
|
|
62
|
+
}, async ({ decision, rationale }) => {
|
|
63
|
+
try {
|
|
64
|
+
const version = await profile.saveDecision(decision, rationale);
|
|
65
|
+
return { content: [{ type: 'text', text: jsonText({ saved: true, version }) }] };
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
return {
|
|
69
|
+
content: [
|
|
70
|
+
{ type: 'text', text: `Error: ${err instanceof Error ? err.message : String(err)}` },
|
|
71
|
+
],
|
|
72
|
+
isError: true,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
// 5. engram_session_summary
|
|
77
|
+
server.tool('engram_session_summary', 'Write a session summary for today. Other platforms can read this to maintain continuity.', {
|
|
78
|
+
platform: z.string().describe('Platform name (e.g. "claude", "openclaw")'),
|
|
79
|
+
summary: z.string().describe('Summary of what was discussed or accomplished'),
|
|
80
|
+
date: z
|
|
81
|
+
.string()
|
|
82
|
+
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
83
|
+
.optional()
|
|
84
|
+
.describe('Date in YYYY-MM-DD format (defaults to today)'),
|
|
85
|
+
}, async ({ platform, summary, date }) => {
|
|
86
|
+
try {
|
|
87
|
+
const version = await sessions.writeSummary(platform, summary, date);
|
|
88
|
+
return { content: [{ type: 'text', text: jsonText({ saved: true, platform, version }) }] };
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
return {
|
|
92
|
+
content: [
|
|
93
|
+
{ type: 'text', text: `Error: ${err instanceof Error ? err.message : String(err)}` },
|
|
94
|
+
],
|
|
95
|
+
isError: true,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
// 6. engram_read_sessions
|
|
100
|
+
server.tool('engram_read_sessions', 'Read recent session summaries. Optionally filter by platform, or exclude a platform to see cross-platform activity.', {
|
|
101
|
+
platform: z.string().optional().describe('Filter to a specific platform'),
|
|
102
|
+
exclude_platform: z
|
|
103
|
+
.string()
|
|
104
|
+
.optional()
|
|
105
|
+
.describe('Exclude a platform (for cross-platform reads, e.g. exclude "claude" to see what OpenClaw did)'),
|
|
106
|
+
limit: z.number().min(1).max(20).optional().default(5).describe('Max sessions to return'),
|
|
107
|
+
}, async ({ platform, exclude_platform, limit }) => {
|
|
108
|
+
try {
|
|
109
|
+
let result;
|
|
110
|
+
if (exclude_platform) {
|
|
111
|
+
result = await sessions.readCrossPlatform(exclude_platform, limit);
|
|
112
|
+
}
|
|
113
|
+
else if (platform) {
|
|
114
|
+
const entries = await sessions.listSessions(platform);
|
|
115
|
+
const recent = entries.slice(0, limit);
|
|
116
|
+
const paths = recent.map((e) => e.path);
|
|
117
|
+
if (paths.length === 0) {
|
|
118
|
+
return { content: [{ type: 'text', text: '[]' }] };
|
|
119
|
+
}
|
|
120
|
+
// Read the actual content — use readSummary for each
|
|
121
|
+
result = [];
|
|
122
|
+
for (const entry of recent) {
|
|
123
|
+
const content = await sessions.readSummary(entry.platform, entry.date);
|
|
124
|
+
if (content) {
|
|
125
|
+
result.push({ platform: entry.platform, date: entry.date, content });
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
result = await sessions.readRecent(limit);
|
|
131
|
+
}
|
|
132
|
+
return { content: [{ type: 'text', text: jsonText(result) }] };
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
return {
|
|
136
|
+
content: [
|
|
137
|
+
{ type: 'text', text: `Error: ${err instanceof Error ? err.message : String(err)}` },
|
|
138
|
+
],
|
|
139
|
+
isError: true,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=profile-tools.js.map
|
|
@@ -0,0 +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,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,OAAuB,EACvB,QAAwB;IAExB,wBAAwB;IACxB,MAAM,CAAC,IAAI,CACT,oBAAoB,EACpB,sIAAsI,EACtI,KAAK,IAAI,EAAE;QACT,IAAI,CAAC;YACH,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC;YACrC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QAC5D,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAA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,CAAC;gBACD,qDAAqD;gBACrD,MAAM,GAAG,EAAE,CAAC;gBACZ,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;oBAC3B,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;oBACvE,IAAI,OAAO,EAAE,CAAC;wBACZ,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;oBACvE,CAAC;gBACH,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,GAAG,MAAM,QAAQ,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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { toSerializable } from './utils.js';
|
|
2
|
+
export function registerResources(server, engram) {
|
|
3
|
+
server.resource('engram-status', 'engram://status', { description: 'Engram canister status — memory file count, operators, cycles, version' }, async (uri) => {
|
|
4
|
+
try {
|
|
5
|
+
const status = await engram.status();
|
|
6
|
+
return {
|
|
7
|
+
contents: [
|
|
8
|
+
{
|
|
9
|
+
uri: uri.href,
|
|
10
|
+
mimeType: 'application/json',
|
|
11
|
+
text: JSON.stringify(toSerializable(status), null, 2),
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
18
|
+
return { contents: [{ uri: uri.href, mimeType: 'text/plain', text: `Error: ${message}` }] };
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,MAAoB;IACvE,MAAM,CAAC,QAAQ,CACb,eAAe,EACf,iBAAiB,EACjB,EAAE,WAAW,EAAE,wEAAwE,EAAE,EACzF,KAAK,EAAE,GAAG,EAAE,EAAE;QACZ,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC;YACrC,OAAO;gBACL,QAAQ,EAAE;oBACR;wBACE,GAAG,EAAE,GAAG,CAAC,IAAI;wBACb,QAAQ,EAAE,kBAAkB;wBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;qBACtD;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC;QAC9F,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// The stdio MCP server (default invocation). Split out of index.ts so the lightweight `connect`
|
|
2
|
+
// subcommand router doesn't statically pull in @engramx/client or require a session key.
|
|
3
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { existsSync } from 'node:fs';
|
|
7
|
+
import { homedir } from 'node:os';
|
|
8
|
+
import { EngramClient, ProfileManager, SessionManager } from '@engramx/client';
|
|
9
|
+
import { registerTools } from './tools.js';
|
|
10
|
+
import { registerProfileTools } from './profile-tools.js';
|
|
11
|
+
import { registerResources } from './resources.js';
|
|
12
|
+
// --- Environment variables (same names as agent-skill.ts) ---
|
|
13
|
+
const canisterId = process.env['ENGRAM_CANISTER_ID'] || process.env['VAULT_CANISTER_ID'];
|
|
14
|
+
if (!canisterId) {
|
|
15
|
+
console.error('Error: ENGRAM_CANISTER_ID environment variable is required.\n' +
|
|
16
|
+
'Set it to your engram canister ID (e.g. "xxxxx-xxxxx-xxxxx-xxxxx-xxx").\n' +
|
|
17
|
+
'To connect a client instead, run: npx @engramx/mcp connect --canister <id>');
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
const sessionKeyPath = process.env['ENGRAM_SESSION_KEY_PATH'] ||
|
|
21
|
+
process.env['ENGRAMX_SESSION_KEY_PATH'] ||
|
|
22
|
+
process.env['VAULT_SESSION_KEY_PATH'] ||
|
|
23
|
+
join(homedir(), '.engramx', 'session.key');
|
|
24
|
+
if (!existsSync(sessionKeyPath)) {
|
|
25
|
+
console.error(`Error: Session key not found at ${sessionKeyPath}.\n` +
|
|
26
|
+
'Generate one with: npx @engramx/client pair <invite-code> --engram <canister-id>');
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
const host = process.env['ENGRAM_HOST'] || 'https://ic0.app';
|
|
30
|
+
// --- Client ---
|
|
31
|
+
const engram = new EngramClient({
|
|
32
|
+
canisterId,
|
|
33
|
+
sessionKeyPath,
|
|
34
|
+
host,
|
|
35
|
+
cacheMaxAge: 60_000,
|
|
36
|
+
});
|
|
37
|
+
// --- MCP Server ---
|
|
38
|
+
const server = new McpServer({ name: 'engramx', version: '0.1.0' }, {
|
|
39
|
+
instructions: 'engramx gives this agent persistent memory in a user-owned canister (an engram) plus an ic402 paid-services marketplace. Operator 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 engram-wide operation ledger. 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 operator; call these only when the user intends to pay. engram_dispute_job blocks payout instead. engram_get_job_result is a free read.',
|
|
40
|
+
});
|
|
41
|
+
const profile = new ProfileManager(engram);
|
|
42
|
+
const sessions = new SessionManager(engram);
|
|
43
|
+
registerTools(server, engram);
|
|
44
|
+
registerProfileTools(server, profile, sessions);
|
|
45
|
+
registerResources(server, engram);
|
|
46
|
+
// --- Connect via stdio ---
|
|
47
|
+
const transport = new StdioServerTransport();
|
|
48
|
+
await server.connect(transport);
|
|
49
|
+
// Log to stderr — stdout is the MCP protocol channel
|
|
50
|
+
console.error(`engramx MCP server started (canister: ${canisterId}, host: ${host})`);
|
|
51
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 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