@cachly-dev/mcp-server 0.9.3 → 0.9.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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@cachly-dev/mcp-server",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "mcpName": "io.github.cachly-dev/cachly-mcp",
5
- "description": "AI memory brain for Claude Code, Cursor, Copilot & Windsurf — persistent sessions, lessons learned, semantic search, Causal Knowledge Graph, team brain. 54 MCP tools.",
5
+ "description": "Persistent AI memory for Claude Code, Cursor, Copilot & Windsurf — 63 MCP tools. Causal Knowledge Graph, predictive failure detection, continuous learning from git commits + CI, federated knowledge sharing. Your AI learns from every bug fix and never re-researches the same problem.",
6
6
  "type": "module",
7
7
  "bin": {
8
8
  "cachly-mcp": "dist/index.js"
@@ -34,7 +34,7 @@
34
34
  "license": "Apache-2.0",
35
35
  "repository": {
36
36
  "type": "git",
37
- "url": "git+https://github.com/cachly-dev/cachly-mcp.git"
37
+ "url": "git+https://github.com/cachly-dev/cachly.git"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public",
@@ -51,6 +51,8 @@
51
51
  "windsurf",
52
52
  "continue",
53
53
  "ai-memory",
54
+ "ai-brain",
55
+ "persistent-memory",
54
56
  "brain",
55
57
  "sessions",
56
58
  "lessons-learned",
@@ -58,15 +60,22 @@
58
60
  "team-knowledge",
59
61
  "ambient-git",
60
62
  "memory-crystals",
63
+ "causal-knowledge-graph",
64
+ "continuous-learning",
65
+ "predictive-ai",
61
66
  "cachly",
62
67
  "redis",
63
68
  "valkey",
64
69
  "cache",
65
70
  "ai",
66
- "llm"
71
+ "llm",
72
+ "knowledge-base",
73
+ "developer-productivity",
74
+ "ckg",
75
+ "mcp-server"
67
76
  ],
68
77
  "homepage": "https://cachly.dev/docs/mcp",
69
78
  "bugs": {
70
- "url": "https://github.com/cachly-dev/cachly-mcp/issues"
79
+ "url": "https://github.com/cachly-dev/cachly/issues"
71
80
  }
72
81
  }
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
3
  "name": "io.github.cachly-dev/cachly-mcp",
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.",
4
+ "description": "Persistent AI memory for Claude Code, Cursor, Copilot & Windsurf. Your AI learns from every bug fix and never re-researches the same problem. 63 MCP tools — Causal Knowledge Graph, predictive failure detection, continuous learning from git commits, federated knowledge sharing.",
5
5
  "repository": {
6
- "url": "https://github.com/cachly-dev/cachly-mcp",
6
+ "url": "https://github.com/cachly-dev/cachly",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.8.2",
9
+ "version": "0.9.4",
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.8.2",
15
+ "version": "0.9.4",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  }
package/smithery.yaml CHANGED
@@ -6,31 +6,32 @@ startCommand:
6
6
  CACHLY_JWT:
7
7
  type: string
8
8
  title: "API Key"
9
- description: "Your Cachly API key. Get it free at cachly.dev/setup-ai → Dashboard → API Keys. Looks like: cky_live_..."
9
+ description: "Your Cachly API key (free, no credit card). Get it at cachly.dev/setup-ai → Dashboard → API Keys. Looks like: cky_live_... The server auto-detects your Brain instance from this key."
10
10
  examples:
11
11
  - "cky_live_abc123..."
12
12
  CACHLY_BRAIN_INSTANCE_ID:
13
13
  type: string
14
- title: "Brain Instance ID"
15
- description: "UUID of your Cachly Brain instance. Find it at cachly.dev/instances — click your instance and copy the ID from the URL or details panel. Looks like: 9d4077aa-bfa2-468b-89cd-0a8d8f3ec483"
14
+ title: "Brain Instance ID (optional)"
15
+ description: "UUID of your Brain instance — only needed if you have multiple instances. Leave blank and the server auto-picks your active instance. Find the ID at cachly.dev/instances."
16
16
  pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
17
17
  examples:
18
18
  - "9d4077aa-bfa2-468b-89cd-0a8d8f3ec483"
19
19
  CACHLY_API_URL:
20
20
  type: string
21
21
  title: "API URL (optional)"
22
- description: "Cachly API endpoint — leave as default unless you self-host"
22
+ description: "Cachly API endpoint — leave blank unless you self-host"
23
23
  default: "https://api.cachly.dev"
24
24
  required:
25
25
  - CACHLY_JWT
26
- - CACHLY_BRAIN_INSTANCE_ID
27
26
  commandFunction: |-
28
27
  (config) => ({
29
28
  command: "npx",
30
29
  args: ["-y", "@cachly-dev/mcp-server@latest"],
31
- env: {
32
- CACHLY_JWT: config.CACHLY_JWT,
33
- CACHLY_BRAIN_INSTANCE_ID: config.CACHLY_BRAIN_INSTANCE_ID,
34
- CACHLY_API_URL: config.CACHLY_API_URL ?? "https://api.cachly.dev",
35
- }
30
+ env: Object.fromEntries(
31
+ Object.entries({
32
+ CACHLY_JWT: config.CACHLY_JWT,
33
+ CACHLY_BRAIN_INSTANCE_ID: config.CACHLY_BRAIN_INSTANCE_ID,
34
+ CACHLY_API_URL: config.CACHLY_API_URL ?? "https://api.cachly.dev",
35
+ }).filter(([, v]) => v != null && v !== "")
36
+ )
36
37
  })
package/src/index.ts CHANGED
@@ -55,7 +55,31 @@ 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.9.3';
58
+ const CURRENT_VERSION = '0.9.4';
59
+
60
+ // ── Default Instance Resolution (for Smithery & single-credential setups) ────
61
+ // When CACHLY_BRAIN_INSTANCE_ID is set, tools can omit the instance_id parameter.
62
+ // When neither is set, we auto-fetch the first running instance once per process.
63
+ let _defaultInstanceId: string = process.env.CACHLY_BRAIN_INSTANCE_ID ?? '';
64
+ let _defaultInstanceFetched = false;
65
+
66
+ async function resolveDefaultInstanceId(): Promise<string> {
67
+ if (_defaultInstanceId) return _defaultInstanceId;
68
+ if (_defaultInstanceFetched) return '';
69
+ _defaultInstanceFetched = true;
70
+ if (!JWT) return '';
71
+ try {
72
+ const res = await fetch(`${API_URL}/api/v1/instances`, {
73
+ headers: { Authorization: `Bearer ${JWT}`, Accept: 'application/json' },
74
+ signal: AbortSignal.timeout(5000),
75
+ });
76
+ if (!res.ok) return '';
77
+ const data = await res.json() as { data?: Array<{ id: string; status: string }> };
78
+ const running = (data?.data ?? []).filter(i => i.status === 'running');
79
+ if (running.length > 0) { _defaultInstanceId = running[0].id; return _defaultInstanceId; }
80
+ } catch { /* non-fatal — caller will surface missing instance_id error */ }
81
+ return '';
82
+ }
59
83
  /**
60
84
  * ┌──────────────────────────────────────────────────────────────────────┐
61
85
  * │ EMBEDDING PROVIDER — pluggable, client-side first │
@@ -3871,6 +3895,12 @@ async function handleTool(name: string, args: Record<string, unknown>): Promise<
3871
3895
  ].join('\n');
3872
3896
  }
3873
3897
 
3898
+ // Auto-resolve instance_id from env / API when not provided in args
3899
+ if (!args.instance_id) {
3900
+ const defaultId = await resolveDefaultInstanceId();
3901
+ if (defaultId) args = { ...args, instance_id: defaultId };
3902
+ }
3903
+
3874
3904
  // Delegate v0.2 bulk/lock/stream tools first
3875
3905
  const bulkResult = await handleBulkLockStream(name, args);
3876
3906
  if (bulkResult !== null) return bulkResult;