@danielsimonjr/memory-mcp 12.7.0 → 12.7.2
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 +6 -4
- package/dist/index.js +8 -2
- package/dist/server/toolHandlers.d.ts.map +1 -1
- package/dist/server/toolHandlers.js +19 -4
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Memory MCP Server
|
|
2
2
|
|
|
3
|
-
[](https://github.com/danielsimonjr/memory-mcp)
|
|
4
4
|
[](https://www.npmjs.com/package/@danielsimonjr/memory-mcp)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
[](https://modelcontextprotocol.io)
|
|
@@ -707,9 +707,10 @@ Discrete facts about entities. Each observation should be atomic and independent
|
|
|
707
707
|
|----------|-------------|---------|
|
|
708
708
|
| `MEMORY_FILE_PATH` | Path to storage file | `memory.jsonl` (current directory) |
|
|
709
709
|
| `MEMORY_STORAGE_TYPE` | Storage backend: `jsonl` or `sqlite` | `jsonl` |
|
|
710
|
-
| `MEMORY_EMBEDDING_PROVIDER` | Embedding provider: `openai`, `local`, or `none` | `none` |
|
|
710
|
+
| `MEMORY_EMBEDDING_PROVIDER` | Embedding provider: `openai`, `local`, `llamacpp`, or `none` | `none` |
|
|
711
711
|
| `MEMORY_OPENAI_API_KEY` | OpenAI API key (required if provider is `openai`) | - |
|
|
712
|
-
| `MEMORY_EMBEDDING_MODEL` | Embedding model to use | `text-embedding-3-small` (OpenAI) / `Xenova/all-MiniLM-L6-v2` (local) |
|
|
712
|
+
| `MEMORY_EMBEDDING_MODEL` | Embedding model to use | `text-embedding-3-small` (OpenAI) / `Xenova/all-MiniLM-L6-v2` (local) / `llamacpp-local` (llamacpp) |
|
|
713
|
+
| `MEMORY_EMBEDDING_BASE_URL` | Base URL of a local `llama-server` (used when provider is `llamacpp`) | `http://127.0.0.1:8080` |
|
|
713
714
|
| `MEMORY_AUTO_INDEX_EMBEDDINGS` | Auto-index entities on creation | `false` |
|
|
714
715
|
|
|
715
716
|
### Storage Backends
|
|
@@ -908,9 +909,10 @@ We welcome contributions!
|
|
|
908
909
|
|
|
909
910
|
All notable changes are documented in **[CHANGELOG.md](CHANGELOG.md)**.
|
|
910
911
|
|
|
911
|
-
**Current version**: v12.7.
|
|
912
|
+
**Current version**: v12.7.2 - [View full changelog](CHANGELOG.md)
|
|
912
913
|
|
|
913
914
|
Recent highlights:
|
|
915
|
+
- **v12.7.2**: Bumped `@danielsimonjr/memoryjs` `^3.0.0` → `^3.1.0` — Node 24 `better-sqlite3` prebuilds (`^12.11.1`) and the `llamacpp` embedding provider (`MEMORY_EMBEDDING_PROVIDER=llamacpp` + `MEMORY_EMBEDDING_BASE_URL`). No new tools.
|
|
914
916
|
- **v12.7.0** (241 tools): Upgraded `@danielsimonjr/memoryjs` `^2.8.1` → `^3.0.0` and surfaced its new features as 16 tools — event memory (5), reconstructive Cue–Tag–Content memory + snapshot persistence (5), relation consolidation (2), agent reflection (4) — plus v3 graph-channel / evidence-path options on `hybrid_search`. Refactored handlers onto the new `ManagerContext` accessors (`hybridSearchManager`, `governanceManager`, `eventManager`, `reflectionManager`, `reconstructiveMemory()`, `close()`).
|
|
915
917
|
- **v12.5.0** (225 tools): 10 engineering / diagnostic tools mirroring the memoryjs CLI surface (`diag`, `health`, `check_graph`, `reindex`, cache stats/clear, `graph_size`, `inspect_entity`, `hierarchy_tree`, `entity_neighbors`).
|
|
916
918
|
- **v12.3.2** (215 tools): Backport of the deferred `set_project_scope` / `get_project_scope` pair.
|
package/dist/index.js
CHANGED
|
@@ -31,8 +31,14 @@ process.stdin.on("close", shutdown);
|
|
|
31
31
|
async function main() {
|
|
32
32
|
// Initialize memory file path with backward compatibility
|
|
33
33
|
const memoryFilePath = await ensureMemoryFilePath();
|
|
34
|
-
//
|
|
35
|
-
|
|
34
|
+
// Honour MEMORY_STORAGE_TYPE. Passing a bare string here selects memoryjs's default
|
|
35
|
+
// (jsonl) backend unconditionally, so `MEMORY_STORAGE_TYPE=sqlite` was documented but
|
|
36
|
+
// silently ignored — and `diag` reported it as sqlite while writes went to memory.jsonl.
|
|
37
|
+
const storageType = process.env.MEMORY_STORAGE_TYPE === "sqlite" ? "sqlite" : "jsonl";
|
|
38
|
+
managerContext = new ManagerContext({
|
|
39
|
+
storagePath: memoryFilePath,
|
|
40
|
+
storageType,
|
|
41
|
+
});
|
|
36
42
|
// Initialize and start MCP server
|
|
37
43
|
const server = new MCPServer(managerContext);
|
|
38
44
|
await server.start();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolHandlers.d.ts","sourceRoot":"","sources":["../../src/server/toolHandlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,kBAAkB,EA2ClB,KAAK,cAAc,EAyBpB,MAAM,yBAAyB,CAAC;AAyBjC,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAE7E;
|
|
1
|
+
{"version":3,"file":"toolHandlers.d.ts","sourceRoot":"","sources":["../../src/server/toolHandlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,kBAAkB,EA2ClB,KAAK,cAAc,EAyBpB,MAAM,yBAAyB,CAAC;AAyBjC,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAE7E;AAgFD;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEzF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CACxB,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC1B,OAAO,CAAC,YAAY,CAAC,CAAC;AAiF3B,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAuuGpD,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,YAAY,CAAC,CAiBvB"}
|
|
@@ -37,7 +37,19 @@ function getStorageFilePath(ctx) {
|
|
|
37
37
|
// type-cast). Older versions of this helper looked for `filePath` and
|
|
38
38
|
// silently fell back to 'memory.jsonl' — which made diag / size / reindex
|
|
39
39
|
// reports point at the wrong file. Try both field names defensively.
|
|
40
|
+
// SQLiteStorage exposes NEITHER field — it has a public `getFilePath()` accessor backed by
|
|
41
|
+
// `validatedDbFilePath`. Without this branch the helper fell through to the literal
|
|
42
|
+
// 'memory.jsonl', which resolves against cwd: diag then stat'd an unrelated file and reported
|
|
43
|
+
// it as your store (`exists: true` with that file's size) while writes went to memory.db.
|
|
40
44
|
const storage = ctx.storage;
|
|
45
|
+
if (typeof storage.getFilePath === 'function') {
|
|
46
|
+
try {
|
|
47
|
+
const resolved = storage.getFilePath();
|
|
48
|
+
if (resolved)
|
|
49
|
+
return resolved;
|
|
50
|
+
}
|
|
51
|
+
catch { /* fall through to the field lookups below */ }
|
|
52
|
+
}
|
|
41
53
|
return storage.memoryFilePath ?? storage.filePath ?? 'memory.jsonl';
|
|
42
54
|
}
|
|
43
55
|
// Sidecar path for the serialized Cue–Tag–Content graph, following the
|
|
@@ -884,7 +896,7 @@ export const toolHandlers = {
|
|
|
884
896
|
semantic_search: async (ctx, args) => {
|
|
885
897
|
const semanticSearch = ctx.semanticSearch;
|
|
886
898
|
if (!semanticSearch) {
|
|
887
|
-
return formatTextResponse('Semantic search is not available. Set MEMORY_EMBEDDING_PROVIDER environment variable to "openai" or "
|
|
899
|
+
return formatTextResponse('Semantic search is not available. Set MEMORY_EMBEDDING_PROVIDER environment variable to "openai", "local", or "llamacpp".');
|
|
888
900
|
}
|
|
889
901
|
const query = validateWithSchema(args.query, SearchQuerySchema, 'Invalid search query');
|
|
890
902
|
const limit = args.limit !== undefined
|
|
@@ -907,7 +919,7 @@ export const toolHandlers = {
|
|
|
907
919
|
find_similar_entities: async (ctx, args) => {
|
|
908
920
|
const semanticSearch = ctx.semanticSearch;
|
|
909
921
|
if (!semanticSearch) {
|
|
910
|
-
return formatTextResponse('Semantic search is not available. Set MEMORY_EMBEDDING_PROVIDER environment variable to "openai" or "
|
|
922
|
+
return formatTextResponse('Semantic search is not available. Set MEMORY_EMBEDDING_PROVIDER environment variable to "openai", "local", or "llamacpp".');
|
|
911
923
|
}
|
|
912
924
|
const entityName = validateWithSchema(args.entityName, z.string().min(1), 'Invalid entity name');
|
|
913
925
|
const limit = args.limit !== undefined
|
|
@@ -930,7 +942,7 @@ export const toolHandlers = {
|
|
|
930
942
|
index_embeddings: async (ctx, args) => {
|
|
931
943
|
const semanticSearch = ctx.semanticSearch;
|
|
932
944
|
if (!semanticSearch) {
|
|
933
|
-
return formatTextResponse('Semantic search is not available. Set MEMORY_EMBEDDING_PROVIDER environment variable to "openai" or "
|
|
945
|
+
return formatTextResponse('Semantic search is not available. Set MEMORY_EMBEDDING_PROVIDER environment variable to "openai", "local", or "llamacpp".');
|
|
934
946
|
}
|
|
935
947
|
const forceReindex = args.forceReindex !== undefined
|
|
936
948
|
? validateWithSchema(args.forceReindex, z.boolean(), 'Invalid forceReindex value')
|
|
@@ -2455,7 +2467,10 @@ export const toolHandlers = {
|
|
|
2455
2467
|
runtime: { node: process.version, platform: process.platform, arch: process.arch, pid: process.pid },
|
|
2456
2468
|
storage: {
|
|
2457
2469
|
path: storagePath,
|
|
2458
|
-
|
|
2470
|
+
// Mirror index.ts's normalization exactly. Echoing the raw env var made diag report
|
|
2471
|
+
// whatever was set (e.g. a typo, or 'sqlite' back when it was ignored) rather than the
|
|
2472
|
+
// backend actually in use — a diagnostic that confirmed the bug instead of exposing it.
|
|
2473
|
+
type: process.env.MEMORY_STORAGE_TYPE === 'sqlite' ? 'sqlite' : 'jsonl',
|
|
2459
2474
|
exists,
|
|
2460
2475
|
sizeBytes,
|
|
2461
2476
|
entities: stats.totalEntities,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielsimonjr/memory-mcp",
|
|
3
|
-
"version": "12.7.
|
|
3
|
+
"version": "12.7.2",
|
|
4
4
|
"description": "Enhanced MCP memory server with hierarchies, compression, archiving, graph algorithms, semantic search, temporal KG, RBAC, bitemporal validity, OCC, procedural memory, causal reasoning, world model, do_not_remember exclusions, decision rationale, project context, heuristic guidelines, tool affordance + observer, observation dedup, spell correction, event memory, reconstructive memory, relation consolidation, agent reflection, and 241 advanced tools",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -58,16 +58,17 @@
|
|
|
58
58
|
"tools:build": "cd tools/chunking-for-files && npm run build && cd ../compress-for-context && npm run build && cd ../create-dependency-graph && npm run build && cd ../migrate-from-jsonl-to-sqlite && npm run build"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@danielsimonjr/memoryjs": "^3.
|
|
62
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
61
|
+
"@danielsimonjr/memoryjs": "^3.1.0",
|
|
62
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
63
63
|
"zod": "^4.4.3"
|
|
64
64
|
},
|
|
65
65
|
"overrides": {
|
|
66
|
-
"better-sqlite3": "^12.
|
|
66
|
+
"better-sqlite3": "^12.11.1"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/node": "^26",
|
|
70
70
|
"@vitest/coverage-v8": "^4.1.10",
|
|
71
|
+
"esbuild": "^0.28.1",
|
|
71
72
|
"shx": "^0.4.0",
|
|
72
73
|
"typescript": "^7.0.2",
|
|
73
74
|
"vitest": "^4.1.5"
|