@aeriondyseti/vector-memory-mcp 0.3.0 → 0.4.0

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 CHANGED
@@ -57,21 +57,38 @@ A production-ready MCP (Model Context Protocol) server that provides semantic me
57
57
 
58
58
  > **Note:** This server requires Bun to run.
59
59
 
60
- ### Installation
60
+ ### Installation & Configuration
61
61
 
62
+ #### Option 1: Global Install (Recommended)
63
+
64
+ **Install:**
62
65
  ```bash
63
- # Clone the repository
64
- git clone https://github.com/AerionDyseti/vector-memory-mcp.git
65
- cd vector-memory-mcp
66
+ bun install -g @aeriondyseti/vector-memory-mcp
67
+ ```
66
68
 
67
- # Install dependencies
68
- bun install
69
+ > **Note:** The installation automatically downloads ML models (~90MB) and verifies native dependencies. This may take a minute on first install.
70
+
71
+ **Configure Claude Code** - Add to `~/.claude/config.json`:
72
+ ```json
73
+ {
74
+ "mcpServers": {
75
+ "memory": {
76
+ "command": "vector-memory-mcp"
77
+ }
78
+ }
79
+ }
69
80
  ```
70
81
 
71
- ### Configure Claude Code
82
+ #### Option 2: Local Development
72
83
 
73
- Add to your `~/.claude/config.json`:
84
+ **Install:**
85
+ ```bash
86
+ git clone https://github.com/AerionDyseti/vector-memory-mcp.git
87
+ cd vector-memory-mcp
88
+ bun install
89
+ ```
74
90
 
91
+ **Configure Claude Code** - Add to `~/.claude/config.json`:
75
92
  ```json
76
93
  {
77
94
  "mcpServers": {
@@ -82,8 +99,17 @@ Add to your `~/.claude/config.json`:
82
99
  }
83
100
  }
84
101
  ```
102
+ *Replace `/absolute/path/to/` with your actual installation path.*
103
+
104
+ ---
105
+
106
+ **What gets installed:**
107
+ - The vector-memory-mcp package and all dependencies
108
+ - Native binaries for ONNX Runtime (~32MB) and image processing (~10MB)
109
+ - ML model files automatically downloaded during installation (~90MB, cached in `~/.cache/huggingface/`)
110
+ - **Total first-time setup:** ~130MB of downloads
85
111
 
86
- Replace `/absolute/path/to/` with your actual installation path.
112
+ > 💡 **Tip:** If you need to re-download models or verify dependencies, run: `vector-memory-mcp warmup`
87
113
 
88
114
  ### Start Using It
89
115
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriondyseti/vector-memory-mcp",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "A zero-configuration RAG memory server for MCP clients",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -9,6 +9,7 @@
9
9
  },
10
10
  "files": [
11
11
  "src",
12
+ "scripts",
12
13
  "README.md",
13
14
  "LICENSE"
14
15
  ],
@@ -28,18 +29,24 @@
28
29
  "test": "bun test --preload ./tests/preload.ts",
29
30
  "test:quick": "bun test",
30
31
  "test:coverage": "bun test --preload ./tests/preload.ts --coverage",
31
- "test:preload": "bun run tests/preload.ts"
32
+ "test:preload": "bun run tests/preload.ts",
33
+ "warmup": "bun run scripts/warmup.ts",
34
+ "postinstall": "bun run scripts/warmup.ts"
32
35
  },
33
- "keywords": ["mcp", "memory", "rag", "embeddings", "lancedb"],
36
+ "keywords": ["mcp", "memory", "rag", "embeddings", "lancedb"],
34
37
  "license": "MIT",
35
38
  "dependencies": {
36
39
  "@lancedb/lancedb": "^0.22.3",
37
40
  "@modelcontextprotocol/sdk": "^1.0.0",
38
- "@huggingface/transformers": "^3.8.0",
39
- "apache-arrow": "^21.1.0"
41
+ "@huggingface/transformers": "^3.8.0"
40
42
  },
41
43
  "devDependencies": {
42
44
  "@types/bun": "latest",
43
45
  "typescript": "^5.0.0"
44
- }
46
+ },
47
+ "trustedDependencies": [
48
+ "onnxruntime-node",
49
+ "protobufjs",
50
+ "sharp"
51
+ ]
45
52
  }
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env bun
2
+
3
+ /**
4
+ * Warmup script to pre-download ML models and verify dependencies
5
+ * This runs during installation to ensure everything is ready to use
6
+ */
7
+
8
+ import { config } from "../src/config/index.js";
9
+ import { EmbeddingsService } from "../src/services/embeddings.service.js";
10
+
11
+ async function warmup(): Promise<void> {
12
+ console.log("🔥 Warming up vector-memory-mcp...");
13
+ console.log();
14
+
15
+ try {
16
+ // Check native dependencies
17
+ console.log("✓ Checking native dependencies...");
18
+ try {
19
+ await import("onnxruntime-node");
20
+ console.log(" ✓ onnxruntime-node loaded");
21
+ } catch (e) {
22
+ console.error(" ✗ onnxruntime-node failed:", (e as Error).message);
23
+ process.exit(1);
24
+ }
25
+
26
+ try {
27
+ await import("sharp");
28
+ console.log(" ✓ sharp loaded");
29
+ } catch (e) {
30
+ console.error(" ✗ sharp failed:", (e as Error).message);
31
+ process.exit(1);
32
+ }
33
+
34
+ console.log();
35
+
36
+ // Initialize embeddings service to download model
37
+ console.log("📥 Downloading ML model (this may take a minute)...");
38
+ console.log(` Model: ${config.embeddingModel}`);
39
+ console.log(` Cache: ~/.cache/huggingface/`);
40
+ console.log();
41
+
42
+ const embeddings = new EmbeddingsService(
43
+ config.embeddingModel,
44
+ config.embeddingDimension
45
+ );
46
+
47
+ // Trigger model download by generating a test embedding
48
+ const startTime = Date.now();
49
+ await embeddings.embed("warmup test");
50
+ const duration = ((Date.now() - startTime) / 1000).toFixed(2);
51
+
52
+ console.log();
53
+ console.log(`✅ Warmup complete! (${duration}s)`);
54
+ console.log();
55
+ console.log("Ready to use! Configure Claude Code and restart to get started.");
56
+ console.log("See: https://github.com/AerionDyseti/vector-memory-mcp#configure-claude-code");
57
+ console.log();
58
+ } catch (error) {
59
+ console.error();
60
+ console.error("❌ Warmup failed:", error);
61
+ console.error();
62
+ console.error("This is not a critical error - the server will download models on first run.");
63
+ console.error("You can try running 'vector-memory-mcp warmup' manually later.");
64
+ process.exit(0); // Exit successfully to not block installation
65
+ }
66
+ }
67
+
68
+ // Only run if this is the main module
69
+ if (import.meta.url === `file://${process.argv[1]}`) {
70
+ warmup();
71
+ }
72
+
73
+ export { warmup };
package/src/index.ts CHANGED
@@ -8,6 +8,14 @@ import { MemoryService } from "./services/memory.service.js";
8
8
  import { startServer } from "./mcp/server.js";
9
9
 
10
10
  async function main(): Promise<void> {
11
+ // Check for warmup command
12
+ const args = process.argv.slice(2);
13
+ if (args[0] === "warmup") {
14
+ const { warmup } = await import("../scripts/warmup.js");
15
+ await warmup();
16
+ return;
17
+ }
18
+
11
19
  // Initialize database
12
20
  const db = await connectToDatabase(config.dbPath);
13
21