memvid-mcp-server 1.0.4 → 1.0.6
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 +9 -1
- package/dist/index.js +16 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ Add the following to your `claude_desktop_config.json`:
|
|
|
53
53
|
|
|
54
54
|
1. **`create_or_open_memory`**: Initialize a new project memory or open an existing one.
|
|
55
55
|
2. **`add_content`**: Add text and metadata to the memory.
|
|
56
|
-
3. **`search_memory`**: Search your memory.
|
|
56
|
+
3. **`search_memory`**: Search your memory. Use `query="*"` to list all recent items.
|
|
57
57
|
4. **`ask_memory`**: (Optional) Ask questions about your memory using an LLM.
|
|
58
58
|
|
|
59
59
|
## Development
|
|
@@ -68,3 +68,11 @@ bun run src/index.ts
|
|
|
68
68
|
# Build
|
|
69
69
|
bun build ./src/index.ts --compile --outfile server
|
|
70
70
|
```
|
|
71
|
+
|
|
72
|
+
## Credits
|
|
73
|
+
|
|
74
|
+
This MCP Server is a wrapper around the powerful **Memvid SDK**.
|
|
75
|
+
Full credit goes to the Memvid team for their excellent technology.
|
|
76
|
+
|
|
77
|
+
- **NPM Package**: [@memvid/sdk](https://www.npmjs.com/package/@memvid/sdk)
|
|
78
|
+
- **Documentation**: [docs.memvid.com](https://docs.memvid.com)
|
package/dist/index.js
CHANGED
|
@@ -149,15 +149,24 @@ function registerSearchMemory(server) {
|
|
|
149
149
|
server.tool("search_memory", "Search for content in the project's memory using semantic search.", SearchMemorySchema.shape, async (args) => {
|
|
150
150
|
const manager = MemoryManager.getInstance();
|
|
151
151
|
const mem = await manager.getMemory(args.project_name);
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
let results;
|
|
153
|
+
if (args.query === "*") {
|
|
154
|
+
if (typeof mem.timeline === "function") {
|
|
155
|
+
results = await mem.timeline({ k: args.limit });
|
|
156
|
+
} else {
|
|
157
|
+
results = await mem.find(undefined, { k: args.limit });
|
|
158
|
+
}
|
|
159
|
+
} else {
|
|
160
|
+
results = await mem.find(args.query, {
|
|
161
|
+
k: args.limit,
|
|
162
|
+
mode: args.mode
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
const hits = Array.isArray(results) ? results : results.hits || [];
|
|
157
166
|
const formatted = hits.map((hit) => {
|
|
158
167
|
return `[Title: ${hit.title || "Untitled"}]
|
|
159
|
-
${hit.snippet || hit.text}
|
|
160
|
-
(Score: ${hit.score})`;
|
|
168
|
+
${hit.snippet || hit.text || hit.preview}
|
|
169
|
+
(Score: ${hit.score || "N/A"})`;
|
|
161
170
|
}).join(`
|
|
162
171
|
|
|
163
172
|
---
|