@cachly-dev/mcp-server 0.8.1 → 0.8.3
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/dist/index.js +41 -43
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/server.json +3 -3
- package/src/index.ts +40 -41
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cachly-dev/mcp-server",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"mcpName": "io.github.cachly-dev/mcp
|
|
3
|
+
"version": "0.8.3",
|
|
4
|
+
"mcpName": "io.github.cachly-dev/cachly-mcp",
|
|
5
5
|
"description": "AI memory brain for Claude Code, Cursor, Copilot & Windsurf — persistent sessions, lessons learned, semantic search, team brain. 51 MCP tools.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"cachly-mcp": "
|
|
8
|
+
"cachly-mcp": "dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"main": "./dist/index.js",
|
|
11
11
|
"scripts": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"license": "Apache-2.0",
|
|
35
35
|
"repository": {
|
|
36
36
|
"type": "git",
|
|
37
|
-
"url": "https://github.com/cachly-dev/cachly-mcp"
|
|
37
|
+
"url": "git+https://github.com/cachly-dev/cachly-mcp.git"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public",
|
package/server.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
-
"name": "io.github.cachly-dev/mcp
|
|
3
|
+
"name": "io.github.cachly-dev/cachly-mcp",
|
|
4
4
|
"description": "AI memory brain for Claude Code, Cursor, Copilot & Windsurf — 51 MCP tools. Persistent sessions, lessons learned, semantic search, Team Telepathy, Ambient Git Learning, Memory Crystals.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/cachly-dev/cachly-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.8.2",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"name": "@cachly-dev/mcp-server",
|
|
14
14
|
"identifier": "@cachly-dev/mcp-server",
|
|
15
|
-
"version": "0.
|
|
15
|
+
"version": "0.8.2",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
}
|
package/src/index.ts
CHANGED
|
@@ -55,7 +55,7 @@ import { Redis } from 'ioredis';
|
|
|
55
55
|
const API_URL = process.env.CACHLY_API_URL ?? 'https://api.cachly.dev';
|
|
56
56
|
const JWT = process.env.CACHLY_JWT ?? '';
|
|
57
57
|
const EMBED_MODEL = process.env.CACHLY_EMBED_MODEL ?? '';
|
|
58
|
-
const CURRENT_VERSION = '0.8.
|
|
58
|
+
const CURRENT_VERSION = '0.8.3';
|
|
59
59
|
/**
|
|
60
60
|
* ┌──────────────────────────────────────────────────────────────────────┐
|
|
61
61
|
* │ EMBEDDING PROVIDER — pluggable, client-side first │
|
|
@@ -8142,10 +8142,16 @@ if (process.argv[2] === 'setup') {
|
|
|
8142
8142
|
const { resolve, dirname } = await import('node:path');
|
|
8143
8143
|
const { createInterface } = await import('node:readline');
|
|
8144
8144
|
|
|
8145
|
+
// --yes / -y → non-interactive mode (skips all prompts, picks defaults)
|
|
8146
|
+
const nonInteractive = process.argv.includes('--yes') || process.argv.includes('-y');
|
|
8147
|
+
|
|
8145
8148
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
8146
|
-
const ask = (q: string): Promise<string> =>
|
|
8149
|
+
const ask = (q: string, defaultVal = ''): Promise<string> => {
|
|
8150
|
+
if (nonInteractive) { console.log(`${q}${defaultVal}`); return Promise.resolve(defaultVal); }
|
|
8151
|
+
return new Promise(res => rl.question(q, ans => res(ans.trim() || defaultVal)));
|
|
8152
|
+
};
|
|
8147
8153
|
|
|
8148
|
-
console.log('\n🧠 cachly AI Brain —
|
|
8154
|
+
console.log('\n🧠 cachly AI Brain — Setup');
|
|
8149
8155
|
console.log('────────────────────────────────────────\n');
|
|
8150
8156
|
|
|
8151
8157
|
// ── Step 1: Authenticate via OAuth Device Flow ────────────────────────────
|
|
@@ -8322,15 +8328,11 @@ if (process.argv[2] === 'setup') {
|
|
|
8322
8328
|
}
|
|
8323
8329
|
}
|
|
8324
8330
|
|
|
8325
|
-
|
|
8331
|
+
// Auto-pick the most recently created running instance — no prompt.
|
|
8332
|
+
const instance = instances[0];
|
|
8326
8333
|
if (instances.length > 1) {
|
|
8327
|
-
console.log(
|
|
8328
|
-
|
|
8329
|
-
console.log(` ${idx + 1}. ${inst.name.padEnd(24)} ${inst.tier.padEnd(10)} ${inst.region}`)
|
|
8330
|
-
);
|
|
8331
|
-
const raw = await ask(`\n Pick [1-${instances.length}] (Enter = 1): `);
|
|
8332
|
-
const idx = parseInt(raw || '1', 10) - 1;
|
|
8333
|
-
instance = instances[Math.max(0, Math.min(instances.length - 1, idx))];
|
|
8334
|
+
console.log(`ℹ️ Multiple instances found — using most recent: ${instance.name}`);
|
|
8335
|
+
console.log(` (Run with --instance-id <id> to use a different one)\n`);
|
|
8334
8336
|
}
|
|
8335
8337
|
console.log(`✓ Instance: ${instance.name} (${instance.id.slice(0, 8)}…)\n`);
|
|
8336
8338
|
|
|
@@ -8360,28 +8362,11 @@ if (process.argv[2] === 'setup') {
|
|
|
8360
8362
|
const editorLabel = (e: string) =>
|
|
8361
8363
|
({ claude: 'Claude Code', cursor: 'Cursor', windsurf: 'Windsurf', copilot: 'GitHub Copilot', continue: 'Continue.dev', cline: 'Cline (VSCode)', zed: 'Zed' })[e] ?? e;
|
|
8362
8364
|
|
|
8363
|
-
|
|
8364
|
-
const
|
|
8365
|
-
|
|
8366
|
-
? detected
|
|
8367
|
-
: editorsRaw.split(/[,\s]+/).map(s => s.toLowerCase()).filter(s => EDITOR_FILES[s]);
|
|
8368
|
-
console.log('');
|
|
8369
|
-
|
|
8370
|
-
// ── Step 4: Email opt-in ──────────────────────────────────────────────────
|
|
8371
|
-
console.log('Step 4: Stay in the loop (optional)');
|
|
8372
|
-
const email = await ask(' Email for release notes & tips? [Enter to skip]: ');
|
|
8373
|
-
if (email && email.includes('@')) {
|
|
8374
|
-
try {
|
|
8375
|
-
await fetch(`${API_URL}/api/newsletter/subscribe`, {
|
|
8376
|
-
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
|
8377
|
-
body: JSON.stringify({ email: email.trim().toLowerCase(), source: 'mcp-setup' }),
|
|
8378
|
-
signal: AbortSignal.timeout(5000),
|
|
8379
|
-
});
|
|
8380
|
-
console.log('✅ Subscribed — you\'ll only hear from us when it matters.\n');
|
|
8381
|
-
} catch { console.log('⚠️ Could not subscribe (no internet?). Continuing...\n'); }
|
|
8382
|
-
} else { console.log(' Skipped.\n'); }
|
|
8365
|
+
// Auto-configure all detected editors — no prompt needed.
|
|
8366
|
+
const editorsToSetup = detected;
|
|
8367
|
+
console.log(`Step 3: Configuring for: ${editorsToSetup.map(editorLabel).join(', ')}\n`);
|
|
8383
8368
|
|
|
8384
|
-
// ── Step
|
|
8369
|
+
// ── Step 4: Write editor configs ──────────────────────────────────────────
|
|
8385
8370
|
for (const editor of editorsToSetup) {
|
|
8386
8371
|
const configFile = EDITOR_FILES[editor] ?? '.mcp.json';
|
|
8387
8372
|
const configPath = resolve(cwd, configFile);
|
|
@@ -8390,16 +8375,12 @@ if (process.argv[2] === 'setup') {
|
|
|
8390
8375
|
console.log(`✅ Written: ${configFile}`);
|
|
8391
8376
|
}
|
|
8392
8377
|
|
|
8393
|
-
// ── Step
|
|
8378
|
+
// ── Step 5: CLAUDE.md (always — idempotent) ───────────────────────────────
|
|
8394
8379
|
const mdResult = await writeClaudeMd(cwd, instance.id);
|
|
8395
8380
|
const mdLabel = mdResult === 'updated' ? '✅ Updated' : mdResult === 'appended' ? '✅ Appended to' : '✅ Written';
|
|
8396
|
-
console.log(`${mdLabel}: CLAUDE.md`);
|
|
8397
|
-
|
|
8398
|
-
rl.close();
|
|
8399
|
-
console.log(`\n🧠 Done! Restart your editor — the \`cachly\` MCP tools will appear.`);
|
|
8400
|
-
console.log(` Your AI now has persistent memory across every session.\n`);
|
|
8381
|
+
console.log(`${mdLabel}: CLAUDE.md\n`);
|
|
8401
8382
|
|
|
8402
|
-
// ── Step
|
|
8383
|
+
// ── Step 6: Show Brain health (Aha moment) ────────────────────────────────
|
|
8403
8384
|
// Fetch brain health from the API to show the user what their agent will see.
|
|
8404
8385
|
process.stdout.write('\n⏳ Fetching your Brain health preview...');
|
|
8405
8386
|
try {
|
|
@@ -8440,8 +8421,26 @@ if (process.argv[2] === 'setup') {
|
|
|
8440
8421
|
}
|
|
8441
8422
|
} catch { console.log(' (skipped)'); }
|
|
8442
8423
|
|
|
8443
|
-
console.log(`\n
|
|
8444
|
-
console.log(`
|
|
8424
|
+
console.log(`\n🧠 Done! Restart your editor — the \`cachly\` MCP tools will appear.`);
|
|
8425
|
+
console.log(` Your AI now has persistent memory across every session.\n`);
|
|
8426
|
+
console.log(` Dashboard: https://cachly.dev/instances/${instance.id}\n`);
|
|
8427
|
+
|
|
8428
|
+
// ── Step 7: Email opt-in (non-blocking — at the very end) ────────────────
|
|
8429
|
+
if (!nonInteractive) {
|
|
8430
|
+
const email = await ask(' 📬 Stay in the loop? Email for release notes [Enter to skip]: ');
|
|
8431
|
+
if (email && email.includes('@')) {
|
|
8432
|
+
try {
|
|
8433
|
+
await fetch(`${API_URL}/api/newsletter/subscribe`, {
|
|
8434
|
+
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
|
8435
|
+
body: JSON.stringify({ email: email.trim().toLowerCase(), source: 'mcp-setup' }),
|
|
8436
|
+
signal: AbortSignal.timeout(5000),
|
|
8437
|
+
});
|
|
8438
|
+
console.log(' ✅ Subscribed — you\'ll only hear from us when it matters.\n');
|
|
8439
|
+
} catch { /* fire and forget */ }
|
|
8440
|
+
}
|
|
8441
|
+
}
|
|
8442
|
+
|
|
8443
|
+
rl.close();
|
|
8445
8444
|
process.exit(0);
|
|
8446
8445
|
}
|
|
8447
8446
|
|