@danielsimonjr/memory-mcp 10.1.0 → 11.0.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/dist/index.d.ts +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/server/MCPServer.d.ts +1 -1
- package/dist/server/MCPServer.d.ts.map +1 -1
- package/dist/server/MCPServer.js +2 -2
- package/dist/server/responseCompressor.d.ts.map +1 -1
- package/dist/server/responseCompressor.js +1 -2
- package/dist/server/toolHandlers.d.ts +3 -7
- package/dist/server/toolHandlers.d.ts.map +1 -1
- package/dist/server/toolHandlers.js +3 -11
- package/package.json +6 -26
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* MCP Memory Server Entry Point
|
|
4
|
+
*
|
|
5
|
+
* This is the main entry point for the MCP memory server.
|
|
6
|
+
* All core functionality is imported from @danielsimonjr/memoryjs.
|
|
7
|
+
*
|
|
8
|
+
* @module index
|
|
9
|
+
*/
|
|
10
|
+
import { defaultMemoryPath, ensureMemoryFilePath, ManagerContext, type Entity, type Relation, type KnowledgeGraph, type GraphStats, type ValidationReport, type ValidationIssue, type ValidationWarning, type SavedSearch, type TagAlias, type SearchResult, type BooleanQueryNode, type ImportResult, type CompressionResult } from '@danielsimonjr/memoryjs';
|
|
5
11
|
export { defaultMemoryPath, ensureMemoryFilePath };
|
|
6
12
|
export type { Entity, Relation, KnowledgeGraph, GraphStats, ValidationReport, ValidationIssue, ValidationWarning, SavedSearch, TagAlias, SearchResult, BooleanQueryNode, ImportResult, CompressionResult, };
|
|
7
13
|
export { ManagerContext };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;GAOG;AAEH,OAAO,EAEL,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EAEd,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,CAAC;AAGnD,YAAY,EACV,MAAM,EACN,QAAQ,EACR,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,GAClB,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,CAAC;AAG1B,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* MCP Memory Server Entry Point
|
|
4
|
+
*
|
|
5
|
+
* This is the main entry point for the MCP memory server.
|
|
6
|
+
* All core functionality is imported from @danielsimonjr/memoryjs.
|
|
7
|
+
*
|
|
8
|
+
* @module index
|
|
9
|
+
*/
|
|
10
|
+
import { logger, defaultMemoryPath, ensureMemoryFilePath, ManagerContext, } from '@danielsimonjr/memoryjs';
|
|
4
11
|
import { MCPServer } from './server/MCPServer.js';
|
|
5
12
|
// Re-export path utilities for backward compatibility
|
|
6
13
|
export { defaultMemoryPath, ensureMemoryFilePath };
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module server/MCPServer
|
|
8
8
|
*/
|
|
9
|
-
import type
|
|
9
|
+
import { type ManagerContext } from '@danielsimonjr/memoryjs';
|
|
10
10
|
/**
|
|
11
11
|
* MCP Server for Knowledge Graph operations.
|
|
12
12
|
* Exposes tools for entity/relation management, search, and analysis.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MCPServer.d.ts","sourceRoot":"","sources":["../../src/server/MCPServer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"MCPServer.d.ts","sourceRoot":"","sources":["../../src/server/MCPServer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAItE;;;GAGG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,GAAG,CAAiB;gBAEhB,GAAG,EAAE,cAAc;IAiB/B,OAAO,CAAC,oBAAoB;IAetB,KAAK;CAKZ"}
|
package/dist/server/MCPServer.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
10
10
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
11
11
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
12
|
-
import { logger } from '
|
|
12
|
+
import { logger } from '@danielsimonjr/memoryjs';
|
|
13
13
|
import { toolDefinitions } from './toolDefinitions.js';
|
|
14
14
|
import { handleToolCall } from './toolHandlers.js';
|
|
15
15
|
/**
|
|
@@ -23,7 +23,7 @@ export class MCPServer {
|
|
|
23
23
|
this.ctx = ctx;
|
|
24
24
|
this.server = new Server({
|
|
25
25
|
name: "memory-server",
|
|
26
|
-
version: "0.
|
|
26
|
+
version: "11.0.0",
|
|
27
27
|
}, {
|
|
28
28
|
capabilities: {
|
|
29
29
|
tools: {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responseCompressor.d.ts","sourceRoot":"","sources":["../../src/server/responseCompressor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"responseCompressor.d.ts","sourceRoot":"","sources":["../../src/server/responseCompressor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,8CAA8C;IAC9C,UAAU,EAAE,OAAO,CAAC;IACpB,8BAA8B;IAC9B,iBAAiB,EAAE,QAAQ,GAAG,MAAM,CAAC;IACrC,iCAAiC;IACjC,QAAQ,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC7B,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,qDAAqD;IACrD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,kBAAkB,CAAC,CA2B7B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,kBAAkB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAQjB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,kBAAkB,CAY5E;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA8BhE"}
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module server/responseCompressor
|
|
9
9
|
*/
|
|
10
|
-
import { compress, decompress } from '
|
|
11
|
-
import { COMPRESSION_CONFIG } from '../utils/constants.js';
|
|
10
|
+
import { compress, decompress, COMPRESSION_CONFIG } from '@danielsimonjr/memoryjs';
|
|
12
11
|
/**
|
|
13
12
|
* Conditionally compress a response based on size threshold.
|
|
14
13
|
*
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MCP Tool Handlers
|
|
3
3
|
*
|
|
4
|
-
* Contains handler functions for all
|
|
4
|
+
* Contains handler functions for all 59 Knowledge Graph tools.
|
|
5
5
|
* Handlers call managers directly via ManagerContext.
|
|
6
|
-
*
|
|
7
|
-
* Phase 4 Sprint 9: Added 4 graph algorithm tools (find_shortest_path, find_all_paths, get_connected_components, get_centrality).
|
|
8
|
-
* Phase 6: Updated to use Zod validation instead of type assertions.
|
|
9
|
-
* Phase 3 Sprint 4: Added response compression for large payloads.
|
|
6
|
+
* All core functionality is imported from @danielsimonjr/memoryjs.
|
|
10
7
|
*
|
|
11
8
|
* @module server/toolHandlers
|
|
12
9
|
*/
|
|
13
|
-
import { formatToolResponse } from '
|
|
14
|
-
import type { ManagerContext } from '../core/ManagerContext.js';
|
|
10
|
+
import { formatToolResponse, type ManagerContext } from '@danielsimonjr/memoryjs';
|
|
15
11
|
/**
|
|
16
12
|
* Tool response type for MCP SDK compatibility.
|
|
17
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolHandlers.d.ts","sourceRoot":"","sources":["../../src/server/toolHandlers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"toolHandlers.d.ts","sourceRoot":"","sources":["../../src/server/toolHandlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,kBAAkB,EAwBlB,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAC;AAIjC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEjE;;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;AAyC3B;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CA0tBpD,CAAC;AAEF;;;;;;;;GAQG;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,CAMvB"}
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MCP Tool Handlers
|
|
3
3
|
*
|
|
4
|
-
* Contains handler functions for all
|
|
4
|
+
* Contains handler functions for all 59 Knowledge Graph tools.
|
|
5
5
|
* Handlers call managers directly via ManagerContext.
|
|
6
|
-
*
|
|
7
|
-
* Phase 4 Sprint 9: Added 4 graph algorithm tools (find_shortest_path, find_all_paths, get_connected_components, get_centrality).
|
|
8
|
-
* Phase 6: Updated to use Zod validation instead of type assertions.
|
|
9
|
-
* Phase 3 Sprint 4: Added response compression for large payloads.
|
|
6
|
+
* All core functionality is imported from @danielsimonjr/memoryjs.
|
|
10
7
|
*
|
|
11
8
|
* @module server/toolHandlers
|
|
12
9
|
*/
|
|
13
|
-
import { formatToolResponse, formatTextResponse, formatRawResponse, validateWithSchema, validateFilePath, BatchCreateEntitiesSchema, BatchCreateRelationsSchema, EntityNamesSchema, DeleteRelationsSchema, AddObservationsInputSchema, DeleteObservationsInputSchema, ArchiveCriteriaSchema, SavedSearchInputSchema, SavedSearchUpdateSchema, ImportFormatSchema, ExtendedExportFormatSchema, MergeStrategySchema, ExportFilterSchema, SearchQuerySchema, } from '
|
|
10
|
+
import { formatToolResponse, formatTextResponse, formatRawResponse, validateWithSchema, validateFilePath, BatchCreateEntitiesSchema, BatchCreateRelationsSchema, EntityNamesSchema, DeleteRelationsSchema, AddObservationsInputSchema, DeleteObservationsInputSchema, ArchiveCriteriaSchema, SavedSearchInputSchema, SavedSearchUpdateSchema, ImportFormatSchema, ExtendedExportFormatSchema, MergeStrategySchema, ExportFilterSchema, SearchQuerySchema, HybridSearchManager, QueryAnalyzer, QueryPlanner, ReflectionManager, ObservationNormalizer, } from '@danielsimonjr/memoryjs';
|
|
14
11
|
import { z } from 'zod';
|
|
15
|
-
import { HybridSearchManager } from '../search/HybridSearchManager.js';
|
|
16
|
-
import { QueryAnalyzer } from '../search/QueryAnalyzer.js';
|
|
17
|
-
import { QueryPlanner } from '../search/QueryPlanner.js';
|
|
18
|
-
import { ReflectionManager } from '../search/ReflectionManager.js';
|
|
19
|
-
import { ObservationNormalizer } from '../features/ObservationNormalizer.js';
|
|
20
12
|
import { maybeCompressResponse } from './responseCompressor.js';
|
|
21
13
|
/**
|
|
22
14
|
* Wrapper to apply automatic response compression for large tool responses.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielsimonjr/memory-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"description": "Enhanced MCP memory server with hierarchies, compression, archiving, graph algorithms, semantic search, and 59 advanced tools",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -35,26 +35,6 @@
|
|
|
35
35
|
"types": "./dist/index.d.ts",
|
|
36
36
|
"import": "./dist/index.js"
|
|
37
37
|
},
|
|
38
|
-
"./types": {
|
|
39
|
-
"types": "./dist/types/index.d.ts",
|
|
40
|
-
"import": "./dist/types/index.js"
|
|
41
|
-
},
|
|
42
|
-
"./utils": {
|
|
43
|
-
"types": "./dist/utils/index.d.ts",
|
|
44
|
-
"import": "./dist/utils/index.js"
|
|
45
|
-
},
|
|
46
|
-
"./core": {
|
|
47
|
-
"types": "./dist/core/index.d.ts",
|
|
48
|
-
"import": "./dist/core/index.js"
|
|
49
|
-
},
|
|
50
|
-
"./search": {
|
|
51
|
-
"types": "./dist/search/index.d.ts",
|
|
52
|
-
"import": "./dist/search/index.js"
|
|
53
|
-
},
|
|
54
|
-
"./features": {
|
|
55
|
-
"types": "./dist/features/index.d.ts",
|
|
56
|
-
"import": "./dist/features/index.js"
|
|
57
|
-
},
|
|
58
38
|
"./server": {
|
|
59
39
|
"types": "./dist/server/MCPServer.d.ts",
|
|
60
40
|
"import": "./dist/server/MCPServer.js"
|
|
@@ -73,14 +53,14 @@
|
|
|
73
53
|
"test": "vitest run --coverage",
|
|
74
54
|
"typecheck": "tsc --noEmit --noUnusedLocals --noUnusedParameters --strict",
|
|
75
55
|
"clean": "shx rm -rf dist",
|
|
76
|
-
"docs:deps": "npx tsx tools/create-dependency-graph/create-dependency-graph.ts"
|
|
56
|
+
"docs:deps": "npx tsx tools/create-dependency-graph/create-dependency-graph.ts",
|
|
57
|
+
"tools:install": "cd tools/chunking-for-files && npm install && cd ../compress-for-context && npm install && cd ../create-dependency-graph && npm install && cd ../migrate-from-jsonl-to-sqlite && npm install",
|
|
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"
|
|
77
59
|
},
|
|
78
60
|
"dependencies": {
|
|
79
|
-
"@danielsimonjr/
|
|
61
|
+
"@danielsimonjr/memoryjs": "^1.2.2",
|
|
80
62
|
"@modelcontextprotocol/sdk": "^1.21.1",
|
|
81
|
-
"
|
|
82
|
-
"better-sqlite3": "^11.7.0",
|
|
83
|
-
"zod": "^4.1.13"
|
|
63
|
+
"zod": "^3.24.1"
|
|
84
64
|
},
|
|
85
65
|
"devDependencies": {
|
|
86
66
|
"@types/better-sqlite3": "^7.6.12",
|