@aeriondyseti/vector-memory-mcp 0.5.0 โ 0.9.0-alpha.1
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 +71 -367
- package/dist/package.json +73 -0
- package/dist/scripts/publish.d.ts +13 -0
- package/dist/scripts/publish.d.ts.map +1 -0
- package/dist/scripts/publish.js +56 -0
- package/dist/scripts/publish.js.map +1 -0
- package/dist/scripts/test-runner.d.ts +9 -0
- package/dist/scripts/test-runner.d.ts.map +1 -0
- package/dist/scripts/test-runner.js +61 -0
- package/dist/scripts/test-runner.js.map +1 -0
- package/dist/scripts/warmup.d.ts +8 -0
- package/dist/scripts/warmup.d.ts.map +1 -0
- package/dist/scripts/warmup.js +61 -0
- package/dist/scripts/warmup.js.map +1 -0
- package/dist/src/config/index.d.ts +24 -0
- package/dist/src/config/index.d.ts.map +1 -0
- package/dist/src/config/index.js +48 -0
- package/dist/src/config/index.js.map +1 -0
- package/dist/src/db/connection.d.ts +3 -0
- package/dist/src/db/connection.d.ts.map +1 -0
- package/dist/src/db/connection.js +10 -0
- package/dist/src/db/connection.js.map +1 -0
- package/dist/src/db/memory.repository.d.ts +13 -0
- package/dist/src/db/memory.repository.d.ts.map +1 -0
- package/dist/src/db/memory.repository.js +97 -0
- package/dist/src/db/memory.repository.js.map +1 -0
- package/dist/src/db/schema.d.ts +4 -0
- package/dist/src/db/schema.d.ts.map +1 -0
- package/dist/src/db/schema.js +12 -0
- package/dist/src/db/schema.js.map +1 -0
- package/dist/src/http/mcp-transport.d.ts +19 -0
- package/dist/src/http/mcp-transport.d.ts.map +1 -0
- package/dist/src/http/mcp-transport.js +192 -0
- package/dist/src/http/mcp-transport.js.map +1 -0
- package/dist/src/http/server.d.ts +12 -0
- package/dist/src/http/server.d.ts.map +1 -0
- package/dist/src/http/server.js +168 -0
- package/dist/src/http/server.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +59 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/mcp/handlers.d.ts +11 -0
- package/dist/src/mcp/handlers.d.ts.map +1 -0
- package/dist/src/mcp/handlers.js +175 -0
- package/dist/src/mcp/handlers.js.map +1 -0
- package/dist/src/mcp/server.d.ts +5 -0
- package/dist/src/mcp/server.d.ts.map +1 -0
- package/dist/src/mcp/server.js +23 -0
- package/dist/src/mcp/server.js.map +1 -0
- package/dist/src/mcp/tools.d.ts +9 -0
- package/dist/src/mcp/tools.d.ts.map +1 -0
- package/dist/src/mcp/tools.js +243 -0
- package/dist/src/mcp/tools.js.map +1 -0
- package/dist/src/services/embeddings.service.d.ts +12 -0
- package/dist/src/services/embeddings.service.d.ts.map +1 -0
- package/dist/src/services/embeddings.service.js +37 -0
- package/dist/src/services/embeddings.service.js.map +1 -0
- package/dist/src/services/memory.service.d.ts +31 -0
- package/dist/src/services/memory.service.d.ts.map +1 -0
- package/dist/src/services/memory.service.js +131 -0
- package/dist/src/services/memory.service.js.map +1 -0
- package/dist/src/types/memory.d.ts +17 -0
- package/dist/src/types/memory.d.ts.map +1 -0
- package/dist/src/types/memory.js +15 -0
- package/dist/src/types/memory.js.map +1 -0
- package/hooks/session-start.ts +100 -0
- package/package.json +25 -9
- package/scripts/publish.ts +61 -0
- package/scripts/warmup.ts +1 -2
- package/src/config/index.ts +0 -37
- package/src/db/connection.ts +0 -11
- package/src/db/memory.repository.ts +0 -94
- package/src/db/schema.ts +0 -33
- package/src/http/server.ts +0 -173
- package/src/index.ts +0 -37
- package/src/mcp/handlers.ts +0 -112
- package/src/mcp/server.ts +0 -34
- package/src/mcp/tools.ts +0 -109
- package/src/services/embeddings.service.ts +0 -46
- package/src/services/memory.service.ts +0 -107
- package/src/types/memory.ts +0 -35
package/README.md
CHANGED
|
@@ -1,445 +1,149 @@
|
|
|
1
1
|
# Vector Memory MCP Server
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Semantic memory storage for AI assistants. Store decisions, patterns, and context that persists across sessions.
|
|
4
4
|
|
|
5
|
-
A
|
|
6
|
-
|
|
7
|
-
**Perfect for:** Software teams maintaining architectural knowledge, developers juggling multiple projects, and anyone building with AI assistants like Claude Code.
|
|
5
|
+
A local-first MCP server that provides vector-based memory storage. Uses local embeddings and LanceDB for fast, private semantic search.
|
|
8
6
|
|
|
9
7
|
[](https://opensource.org/licenses/MIT)
|
|
10
|
-
[](https://bun.sh/)
|
|
12
|
-
[](https://modelcontextprotocol.io)
|
|
8
|
+
[](https://www.npmjs.com/package/@aeriondyseti/vector-memory-mcp)
|
|
13
9
|
|
|
14
10
|
---
|
|
15
11
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
### ๐ **Local-First & Private**
|
|
19
|
-
- All embeddings generated locally (no cloud APIs)
|
|
20
|
-
- Data stored in local LanceDB databases
|
|
21
|
-
- Complete privacy and control over your memories
|
|
22
|
-
|
|
23
|
-
### ๐ฏ **Intelligent Semantic Search**
|
|
24
|
-
- Vector similarity with multi-factor scoring
|
|
25
|
-
- Considers relevance, recency, priority, and usage frequency
|
|
26
|
-
- Context-aware retrieval based on conversation flow
|
|
27
|
-
|
|
28
|
-
### ๐ **Smart Memory Storage**
|
|
29
|
-
- Stores memories in `~/.local/share/vector-memory-mcp/memories.db`
|
|
30
|
-
- Fast LanceDB-based storage with vector search capabilities
|
|
31
|
-
- Memories persist across sessions and projects
|
|
32
|
-
|
|
33
|
-
### โก **High Performance**
|
|
34
|
-
- Sub-100ms search latency for 1000+ memories
|
|
35
|
-
- Efficient storage (<10MB per 1000 memories)
|
|
36
|
-
- CPU-optimized local embeddings (no GPU required)
|
|
12
|
+
## Features
|
|
37
13
|
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
### ๐ ๏ธ **Developer-Friendly**
|
|
44
|
-
- Zero-configuration setup
|
|
45
|
-
- Built with Bun for maximum performance
|
|
46
|
-
- Simple MCP tools for storing and searching
|
|
47
|
-
- TypeScript for type safety
|
|
14
|
+
- **Local & Private** - All embeddings generated locally, data stored in local LanceDB
|
|
15
|
+
- **Semantic Search** - Vector similarity search with configurable scoring
|
|
16
|
+
- **Batch Operations** - Store, update, delete, and retrieve multiple memories at once
|
|
17
|
+
- **Session Handoffs** - Save and restore project context between sessions
|
|
18
|
+
- **MCP Native** - Standard protocol, works with any MCP-compatible client
|
|
48
19
|
|
|
49
20
|
---
|
|
50
21
|
|
|
51
|
-
##
|
|
22
|
+
## Quick Start
|
|
52
23
|
|
|
53
24
|
### Prerequisites
|
|
54
25
|
|
|
55
|
-
- [Bun](https://bun.sh/) 1.0+
|
|
56
|
-
- Claude Code
|
|
57
|
-
|
|
58
|
-
> **Note:** This server requires Bun to run.
|
|
26
|
+
- [Bun](https://bun.sh/) 1.0+ (recommended) or [Node.js](https://nodejs.org/) 20+
|
|
27
|
+
- An MCP-compatible client (Claude Code, Claude Desktop, etc.)
|
|
59
28
|
|
|
60
|
-
###
|
|
29
|
+
### Install
|
|
61
30
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
**Install:**
|
|
31
|
+
**With Bun (recommended):**
|
|
65
32
|
```bash
|
|
66
33
|
bun install -g @aeriondyseti/vector-memory-mcp
|
|
67
34
|
```
|
|
68
35
|
|
|
69
|
-
|
|
36
|
+
**With npm/Node.js:**
|
|
37
|
+
```bash
|
|
38
|
+
npm install -g @aeriondyseti/vector-memory-mcp
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
> First install downloads ML models (~90MB). This may take a minute.
|
|
42
|
+
|
|
43
|
+
### Configure
|
|
44
|
+
|
|
45
|
+
Add to your MCP client config (e.g., `~/.claude/settings.json`):
|
|
70
46
|
|
|
71
|
-
**
|
|
47
|
+
**With Bun:**
|
|
72
48
|
```json
|
|
73
49
|
{
|
|
74
50
|
"mcpServers": {
|
|
75
|
-
"memory": {
|
|
51
|
+
"vector-memory": {
|
|
76
52
|
"type": "stdio",
|
|
77
53
|
"command": "bunx",
|
|
78
|
-
"args": [
|
|
79
|
-
"--bun",
|
|
80
|
-
"@aeriondyseti/vector-memory-mcp"
|
|
81
|
-
],
|
|
82
|
-
"env": {}
|
|
54
|
+
"args": ["--bun", "@aeriondyseti/vector-memory-mcp"]
|
|
83
55
|
}
|
|
84
56
|
}
|
|
85
57
|
}
|
|
86
58
|
```
|
|
87
59
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
**Install:**
|
|
91
|
-
```bash
|
|
92
|
-
git clone https://github.com/AerionDyseti/vector-memory-mcp.git
|
|
93
|
-
cd vector-memory-mcp
|
|
94
|
-
bun install
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
**Configure Claude Code** - Add to `~/.claude/config.json`:
|
|
60
|
+
**With Node.js:**
|
|
98
61
|
```json
|
|
99
62
|
{
|
|
100
63
|
"mcpServers": {
|
|
101
|
-
"memory": {
|
|
102
|
-
"
|
|
103
|
-
"
|
|
64
|
+
"vector-memory": {
|
|
65
|
+
"type": "stdio",
|
|
66
|
+
"command": "npx",
|
|
67
|
+
"args": ["-y", "@aeriondyseti/vector-memory-mcp"]
|
|
104
68
|
}
|
|
105
69
|
}
|
|
106
70
|
}
|
|
107
71
|
```
|
|
108
|
-
*Replace `/absolute/path/to/` with your actual installation path.*
|
|
109
72
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
**What gets installed:**
|
|
113
|
-
- The vector-memory-mcp package and all dependencies
|
|
114
|
-
- Native binaries for ONNX Runtime (~32MB) and image processing (~10MB)
|
|
115
|
-
- ML model files automatically downloaded during installation (~90MB, cached in `~/.cache/huggingface/`)
|
|
116
|
-
- **Total first-time setup:** ~130MB of downloads
|
|
73
|
+
### Use
|
|
117
74
|
|
|
118
|
-
|
|
75
|
+
Restart your MCP client. You now have access to:
|
|
119
76
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
77
|
+
| Tool | Description |
|
|
78
|
+
|------|-------------|
|
|
79
|
+
| `store_memories` | Save memories (accepts array) |
|
|
80
|
+
| `search_memories` | Find relevant memories semantically |
|
|
81
|
+
| `get_memories` | Retrieve memories by ID (accepts array) |
|
|
82
|
+
| `update_memories` | Update existing memories |
|
|
83
|
+
| `delete_memories` | Remove memories (accepts array) |
|
|
84
|
+
| `store_handoff` | Save session context for later |
|
|
85
|
+
| `get_handoff` | Restore session context |
|
|
127
86
|
|
|
128
87
|
---
|
|
129
88
|
|
|
130
|
-
##
|
|
131
|
-
|
|
132
|
-
### Storing Memories
|
|
133
|
-
|
|
134
|
-
Ask Claude Code to remember things for you:
|
|
89
|
+
## Usage
|
|
135
90
|
|
|
91
|
+
**Store a memory:**
|
|
136
92
|
```
|
|
137
93
|
You: "Remember that we use Drizzle ORM for database access"
|
|
138
|
-
|
|
94
|
+
Assistant: [calls store_memories]
|
|
139
95
|
```
|
|
140
96
|
|
|
141
|
-
|
|
142
|
-
```json
|
|
143
|
-
{
|
|
144
|
-
"content": "Use Drizzle ORM for type-safe database access",
|
|
145
|
-
"metadata": {
|
|
146
|
-
"tags": ["architecture", "database"],
|
|
147
|
-
"category": "tooling"
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
### Searching Memories
|
|
153
|
-
|
|
154
|
-
Claude Code automatically searches memories when relevant, or you can ask:
|
|
155
|
-
|
|
97
|
+
**Search memories:**
|
|
156
98
|
```
|
|
157
99
|
You: "What did we decide about the database?"
|
|
158
|
-
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Search parameters:
|
|
162
|
-
```json
|
|
163
|
-
{
|
|
164
|
-
"query": "authentication strategy",
|
|
165
|
-
"limit": 10
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### Managing Memories
|
|
170
|
-
|
|
171
|
-
Retrieve a specific memory:
|
|
172
|
-
```json
|
|
173
|
-
{
|
|
174
|
-
"id": "memory-id-here"
|
|
175
|
-
}
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
Delete a memory:
|
|
179
|
-
```json
|
|
180
|
-
{
|
|
181
|
-
"id": "memory-id-here"
|
|
182
|
-
}
|
|
100
|
+
Assistant: [calls search_memories with relevant query]
|
|
183
101
|
```
|
|
184
102
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
## ๐๏ธ Architecture
|
|
188
|
-
|
|
103
|
+
**Session handoffs:**
|
|
189
104
|
```
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
โ โโโ index.ts # Entry point
|
|
193
|
-
โ โโโ config/ # Configuration management
|
|
194
|
-
โ โโโ db/ # Database layer (LanceDB)
|
|
195
|
-
โ โโโ services/
|
|
196
|
-
โ โ โโโ embeddings.service.ts # Embeddings via @huggingface/transformers
|
|
197
|
-
โ โ โโโ memory.service.ts # Core memory operations
|
|
198
|
-
โ โโโ mcp/
|
|
199
|
-
โ โโโ server.ts # MCP server setup
|
|
200
|
-
โ โโโ tools.ts # MCP tool definitions
|
|
201
|
-
โ โโโ handlers.ts # Tool request handlers
|
|
202
|
-
โโโ tests/
|
|
203
|
-
โ โโโ memory.test.ts
|
|
204
|
-
โ โโโ embeddings.test.ts
|
|
205
|
-
โโโ bin/
|
|
206
|
-
โ โโโ vector-memory-mcp.js # Executable entry point
|
|
207
|
-
โโโ package.json
|
|
105
|
+
You: "Save context for next session"
|
|
106
|
+
Assistant: [calls store_handoff with summary, completed items, next steps]
|
|
208
107
|
```
|
|
209
108
|
|
|
210
|
-
### Technology Stack
|
|
211
|
-
|
|
212
|
-
- **MCP Framework**: @modelcontextprotocol/sdk (official SDK)
|
|
213
|
-
- **Vector Database**: LanceDB (fast, local, vector search)
|
|
214
|
-
- **Embeddings**: [@huggingface/transformers](https://huggingface.co/docs/transformers.js) (Xenova/all-MiniLM-L6-v2, 384 dimensions)
|
|
215
|
-
- **Language**: TypeScript 5.0+
|
|
216
|
-
- **Runtime**: Bun 1.0+
|
|
217
|
-
- **Testing**: Bun test
|
|
218
|
-
|
|
219
109
|
---
|
|
220
110
|
|
|
221
|
-
##
|
|
222
|
-
|
|
223
|
-
### 1. Memory Storage
|
|
224
|
-
|
|
225
|
-
```
|
|
226
|
-
Claude Code calls store_memory tool
|
|
227
|
-
โ
|
|
228
|
-
Content โ @huggingface/transformers โ 384d vector
|
|
229
|
-
โ
|
|
230
|
-
Store in LanceDB with metadata
|
|
231
|
-
โ
|
|
232
|
-
~/.local/share/vector-memory-mcp/memories.db
|
|
233
|
-
```
|
|
111
|
+
## Configuration
|
|
234
112
|
|
|
235
|
-
|
|
113
|
+
Environment variables:
|
|
236
114
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
Vector search in LanceDB
|
|
243
|
-
โ
|
|
244
|
-
Vector similarity scoring
|
|
245
|
-
โ
|
|
246
|
-
Return top N relevant memories
|
|
247
|
-
```
|
|
115
|
+
| Variable | Default | Description |
|
|
116
|
+
|----------|---------|-------------|
|
|
117
|
+
| `VECTOR_MEMORY_DB_PATH` | `.vector-memory/memories.db` | Database location |
|
|
118
|
+
| `VECTOR_MEMORY_MODEL` | `Xenova/all-MiniLM-L6-v2` | Embedding model |
|
|
119
|
+
| `VECTOR_MEMORY_HTTP_PORT` | `3271` | HTTP server port |
|
|
248
120
|
|
|
249
121
|
---
|
|
250
122
|
|
|
251
|
-
##
|
|
123
|
+
## Development
|
|
252
124
|
|
|
253
|
-
The server uses environment variables for configuration:
|
|
254
|
-
|
|
255
|
-
- `VECTOR_MEMORY_DB_PATH` - Custom database path (default: `~/.local/share/vector-memory-mcp/memories.db`)
|
|
256
|
-
- `VECTOR_MEMORY_MODEL` - Embedding model to use (default: `Xenova/all-MiniLM-L6-v2`)
|
|
257
|
-
|
|
258
|
-
Example:
|
|
259
125
|
```bash
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
Or in your Claude Code config:
|
|
265
|
-
```json
|
|
266
|
-
{
|
|
267
|
-
"mcpServers": {
|
|
268
|
-
"memory": {
|
|
269
|
-
"command": "vector-memory-mcp",
|
|
270
|
-
"env": {
|
|
271
|
-
"VECTOR_MEMORY_DB_PATH": "/custom/path/memories.db"
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
---
|
|
279
|
-
|
|
280
|
-
## ๐งช Development
|
|
281
|
-
|
|
282
|
-
### Running Tests
|
|
283
|
-
|
|
284
|
-
```bash
|
|
285
|
-
# Run all tests
|
|
286
|
-
bun test
|
|
287
|
-
|
|
288
|
-
# Run with coverage
|
|
289
|
-
bun test --coverage
|
|
290
|
-
|
|
291
|
-
# Type checking
|
|
292
|
-
bun run typecheck
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
### Development Mode
|
|
296
|
-
|
|
297
|
-
```bash
|
|
298
|
-
# Watch mode - auto-restart on file changes
|
|
299
|
-
bun run dev
|
|
300
|
-
|
|
301
|
-
# Run directly without building
|
|
302
|
-
bun run src/index.ts
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
### Building
|
|
306
|
-
|
|
307
|
-
```bash
|
|
308
|
-
# Build for production
|
|
309
|
-
bun run build
|
|
126
|
+
git clone https://github.com/AerionDyseti/vector-memory-mcp.git
|
|
127
|
+
cd vector-memory-mcp
|
|
128
|
+
bun install
|
|
310
129
|
|
|
311
|
-
|
|
130
|
+
bun run test # Run all tests
|
|
131
|
+
bun run dev # Watch mode
|
|
132
|
+
bun run typecheck # Type checking
|
|
312
133
|
```
|
|
313
134
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
## ๐บ๏ธ Roadmap
|
|
317
|
-
|
|
318
|
-
### โ
Phase 1: Foundation (Current)
|
|
319
|
-
- โ
Core database with LanceDB
|
|
320
|
-
- โ
Embedding generation with @huggingface/transformers
|
|
321
|
-
- โ
Basic MCP tools (store, search, get, delete)
|
|
322
|
-
- โ
TypeScript implementation with Drizzle ORM
|
|
323
|
-
|
|
324
|
-
### ๐ง Phase 2: Enhanced Search & Scoring
|
|
325
|
-
- Multi-factor scoring algorithm (similarity, recency, priority, usage frequency)
|
|
326
|
-
- Configurable scoring weights
|
|
327
|
-
- Priority levels for memories
|
|
328
|
-
- Usage tracking and frequency-based ranking
|
|
329
|
-
- Metadata filtering and advanced tagging
|
|
330
|
-
|
|
331
|
-
### ๐ Phase 3: Dual-Level Memory System
|
|
332
|
-
- Project-specific memories (`.memory/db` in repo)
|
|
333
|
-
- Global memories (`~/.local/share/vector-memory-mcp/`)
|
|
334
|
-
- Automatic precedence handling (project overrides global)
|
|
335
|
-
- Project detection and context switching
|
|
336
|
-
|
|
337
|
-
### ๐ฏ Phase 4: Smart Automation
|
|
338
|
-
- Auto-detect architectural decisions
|
|
339
|
-
- Capture bug fixes and solutions automatically
|
|
340
|
-
- Generate session-end summaries
|
|
341
|
-
- Natural language trigger detection (85%+ accuracy)
|
|
342
|
-
- Continuous conversation monitoring
|
|
343
|
-
|
|
344
|
-
### ๐ฎ Phase 5: Advanced Features
|
|
345
|
-
- Memory deduplication with similarity threshold
|
|
346
|
-
- Batch operations (import/export)
|
|
347
|
-
- Markdown import/export
|
|
348
|
-
- Memory clustering and visualization
|
|
349
|
-
- Cross-project insights
|
|
350
|
-
- Multi-modal memories (images, diagrams)
|
|
351
|
-
- Session hooks for automatic context injection
|
|
352
|
-
- Multi-CLI support (Cursor, Windsurf, etc.)
|
|
353
|
-
- Smart priority suggestions
|
|
354
|
-
|
|
355
|
-
---
|
|
356
|
-
|
|
357
|
-
## ๐ค Contributing
|
|
358
|
-
|
|
359
|
-
Contributions are welcome! This project is in active development.
|
|
360
|
-
|
|
361
|
-
### Areas We'd Love Help With:
|
|
362
|
-
- Testing and bug reports
|
|
363
|
-
- Documentation improvements
|
|
364
|
-
- Performance optimizations
|
|
365
|
-
- New feature ideas
|
|
366
|
-
|
|
367
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines *(coming soon)*.
|
|
368
|
-
|
|
369
|
-
---
|
|
370
|
-
|
|
371
|
-
## ๐ License
|
|
372
|
-
|
|
373
|
-
MIT License - see [LICENSE](LICENSE) for details.
|
|
374
|
-
|
|
375
|
-
---
|
|
376
|
-
|
|
377
|
-
## ๐ Acknowledgments
|
|
378
|
-
|
|
379
|
-
- Built with [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk) - Official MCP TypeScript SDK
|
|
380
|
-
- Uses [LanceDB](https://lancedb.com/) for fast, local vector search
|
|
381
|
-
- Powered by [@huggingface/transformers](https://huggingface.co/docs/transformers.js) for local embeddings
|
|
382
|
-
- Database layer via [Drizzle ORM](https://orm.drizzle.team/)
|
|
383
|
-
- Inspired by [doobidoo's mcp-memory-service](https://github.com/doobidoo/mcp-memory-service)
|
|
384
|
-
|
|
385
|
-
---
|
|
386
|
-
|
|
387
|
-
## ๐ Related Projects
|
|
388
|
-
|
|
389
|
-
- [Model Context Protocol](https://modelcontextprotocol.io) - Official MCP specification
|
|
390
|
-
- [Claude Code](https://claude.ai/code) - AI coding assistant from Anthropic
|
|
391
|
-
- [LanceDB](https://lancedb.com/) - Fast, local vector search
|
|
392
|
-
- [Transformers.js](https://huggingface.co/docs/transformers.js) - Run transformers in JavaScript
|
|
393
|
-
|
|
394
|
-
---
|
|
395
|
-
|
|
396
|
-
## ๐ฌ Support
|
|
397
|
-
|
|
398
|
-
- **Issues**: [GitHub Issues](https://github.com/AerionDyseti/vector-memory-mcp/issues)
|
|
399
|
-
- **Discussions**: [GitHub Discussions](https://github.com/AerionDyseti/vector-memory-mcp/discussions)
|
|
400
|
-
- **Documentation**: Check the `docs/` directory
|
|
135
|
+
See [CHANGELOG.md](CHANGELOG.md) for release history and [ROADMAP.md](ROADMAP.md) for planned features.
|
|
401
136
|
|
|
402
137
|
---
|
|
403
138
|
|
|
404
|
-
##
|
|
405
|
-
|
|
406
|
-
### Example 1: Storing a Decision
|
|
407
|
-
|
|
408
|
-
```
|
|
409
|
-
You: "Remember that we decided to use Drizzle ORM for type-safe database access"
|
|
410
|
-
Claude: I'll store that for you.
|
|
411
|
-
[Calls store_memory tool with content and metadata]
|
|
412
|
-
โ Memory stored successfully
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
### Example 2: Searching Memories
|
|
139
|
+
## Contributing
|
|
416
140
|
|
|
417
|
-
|
|
418
|
-
You: "What did we decide about database tooling?"
|
|
419
|
-
Claude: Let me search for that...
|
|
420
|
-
[Calls search_memories with query about database]
|
|
421
|
-
Found: "Use Drizzle ORM for type-safe database access"
|
|
422
|
-
|
|
423
|
-
Based on our previous decision, we're using Drizzle ORM...
|
|
424
|
-
```
|
|
141
|
+
Contributions welcome! See [issues](https://github.com/AerionDyseti/vector-memory-mcp/issues) for areas we'd love help with.
|
|
425
142
|
|
|
426
|
-
|
|
143
|
+
## License
|
|
427
144
|
|
|
428
|
-
|
|
429
|
-
You: "Show me what you remember about authentication"
|
|
430
|
-
Claude: [Searches for authentication-related memories]
|
|
431
|
-
Found 3 memories:
|
|
432
|
-
1. "Use JWT tokens for API authentication"
|
|
433
|
-
2. "Store refresh tokens in httpOnly cookies"
|
|
434
|
-
3. "Implement rate limiting on auth endpoints"
|
|
435
|
-
```
|
|
145
|
+
MIT - see [LICENSE](LICENSE)
|
|
436
146
|
|
|
437
147
|
---
|
|
438
148
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
**[โฌ Back to Top](#vector-memory-mcp-server)**
|
|
442
|
-
|
|
443
|
-
Made with โค๏ธ for developers who value context continuity
|
|
444
|
-
|
|
445
|
-
</div>
|
|
149
|
+
Built with [MCP SDK](https://github.com/modelcontextprotocol/typescript-sdk), [LanceDB](https://lancedb.com/), and [Transformers.js](https://huggingface.co/docs/transformers.js)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aeriondyseti/vector-memory-mcp",
|
|
3
|
+
"version": "0.9.0-alpha.1",
|
|
4
|
+
"description": "A zero-configuration RAG memory server for MCP clients",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/src/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"vector-memory-mcp": "dist/src/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"scripts",
|
|
13
|
+
"hooks",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/AerionDyseti/vector-memory-mcp.git"
|
|
20
|
+
},
|
|
21
|
+
"author": "AerionDyseti",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/AerionDyseti/vector-memory-mcp/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/AerionDyseti/vector-memory-mcp#readme",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"start": "node dist/src/index.js",
|
|
28
|
+
"dev": "bun run build && node dist/src/index.js",
|
|
29
|
+
"dev:watch": "bun run build && bun --watch run src/index.ts",
|
|
30
|
+
"build": "tsc",
|
|
31
|
+
"prebuild": "rm -rf dist",
|
|
32
|
+
"typecheck": "bunx tsc --noEmit",
|
|
33
|
+
"test": "bun run scripts/test-runner.ts",
|
|
34
|
+
"test:raw": "bun test --preload ./tests/preload.ts",
|
|
35
|
+
"test:quick": "bun test",
|
|
36
|
+
"test:coverage": "bun test --preload ./tests/preload.ts --coverage",
|
|
37
|
+
"test:preload": "bun run tests/preload.ts",
|
|
38
|
+
"warmup": "node dist/scripts/warmup.js",
|
|
39
|
+
"postinstall": "node dist/scripts/warmup.js",
|
|
40
|
+
"publish:check": "bun run scripts/publish.ts --dry-run",
|
|
41
|
+
"publish:npm": "bun run scripts/publish.ts",
|
|
42
|
+
"publish:alpha": "npm publish --access public --tag alpha",
|
|
43
|
+
"prepublishOnly": "bun run build"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"mcp",
|
|
47
|
+
"memory",
|
|
48
|
+
"rag",
|
|
49
|
+
"embeddings",
|
|
50
|
+
"lancedb"
|
|
51
|
+
],
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@hono/node-server": "^1.19.7",
|
|
55
|
+
"@huggingface/transformers": "^3.8.0",
|
|
56
|
+
"@lancedb/lancedb": "^0.22.3",
|
|
57
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
58
|
+
"arg": "^5.0.2",
|
|
59
|
+
"hono": "^4.11.3"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@types/bun": "latest",
|
|
63
|
+
"typescript": "^5.0.0"
|
|
64
|
+
},
|
|
65
|
+
"trustedDependencies": [
|
|
66
|
+
"onnxruntime-node",
|
|
67
|
+
"protobufjs",
|
|
68
|
+
"sharp"
|
|
69
|
+
],
|
|
70
|
+
"overrides": {
|
|
71
|
+
"onnxruntime-node": "1.23.2"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* Publish script for vector-memory-mcp
|
|
4
|
+
*
|
|
5
|
+
* Prerequisites:
|
|
6
|
+
* 1. Create a granular access token at https://www.npmjs.com/settings/tokens
|
|
7
|
+
* 2. Store it: npm config set //registry.npmjs.org/:_authToken=npm_YOUR_TOKEN
|
|
8
|
+
* Or set NPM_TOKEN environment variable
|
|
9
|
+
*
|
|
10
|
+
* Usage: bun run scripts/publish.ts [--dry-run]
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=publish.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../scripts/publish.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* Publish script for vector-memory-mcp
|
|
4
|
+
*
|
|
5
|
+
* Prerequisites:
|
|
6
|
+
* 1. Create a granular access token at https://www.npmjs.com/settings/tokens
|
|
7
|
+
* 2. Store it: npm config set //registry.npmjs.org/:_authToken=npm_YOUR_TOKEN
|
|
8
|
+
* Or set NPM_TOKEN environment variable
|
|
9
|
+
*
|
|
10
|
+
* Usage: bun run scripts/publish.ts [--dry-run]
|
|
11
|
+
*/
|
|
12
|
+
import { $ } from "bun";
|
|
13
|
+
const dryRun = process.argv.includes("--dry-run");
|
|
14
|
+
async function main() {
|
|
15
|
+
// Check for authentication
|
|
16
|
+
console.log("๐ Checking NPM authentication...");
|
|
17
|
+
try {
|
|
18
|
+
const whoami = await $ `npm whoami`.text();
|
|
19
|
+
console.log(`โ
Authenticated as: ${whoami.trim()}`);
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
console.error("โ Not authenticated with NPM.");
|
|
23
|
+
console.error(" Option 1: npm login");
|
|
24
|
+
console.error(" Option 2: npm config set //registry.npmjs.org/:_authToken=npm_YOUR_TOKEN");
|
|
25
|
+
console.error(" Option 3: Set NPM_TOKEN environment variable");
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
// Run tests
|
|
29
|
+
console.log("๐งช Running tests...");
|
|
30
|
+
const testResult = await $ `bun run test`.quiet();
|
|
31
|
+
if (testResult.exitCode !== 0) {
|
|
32
|
+
console.error("โ Tests failed. Aborting publish.");
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
console.log("โ
Tests passed");
|
|
36
|
+
// Build
|
|
37
|
+
console.log("๐จ Building...");
|
|
38
|
+
await $ `bun run build`;
|
|
39
|
+
console.log("โ
Build complete");
|
|
40
|
+
// Get version info
|
|
41
|
+
const pkg = await Bun.file("package.json").json();
|
|
42
|
+
console.log(`\n๐ฆ Publishing ${pkg.name}@${pkg.version}...`);
|
|
43
|
+
if (dryRun) {
|
|
44
|
+
console.log("๐ Dry run - would publish:");
|
|
45
|
+
await $ `npm publish --dry-run`;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
await $ `npm publish --access public`;
|
|
49
|
+
console.log(`\nโ
Published ${pkg.name}@${pkg.version}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
main().catch((err) => {
|
|
53
|
+
console.error("โ Publish failed:", err.message);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=publish.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../scripts/publish.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAElD,KAAK,UAAU,IAAI;IACjB,2BAA2B;IAC3B,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;IACjD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,CAAC,CAAA,YAAY,CAAC,IAAI,EAAE,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,uBAAuB,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QAC/C,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QACxC,OAAO,CAAC,KAAK,CAAC,6EAA6E,CAAC,CAAC;QAC7F,OAAO,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACjE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,YAAY;IACZ,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IACnC,MAAM,UAAU,GAAG,MAAM,CAAC,CAAA,cAAc,CAAC,KAAK,EAAE,CAAC;IACjD,IAAI,UAAU,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAE9B,QAAQ;IACR,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC9B,MAAM,CAAC,CAAA,eAAe,CAAC;IACvB,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAEhC,mBAAmB;IACnB,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,IAAI,EAAE,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,mBAAmB,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC;IAE7D,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;QAC3C,MAAM,CAAC,CAAA,uBAAuB,CAAC;IACjC,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,CAAA,6BAA6B,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,iBAAiB,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* Test runner wrapper that handles Bun's post-test crash gracefully.
|
|
4
|
+
*
|
|
5
|
+
* Bun crashes during native module cleanup after tests complete successfully.
|
|
6
|
+
* This wrapper captures the output, verifies tests passed, and exits cleanly.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=test-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-runner.d.ts","sourceRoot":"","sources":["../../scripts/test-runner.ts"],"names":[],"mappings":";AACA;;;;;GAKG"}
|