mcp-knowledge-graph 1.0.2 → 1.2.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
@@ -1,163 +1,207 @@
1
- # `mcp-knowledge-graph`
1
+ # MCP Knowledge Graph
2
2
 
3
- > Knowledge Graph Memory Server
3
+ **Persistent memory for AI models through a local knowledge graph.**
4
4
 
5
- An improved implementation of persistent memory using a local knowledge graph with a customizable `--memory-path`.
5
+ Store and retrieve information across conversations using entities, relations, and observations. Works with Claude Code/Desktop and any MCP-compatible AI platform.
6
6
 
7
- This lets AI models remember information about the user across chats. It works with any AI model that supports the Model Context Protocol (MCP) or function calling capabilities.
7
+ ## Why ".aim" and "aim_" prefixes?
8
8
 
9
- > [!NOTE]
10
- > This is a fork of the original [Memory Server](https://github.com/modelcontextprotocol/servers/tree/main/src/memory) and is intended to not use the ephemeral memory npx installation method.
9
+ AIM stands for **AI Memory** - the core concept of this knowledge graph system. The three AIM elements provide clear organization and safety:
11
10
 
12
- ## Server Name
11
+ - **`.aim` directories**: Keep AI memory files organized and easily identifiable
12
+ - **`aim_` tool prefixes**: Group related memory functions together in multi-tool setups
13
+ - **`_aim` safety markers**: Each memory file starts with `{"type":"_aim","source":"mcp-knowledge-graph"}` to prevent accidental overwrites of unrelated JSONL files
13
14
 
14
- ```txt
15
- mcp-knowledge-graph
16
- ```
15
+ This consistent AIM naming makes it obvious which directories, tools, and files belong to our AI memory system.
16
+
17
+ ## Storage Logic
18
+
19
+ **File Location Priority:**
20
+
21
+ 1. **Project with `.aim`** - Uses `.aim/memory.jsonl` (project-local)
22
+ 2. **No project/no .aim** - Uses configured global directory
23
+ 3. **Contexts** - Adds suffix: `memory-work.jsonl`, `memory-personal.jsonl`
17
24
 
18
- ![screen-of-server-name](img/server-name.png)
25
+ **Safety System:**
19
26
 
20
- ![read-function](/img/read-function.png)
27
+ - Every memory file starts with `{"type":"_aim","source":"mcp-knowledge-graph"}`
28
+ - System refuses to write to files without this marker
29
+ - Prevents accidental overwrite of unrelated JSONL files
21
30
 
22
- ## Core Concepts
31
+ ## Master Database Concept
23
32
 
24
- ### Entities
33
+ **The master database is your primary memory store** - used by default when no specific database is requested. It's always named `default` in listings and stored as `memory.jsonl`.
25
34
 
26
- Entities are the primary nodes in the knowledge graph. Each entity has:
35
+ - **Default Behavior**: All memory operations use the master database unless you specify a different one
36
+ - **Always Available**: Exists in both project-local and global locations
37
+ - **Primary Storage**: Your main knowledge graph that persists across all conversations
38
+ - **Named Databases**: Optional additional databases (`work`, `personal`, `health`) for organizing specific topics
27
39
 
28
- - A unique name (identifier)
29
- - An entity type (e.g., "person", "organization", "event")
30
- - A list of observations
40
+ ## Key Features
31
41
 
32
- Example:
42
+ - **Master Database**: Primary memory store used by default for all operations
43
+ - **Multiple Databases**: Optional named databases for organizing memories by topic
44
+ - **Project Detection**: Automatic project-local memory using `.aim` directories
45
+ - **Location Override**: Force operations to use project or global storage
46
+ - **Safe Operations**: Built-in protection against overwriting unrelated files
47
+ - **Database Discovery**: List all available databases in both locations
48
+
49
+ ## Quick Start
50
+
51
+ ### Global Memory (Recommended)
52
+
53
+ Add to your `claude_desktop_config.json` or `.claude.json`:
33
54
 
34
55
  ```json
35
56
  {
36
- "name": "John_Smith",
37
- "entityType": "person",
38
- "observations": ["Speaks fluent Spanish"]
57
+ "mcpServers": {
58
+ "memory": {
59
+ "command": "npx",
60
+ "args": [
61
+ "-y",
62
+ "mcp-knowledge-graph",
63
+ "--memory-path",
64
+ "/Users/yourusername/.aim/"
65
+ ]
66
+ }
67
+ }
39
68
  }
40
69
  ```
41
70
 
42
- ### Relations
71
+ This creates memory files in your specified directory:
72
+
73
+ - `memory.jsonl` - **Master Database** (default for all operations)
74
+ - `memory-work.jsonl` - Work database
75
+ - `memory-personal.jsonl` - Personal database
76
+ - etc.
77
+
78
+ ### Project-Local Memory
79
+
80
+ In any project, create a `.aim` directory:
81
+
82
+ ```bash
83
+ mkdir .aim
84
+ ```
85
+
86
+ Now memory tools automatically use `.aim/memory.jsonl` (project-local **master database**) instead of global storage when run from this project.
43
87
 
44
- Relations define directed connections between entities. They are always stored in active voice and describe how entities interact or relate to each other.
88
+ ## How AI Uses Databases
45
89
 
46
- Example:
90
+ Once configured, AI models use the **master database by default** or can specify named databases with a `context` parameter. New databases are created automatically - no setup required:
47
91
 
48
92
  ```json
49
- {
50
- "from": "John_Smith",
51
- "to": "ExampleCorp",
52
- "relationType": "works_at"
53
- }
93
+ // Master Database (default - no context needed)
94
+ aim_create_entities({
95
+ entities: [{
96
+ name: "John_Doe",
97
+ entityType: "person",
98
+ observations: ["Met at conference"]
99
+ }]
100
+ })
101
+
102
+ // Work database
103
+ aim_create_entities({
104
+ context: "work",
105
+ entities: [{
106
+ name: "Q4_Project",
107
+ entityType: "project",
108
+ observations: ["Due December 2024"]
109
+ }]
110
+ })
111
+
112
+ // Personal database
113
+ aim_create_entities({
114
+ context: "personal",
115
+ entities: [{
116
+ name: "Mom",
117
+ entityType: "person",
118
+ observations: ["Birthday March 15th"]
119
+ }]
120
+ })
121
+
122
+ // Master database in specific location
123
+ aim_create_entities({
124
+ location: "global",
125
+ entities: [{
126
+ name: "Important_Info",
127
+ entityType: "reference",
128
+ observations: ["Stored in global master database"]
129
+ }]
130
+ })
131
+ ```
132
+
133
+ ## File Organization
134
+
135
+ **Global Setup:**
136
+
137
+ ```tree
138
+ /Users/yourusername/.aim/
139
+ ├── memory.jsonl # Master Database (default)
140
+ ├── memory-work.jsonl # Work database
141
+ ├── memory-personal.jsonl # Personal database
142
+ └── memory-health.jsonl # Health database
143
+ ```
144
+
145
+ **Project Setup:**
146
+
147
+ ```tree
148
+ my-project/
149
+ ├── .aim/
150
+ │ ├── memory.jsonl # Project Master Database (default)
151
+ │ └── memory-work.jsonl # Project Work database
152
+ └── src/
54
153
  ```
55
154
 
56
- ### Observations
155
+ ## Available Tools
156
+
157
+ - `aim_create_entities` - Add new people, projects, events
158
+ - `aim_create_relations` - Link entities together
159
+ - `aim_add_observations` - Add facts to existing entities
160
+ - `aim_search_nodes` - Find information by keyword
161
+ - `aim_read_graph` - View entire memory
162
+ - `aim_open_nodes` - Retrieve specific entities by name
163
+ - `aim_list_databases` - Show all available databases and current location
164
+ - `aim_delete_entities` - Remove entities
165
+ - `aim_delete_observations` - Remove specific facts
166
+ - `aim_delete_relations` - Remove connections
167
+
168
+ ### Parameters
57
169
 
58
- Observations are discrete pieces of information about an entity. They are:
170
+ - `context` (optional) - Specify named database (`work`, `personal`, etc.). Defaults to **master database**
171
+ - `location` (optional) - Force `project` or `global` storage location. Defaults to auto-detection
59
172
 
60
- - Stored as strings
61
- - Attached to specific entities
62
- - Can be added or removed independently
63
- - Should be atomic (one fact per observation)
173
+ ## Database Discovery
64
174
 
65
- Example:
175
+ Use `aim_list_databases` to see all available databases:
66
176
 
67
177
  ```json
68
178
  {
69
- "entityName": "John_Smith",
70
- "observations": [
71
- "Speaks fluent Spanish",
72
- "Graduated in 2019",
73
- "Prefers morning meetings"
74
- ]
179
+ "project_databases": [
180
+ "default", // Master Database (project-local)
181
+ "project-work" // Named database
182
+ ],
183
+ "global_databases": [
184
+ "default", // Master Database (global)
185
+ "work",
186
+ "personal",
187
+ "health"
188
+ ],
189
+ "current_location": "project (.aim directory detected)"
75
190
  }
76
191
  ```
77
192
 
78
- ## API
79
-
80
- ### Tools
81
-
82
- - **create_entities**
83
- - Create multiple new entities in the knowledge graph
84
- - Input: `entities` (array of objects)
85
- - Each object contains:
86
- - `name` (string): Entity identifier
87
- - `entityType` (string): Type classification
88
- - `observations` (string[]): Associated observations
89
- - Ignores entities with existing names
90
-
91
- - **create_relations**
92
- - Create multiple new relations between entities
93
- - Input: `relations` (array of objects)
94
- - Each object contains:
95
- - `from` (string): Source entity name
96
- - `to` (string): Target entity name
97
- - `relationType` (string): Relationship type in active voice
98
- - Skips duplicate relations
99
-
100
- - **add_observations**
101
- - Add new observations to existing entities
102
- - Input: `observations` (array of objects)
103
- - Each object contains:
104
- - `entityName` (string): Target entity
105
- - `contents` (string[]): New observations to add
106
- - Returns added observations per entity
107
- - Fails if entity doesn't exist
108
-
109
- - **delete_entities**
110
- - Remove entities and their relations
111
- - Input: `entityNames` (string[])
112
- - Cascading deletion of associated relations
113
- - Silent operation if entity doesn't exist
114
-
115
- - **delete_observations**
116
- - Remove specific observations from entities
117
- - Input: `deletions` (array of objects)
118
- - Each object contains:
119
- - `entityName` (string): Target entity
120
- - `observations` (string[]): Observations to remove
121
- - Silent operation if observation doesn't exist
122
-
123
- - **delete_relations**
124
- - Remove specific relations from the graph
125
- - Input: `relations` (array of objects)
126
- - Each object contains:
127
- - `from` (string): Source entity name
128
- - `to` (string): Target entity name
129
- - `relationType` (string): Relationship type
130
- - Silent operation if relation doesn't exist
131
-
132
- - **read_graph**
133
- - Read the entire knowledge graph
134
- - No input required
135
- - Returns complete graph structure with all entities and relations
136
-
137
- - **search_nodes**
138
- - Search for nodes based on query
139
- - Input: `query` (string)
140
- - Searches across:
141
- - Entity names
142
- - Entity types
143
- - Observation content
144
- - Returns matching entities and their relations
145
-
146
- - **open_nodes**
147
- - Retrieve specific nodes by name
148
- - Input: `names` (string[])
149
- - Returns:
150
- - Requested entities
151
- - Relations between requested entities
152
- - Silently skips non-existent nodes
153
-
154
- ## Usage with MCP-Compatible Platforms
155
-
156
- This server can be used with any AI platform that supports the Model Context Protocol (MCP) or function calling capabilities, including Claude, GPT, Llama, and others.
157
-
158
- ### Setup with Claude Desktop
159
-
160
- Add this to your claude_desktop_config.json:
193
+ **Key Points:**
194
+
195
+ - **"default"** = Master Database in both locations
196
+ - **Current location** shows whether you're using project or global storage
197
+ - **Master database exists everywhere** - it's your primary memory store
198
+ - **Named databases** are optional additions for specific topics
199
+
200
+ ## Configuration Examples
201
+
202
+ **Important:** Always specify `--memory-path` to control where your memory files are stored.
203
+
204
+ **Home directory:**
161
205
 
162
206
  ```json
163
207
  {
@@ -168,31 +212,32 @@ Add this to your claude_desktop_config.json:
168
212
  "-y",
169
213
  "mcp-knowledge-graph",
170
214
  "--memory-path",
171
- "/Users/shaneholloman/Dropbox/shane/db/memory.jsonl"
172
- ],
173
- "autoapprove": [
174
- "create_entities",
175
- "create_relations",
176
- "add_observations",
177
- "delete_entities",
178
- "delete_observations",
179
- "delete_relations",
180
- "read_graph",
181
- "search_nodes",
182
- "open_nodes"
215
+ "/Users/yourusername/.aim"
183
216
  ]
184
- },
217
+ }
185
218
  }
186
219
  }
187
220
  ```
188
221
 
189
- ### Setup with Other AI Platforms
222
+ **Custom location (e.g., Dropbox):**
190
223
 
191
- Any AI platform that supports function calling or the MCP standard can connect to this server. The specific configuration will depend on the platform, but the server exposes standard tools through the MCP interface.
192
-
193
- ### Custom Memory Path
224
+ ```json
225
+ {
226
+ "mcpServers": {
227
+ "memory": {
228
+ "command": "npx",
229
+ "args": [
230
+ "-y",
231
+ "mcp-knowledge-graph",
232
+ "--memory-path",
233
+ "/Users/yourusername/Dropbox/.aim"
234
+ ]
235
+ }
236
+ }
237
+ }
238
+ ```
194
239
 
195
- You can specify a custom path for the memory file:
240
+ **Auto-approve all operations:**
196
241
 
197
242
  ```json
198
243
  {
@@ -203,69 +248,49 @@ You can specify a custom path for the memory file:
203
248
  "-y",
204
249
  "mcp-knowledge-graph",
205
250
  "--memory-path",
206
- "/Users/shaneholloman/Dropbox/shane/db/memory.jsonl"
251
+ "/Users/yourusername/.aim"
207
252
  ],
208
253
  "autoapprove": [
209
- "create_entities",
210
- "create_relations",
211
- "add_observations",
212
- "delete_entities",
213
- "delete_observations",
214
- "delete_relations",
215
- "read_graph",
216
- "search_nodes",
217
- "open_nodes"
254
+ "aim_create_entities",
255
+ "aim_create_relations",
256
+ "aim_add_observations",
257
+ "aim_search_nodes",
258
+ "aim_read_graph",
259
+ "aim_open_nodes",
260
+ "aim_list_databases"
218
261
  ]
219
- },
262
+ }
220
263
  }
221
264
  }
222
265
  ```
223
266
 
224
- If no path is specified, it will default to memory.jsonl in the server's installation directory.
225
-
226
- ### System Prompt
227
-
228
- The prompt for utilizing memory depends on the use case and the AI model you're using. Changing the prompt will help the model determine the frequency and types of memories created.
267
+ ## Troubleshooting
229
268
 
230
- Here is an example prompt for chat personalization that can be adapted for any AI model. For Claude users, you could use this prompt in the "Custom Instructions" field of a [Claude.ai Project](https://www.anthropic.com/news/projects). For other models, adapt it to their respective instruction formats.
269
+ **"File does not contain required _aim safety marker" error:**
231
270
 
232
- ```txt
233
- Follow these steps for each interaction:
271
+ - The file may not belong to this system
272
+ - Manual JSONL files need `{"type":"_aim","source":"mcp-knowledge-graph"}` as first line
273
+ - If you created the file manually, add the `_aim` marker or delete and let the system recreate it
234
274
 
235
- 1. User Identification:
236
- - You should assume that you are interacting with default_user
237
- - If you have not identified default_user, proactively try to do so.
275
+ **Memories going to unexpected locations:**
238
276
 
239
- 2. Memory Retrieval:
240
- - Always begin your chat by saying only "Remembering..." and retrieve all relevant information from your knowledge graph
241
- - Always refer to your knowledge graph as your "memory"
242
-
243
- 3. Memory Gathering:
244
- - While conversing with the user, be attentive to any new information that falls into these categories:
245
- a) Basic Identity (age, gender, location, job title, education level, etc.)
246
- b) Behaviors (interests, habits, etc.)
247
- c) Preferences (communication style, preferred language, etc.)
248
- d) Goals (goals, targets, aspirations, etc.)
249
- e) Relationships (personal and professional relationships up to 3 degrees of separation)
250
-
251
- 4. Memory Update:
252
- - If any new information was gathered during the interaction, update your memory as follows:
253
- a) Create entities for recurring organizations, people, and significant events
254
- b) Connect them to the current entities using relations
255
- c) Store facts about them as observations
256
- ```
277
+ - Check if you're in a project directory with `.aim` folder (uses project-local storage)
278
+ - Otherwise uses the configured global `--memory-path` directory
279
+ - Use `aim_list_databases` to see all available databases and current location
280
+ - Use `ls .aim/` or `ls /Users/yourusername/.aim/` to see your memory files
257
281
 
258
- ## Integration with Other AI Models
282
+ **Too many similar databases:**
259
283
 
260
- This server implements the Model Context Protocol (MCP) standard, making it compatible with any AI model that supports function calling. The knowledge graph structure and API are model-agnostic, allowing for flexible integration with various AI platforms.
284
+ - AI models try to use consistent names, but may create variations
285
+ - Manually delete unwanted database files if needed
286
+ - Encourage AI to use simple, consistent database names
287
+ - **Remember**: Master database is always available as the default - named databases are optional
261
288
 
262
- To integrate with other models:
289
+ ## Requirements
263
290
 
264
- 1. Configure the model to access the MCP server
265
- 2. Ensure the model can make function calls to the exposed tools
266
- 3. Adapt the system prompt to the specific model's instruction format
267
- 4. Use the same knowledge graph operations regardless of the model
291
+ - Node.js 18+
292
+ - MCP-compatible AI platform
268
293
 
269
294
  ## License
270
295
 
271
- This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
296
+ MIT
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
4
  import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
5
  import { promises as fs } from 'fs';
6
+ import { existsSync } from 'fs';
6
7
  import path from 'path';
7
8
  import { fileURLToPath } from 'url';
8
9
  import minimist from 'minimist';
@@ -14,17 +15,95 @@ let memoryPath = argv['memory-path'];
14
15
  if (memoryPath && !isAbsolute(memoryPath)) {
15
16
  memoryPath = path.resolve(process.cwd(), memoryPath);
16
17
  }
17
- // Define the path to the JSONL file
18
+ // Define the base directory for memory files
18
19
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
19
- // Use the custom path or default to the installation directory
20
- const MEMORY_FILE_PATH = memoryPath || path.join(__dirname, 'memory.jsonl');
20
+ // Handle memory path - could be a file or directory
21
+ let baseMemoryPath;
22
+ if (memoryPath) {
23
+ // If memory-path points to a .jsonl file, use its directory as the base
24
+ if (memoryPath.endsWith('.jsonl')) {
25
+ baseMemoryPath = path.dirname(memoryPath);
26
+ }
27
+ else {
28
+ // Otherwise treat it as a directory
29
+ baseMemoryPath = memoryPath;
30
+ }
31
+ }
32
+ else {
33
+ baseMemoryPath = __dirname;
34
+ }
35
+ // Simple marker to identify our files - prevents writing to unrelated JSONL files
36
+ const FILE_MARKER = {
37
+ type: "_aim",
38
+ source: "mcp-knowledge-graph"
39
+ };
40
+ // Project detection - look for common project markers
41
+ function findProjectRoot(startDir = process.cwd()) {
42
+ const projectMarkers = ['.git', 'package.json', 'pyproject.toml', 'Cargo.toml', 'go.mod'];
43
+ let currentDir = startDir;
44
+ const maxDepth = 5;
45
+ for (let i = 0; i < maxDepth; i++) {
46
+ // Check for project markers
47
+ for (const marker of projectMarkers) {
48
+ if (existsSync(path.join(currentDir, marker))) {
49
+ return currentDir;
50
+ }
51
+ }
52
+ // Move up one directory
53
+ const parentDir = path.dirname(currentDir);
54
+ if (parentDir === currentDir) {
55
+ // Reached root directory
56
+ break;
57
+ }
58
+ currentDir = parentDir;
59
+ }
60
+ return null;
61
+ }
62
+ // Function to get memory file path based on context and optional location override
63
+ function getMemoryFilePath(context, location) {
64
+ const filename = context ? `memory-${context}.jsonl` : 'memory.jsonl';
65
+ // If location is explicitly specified, use it
66
+ if (location === 'global') {
67
+ return path.join(baseMemoryPath, filename);
68
+ }
69
+ if (location === 'project') {
70
+ const projectRoot = findProjectRoot();
71
+ if (projectRoot) {
72
+ const aimDir = path.join(projectRoot, '.aim');
73
+ return path.join(aimDir, filename); // Will create .aim if it doesn't exist
74
+ }
75
+ else {
76
+ throw new Error('No project detected - cannot use project location');
77
+ }
78
+ }
79
+ // Auto-detect logic (existing behavior)
80
+ const projectRoot = findProjectRoot();
81
+ if (projectRoot) {
82
+ const aimDir = path.join(projectRoot, '.aim');
83
+ if (existsSync(aimDir)) {
84
+ return path.join(aimDir, filename);
85
+ }
86
+ }
87
+ // Fallback to configured base directory
88
+ return path.join(baseMemoryPath, filename);
89
+ }
21
90
  // The KnowledgeGraphManager class contains all operations to interact with the knowledge graph
22
91
  class KnowledgeGraphManager {
23
- async loadGraph() {
92
+ async loadGraph(context, location) {
93
+ const filePath = getMemoryFilePath(context, location);
24
94
  try {
25
- const data = await fs.readFile(MEMORY_FILE_PATH, "utf-8");
95
+ const data = await fs.readFile(filePath, "utf-8");
26
96
  const lines = data.split("\n").filter(line => line.trim() !== "");
27
- return lines.reduce((graph, line) => {
97
+ if (lines.length === 0) {
98
+ return { entities: [], relations: [] };
99
+ }
100
+ // Check first line for our file marker
101
+ const firstLine = JSON.parse(lines[0]);
102
+ if (firstLine.type !== "_aim" || firstLine.source !== "mcp-knowledge-graph") {
103
+ throw new Error(`File ${filePath} does not contain required _aim safety marker. This file may not belong to the knowledge graph system. Expected first line: {"type":"_aim","source":"mcp-knowledge-graph"}`);
104
+ }
105
+ // Process remaining lines (skip metadata)
106
+ return lines.slice(1).reduce((graph, line) => {
28
107
  const item = JSON.parse(line);
29
108
  if (item.type === "entity")
30
109
  graph.entities.push(item);
@@ -35,36 +114,42 @@ class KnowledgeGraphManager {
35
114
  }
36
115
  catch (error) {
37
116
  if (error instanceof Error && 'code' in error && error.code === "ENOENT") {
117
+ // File doesn't exist - we'll create it with metadata on first save
38
118
  return { entities: [], relations: [] };
39
119
  }
40
120
  throw error;
41
121
  }
42
122
  }
43
- async saveGraph(graph) {
123
+ async saveGraph(graph, context, location) {
124
+ const filePath = getMemoryFilePath(context, location);
125
+ // Write our simple file marker
44
126
  const lines = [
127
+ JSON.stringify(FILE_MARKER),
45
128
  ...graph.entities.map(e => JSON.stringify({ type: "entity", ...e })),
46
129
  ...graph.relations.map(r => JSON.stringify({ type: "relation", ...r })),
47
130
  ];
48
- await fs.writeFile(MEMORY_FILE_PATH, lines.join("\n"));
131
+ // Ensure directory exists
132
+ await fs.mkdir(path.dirname(filePath), { recursive: true });
133
+ await fs.writeFile(filePath, lines.join("\n"));
49
134
  }
50
- async createEntities(entities) {
51
- const graph = await this.loadGraph();
135
+ async createEntities(entities, context, location) {
136
+ const graph = await this.loadGraph(context, location);
52
137
  const newEntities = entities.filter(e => !graph.entities.some(existingEntity => existingEntity.name === e.name));
53
138
  graph.entities.push(...newEntities);
54
- await this.saveGraph(graph);
139
+ await this.saveGraph(graph, context, location);
55
140
  return newEntities;
56
141
  }
57
- async createRelations(relations) {
58
- const graph = await this.loadGraph();
142
+ async createRelations(relations, context, location) {
143
+ const graph = await this.loadGraph(context, location);
59
144
  const newRelations = relations.filter(r => !graph.relations.some(existingRelation => existingRelation.from === r.from &&
60
145
  existingRelation.to === r.to &&
61
146
  existingRelation.relationType === r.relationType));
62
147
  graph.relations.push(...newRelations);
63
- await this.saveGraph(graph);
148
+ await this.saveGraph(graph, context, location);
64
149
  return newRelations;
65
150
  }
66
- async addObservations(observations) {
67
- const graph = await this.loadGraph();
151
+ async addObservations(observations, context, location) {
152
+ const graph = await this.loadGraph(context, location);
68
153
  const results = observations.map(o => {
69
154
  const entity = graph.entities.find(e => e.name === o.entityName);
70
155
  if (!entity) {
@@ -74,38 +159,38 @@ class KnowledgeGraphManager {
74
159
  entity.observations.push(...newObservations);
75
160
  return { entityName: o.entityName, addedObservations: newObservations };
76
161
  });
77
- await this.saveGraph(graph);
162
+ await this.saveGraph(graph, context, location);
78
163
  return results;
79
164
  }
80
- async deleteEntities(entityNames) {
81
- const graph = await this.loadGraph();
165
+ async deleteEntities(entityNames, context, location) {
166
+ const graph = await this.loadGraph(context, location);
82
167
  graph.entities = graph.entities.filter(e => !entityNames.includes(e.name));
83
168
  graph.relations = graph.relations.filter(r => !entityNames.includes(r.from) && !entityNames.includes(r.to));
84
- await this.saveGraph(graph);
169
+ await this.saveGraph(graph, context, location);
85
170
  }
86
- async deleteObservations(deletions) {
87
- const graph = await this.loadGraph();
171
+ async deleteObservations(deletions, context, location) {
172
+ const graph = await this.loadGraph(context, location);
88
173
  deletions.forEach(d => {
89
174
  const entity = graph.entities.find(e => e.name === d.entityName);
90
175
  if (entity) {
91
176
  entity.observations = entity.observations.filter(o => !d.observations.includes(o));
92
177
  }
93
178
  });
94
- await this.saveGraph(graph);
179
+ await this.saveGraph(graph, context, location);
95
180
  }
96
- async deleteRelations(relations) {
97
- const graph = await this.loadGraph();
181
+ async deleteRelations(relations, context, location) {
182
+ const graph = await this.loadGraph(context, location);
98
183
  graph.relations = graph.relations.filter(r => !relations.some(delRelation => r.from === delRelation.from &&
99
184
  r.to === delRelation.to &&
100
185
  r.relationType === delRelation.relationType));
101
- await this.saveGraph(graph);
186
+ await this.saveGraph(graph, context, location);
102
187
  }
103
- async readGraph() {
104
- return this.loadGraph();
188
+ async readGraph(context, location) {
189
+ return this.loadGraph(context, location);
105
190
  }
106
191
  // Very basic search function
107
- async searchNodes(query) {
108
- const graph = await this.loadGraph();
192
+ async searchNodes(query, context, location) {
193
+ const graph = await this.loadGraph(context, location);
109
194
  // Filter entities
110
195
  const filteredEntities = graph.entities.filter(e => e.name.toLowerCase().includes(query.toLowerCase()) ||
111
196
  e.entityType.toLowerCase().includes(query.toLowerCase()) ||
@@ -120,8 +205,8 @@ class KnowledgeGraphManager {
120
205
  };
121
206
  return filteredGraph;
122
207
  }
123
- async openNodes(names) {
124
- const graph = await this.loadGraph();
208
+ async openNodes(names, context, location) {
209
+ const graph = await this.loadGraph(context, location);
125
210
  // Filter entities
126
211
  const filteredEntities = graph.entities.filter(e => names.includes(e.name));
127
212
  // Create a Set of filtered entity names for quick lookup
@@ -134,6 +219,50 @@ class KnowledgeGraphManager {
134
219
  };
135
220
  return filteredGraph;
136
221
  }
222
+ async listDatabases() {
223
+ const result = {
224
+ project_databases: [],
225
+ global_databases: [],
226
+ current_location: ""
227
+ };
228
+ // Check project-local .aim directory
229
+ const projectRoot = findProjectRoot();
230
+ if (projectRoot) {
231
+ const aimDir = path.join(projectRoot, '.aim');
232
+ if (existsSync(aimDir)) {
233
+ result.current_location = "project (.aim directory detected)";
234
+ try {
235
+ const files = await fs.readdir(aimDir);
236
+ result.project_databases = files
237
+ .filter(file => file.endsWith('.jsonl'))
238
+ .map(file => file === 'memory.jsonl' ? 'default' : file.replace('memory-', '').replace('.jsonl', ''))
239
+ .sort();
240
+ }
241
+ catch (error) {
242
+ // Directory exists but can't read - ignore
243
+ }
244
+ }
245
+ else {
246
+ result.current_location = "global (no .aim directory in project)";
247
+ }
248
+ }
249
+ else {
250
+ result.current_location = "global (no project detected)";
251
+ }
252
+ // Check global directory
253
+ try {
254
+ const files = await fs.readdir(baseMemoryPath);
255
+ result.global_databases = files
256
+ .filter(file => file.endsWith('.jsonl'))
257
+ .map(file => file === 'memory.jsonl' ? 'default' : file.replace('memory-', '').replace('.jsonl', ''))
258
+ .sort();
259
+ }
260
+ catch (error) {
261
+ // Directory doesn't exist or can't read
262
+ result.global_databases = [];
263
+ }
264
+ return result;
265
+ }
137
266
  }
138
267
  const knowledgeGraphManager = new KnowledgeGraphManager();
139
268
  // The server instance and tools exposed to AI models
@@ -149,11 +278,42 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
149
278
  return {
150
279
  tools: [
151
280
  {
152
- name: "create_entities",
153
- description: "Create multiple new entities in the knowledge graph",
281
+ name: "aim_create_entities",
282
+ description: `Create multiple new entities in the knowledge graph.
283
+
284
+ DATABASE SELECTION: By default, all memories are stored in the master database. Use the 'context' parameter to organize information into separate knowledge graphs for different areas of life or work.
285
+
286
+ STORAGE LOCATION: Files are stored in the user's configured directory, or project-local .aim directory if one exists. Each database creates its own file (e.g., memory-work.jsonl, memory-personal.jsonl).
287
+
288
+ LOCATION OVERRIDE: Use the 'location' parameter to force storage in a specific location:
289
+ - 'project': Always use project-local .aim directory (creates if needed)
290
+ - 'global': Always use global configured directory
291
+ - Leave blank: Auto-detect (project if .aim exists, otherwise global)
292
+
293
+ WHEN TO USE DATABASES:
294
+ - Any descriptive name: 'work', 'personal', 'health', 'research', 'basket-weaving', 'book-club', etc.
295
+ - New databases are created automatically - no setup required
296
+ - IMPORTANT: Use consistent, simple names - prefer 'work' over 'work-stuff' or 'job-related'
297
+ - Common examples: 'work' (professional), 'personal' (private), 'health' (medical), 'research' (academic)
298
+ - Leave blank: General information or when unsure (uses master database)
299
+
300
+ EXAMPLES:
301
+ - Master database (default): aim_create_entities({entities: [{name: "John", entityType: "person", observations: ["Met at conference"]}]})
302
+ - Work database: aim_create_entities({context: "work", entities: [{name: "Q4_Project", entityType: "project", observations: ["Due December 2024"]}]})
303
+ - Master database in global location: aim_create_entities({location: "global", entities: [{name: "John", entityType: "person", observations: ["Met at conference"]}]})
304
+ - Work database in project location: aim_create_entities({context: "work", location: "project", entities: [{name: "Q4_Project", entityType: "project", observations: ["Due December 2024"]}]})`,
154
305
  inputSchema: {
155
306
  type: "object",
156
307
  properties: {
308
+ context: {
309
+ type: "string",
310
+ description: "Optional memory context. Defaults to master database if not specified. Use any descriptive name ('work', 'personal', 'health', 'basket-weaving', etc.) - new contexts created automatically."
311
+ },
312
+ location: {
313
+ type: "string",
314
+ enum: ["project", "global"],
315
+ description: "Optional storage location override. 'project' forces project-local .aim directory, 'global' forces global directory. If not specified, uses automatic detection."
316
+ },
157
317
  entities: {
158
318
  type: "array",
159
319
  items: {
@@ -175,11 +335,30 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
175
335
  },
176
336
  },
177
337
  {
178
- name: "create_relations",
179
- description: "Create multiple new relations between entities in the knowledge graph. Relations should be in active voice",
338
+ name: "aim_create_relations",
339
+ description: `Create multiple new relations between entities in the knowledge graph. Relations should be in active voice.
340
+
341
+ DATABASE SELECTION: Relations are created within the specified database's knowledge graph. Entities must exist in the same database.
342
+
343
+ LOCATION OVERRIDE: Use the 'location' parameter to force storage in 'project' (.aim directory) or 'global' (configured directory). Leave blank for auto-detection.
344
+
345
+ EXAMPLES:
346
+ - Master database (default): aim_create_relations({relations: [{from: "John", to: "TechConf2024", relationType: "attended"}]})
347
+ - Work database: aim_create_relations({context: "work", relations: [{from: "Alice", to: "Q4_Project", relationType: "manages"}]})
348
+ - Master database in global location: aim_create_relations({location: "global", relations: [{from: "John", to: "TechConf2024", relationType: "attended"}]})
349
+ - Personal database in project location: aim_create_relations({context: "personal", location: "project", relations: [{from: "Mom", to: "Gardening", relationType: "enjoys"}]})`,
180
350
  inputSchema: {
181
351
  type: "object",
182
352
  properties: {
353
+ context: {
354
+ type: "string",
355
+ description: "Optional memory context. Relations will be created in the specified context's knowledge graph."
356
+ },
357
+ location: {
358
+ type: "string",
359
+ enum: ["project", "global"],
360
+ description: "Optional storage location override. 'project' forces project-local .aim directory, 'global' forces global directory. If not specified, uses automatic detection."
361
+ },
183
362
  relations: {
184
363
  type: "array",
185
364
  items: {
@@ -197,11 +376,30 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
197
376
  },
198
377
  },
199
378
  {
200
- name: "add_observations",
201
- description: "Add new observations to existing entities in the knowledge graph",
379
+ name: "aim_add_observations",
380
+ description: `Add new observations to existing entities in the knowledge graph.
381
+
382
+ DATABASE SELECTION: Observations are added to entities within the specified database's knowledge graph.
383
+
384
+ LOCATION OVERRIDE: Use the 'location' parameter to force storage in 'project' (.aim directory) or 'global' (configured directory). Leave blank for auto-detection.
385
+
386
+ EXAMPLES:
387
+ - Master database (default): aim_add_observations({observations: [{entityName: "John", contents: ["Lives in Seattle", "Works in tech"]}]})
388
+ - Work database: aim_add_observations({context: "work", observations: [{entityName: "Q4_Project", contents: ["Behind schedule", "Need more resources"]}]})
389
+ - Master database in global location: aim_add_observations({location: "global", observations: [{entityName: "John", contents: ["Lives in Seattle", "Works in tech"]}]})
390
+ - Health database in project location: aim_add_observations({context: "health", location: "project", observations: [{entityName: "Daily_Routine", contents: ["30min morning walk", "8 glasses water"]}]})`,
202
391
  inputSchema: {
203
392
  type: "object",
204
393
  properties: {
394
+ context: {
395
+ type: "string",
396
+ description: "Optional memory context. Observations will be added to entities in the specified context's knowledge graph."
397
+ },
398
+ location: {
399
+ type: "string",
400
+ enum: ["project", "global"],
401
+ description: "Optional storage location override. 'project' forces project-local .aim directory, 'global' forces global directory. If not specified, uses automatic detection."
402
+ },
205
403
  observations: {
206
404
  type: "array",
207
405
  items: {
@@ -222,11 +420,30 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
222
420
  },
223
421
  },
224
422
  {
225
- name: "delete_entities",
226
- description: "Delete multiple entities and their associated relations from the knowledge graph",
423
+ name: "aim_delete_entities",
424
+ description: `Delete multiple entities and their associated relations from the knowledge graph.
425
+
426
+ DATABASE SELECTION: Entities are deleted from the specified database's knowledge graph.
427
+
428
+ LOCATION OVERRIDE: Use the 'location' parameter to force deletion from 'project' (.aim directory) or 'global' (configured directory). Leave blank for auto-detection.
429
+
430
+ EXAMPLES:
431
+ - Master database (default): aim_delete_entities({entityNames: ["OldProject"]})
432
+ - Work database: aim_delete_entities({context: "work", entityNames: ["CompletedTask", "CancelledMeeting"]})
433
+ - Master database in global location: aim_delete_entities({location: "global", entityNames: ["OldProject"]})
434
+ - Personal database in project location: aim_delete_entities({context: "personal", location: "project", entityNames: ["ExpiredReminder"]})`,
227
435
  inputSchema: {
228
436
  type: "object",
229
437
  properties: {
438
+ context: {
439
+ type: "string",
440
+ description: "Optional memory context. Entities will be deleted from the specified context's knowledge graph."
441
+ },
442
+ location: {
443
+ type: "string",
444
+ enum: ["project", "global"],
445
+ description: "Optional storage location override. 'project' forces project-local .aim directory, 'global' forces global directory. If not specified, uses automatic detection."
446
+ },
230
447
  entityNames: {
231
448
  type: "array",
232
449
  items: { type: "string" },
@@ -237,11 +454,30 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
237
454
  },
238
455
  },
239
456
  {
240
- name: "delete_observations",
241
- description: "Delete specific observations from entities in the knowledge graph",
457
+ name: "aim_delete_observations",
458
+ description: `Delete specific observations from entities in the knowledge graph.
459
+
460
+ DATABASE SELECTION: Observations are deleted from entities within the specified database's knowledge graph.
461
+
462
+ LOCATION OVERRIDE: Use the 'location' parameter to force deletion from 'project' (.aim directory) or 'global' (configured directory). Leave blank for auto-detection.
463
+
464
+ EXAMPLES:
465
+ - Master database (default): aim_delete_observations({deletions: [{entityName: "John", observations: ["Outdated info"]}]})
466
+ - Work database: aim_delete_observations({context: "work", deletions: [{entityName: "Project", observations: ["Old deadline"]}]})
467
+ - Master database in global location: aim_delete_observations({location: "global", deletions: [{entityName: "John", observations: ["Outdated info"]}]})
468
+ - Health database in project location: aim_delete_observations({context: "health", location: "project", deletions: [{entityName: "Exercise", observations: ["Injured knee"]}]})`,
242
469
  inputSchema: {
243
470
  type: "object",
244
471
  properties: {
472
+ context: {
473
+ type: "string",
474
+ description: "Optional memory context. Observations will be deleted from entities in the specified context's knowledge graph."
475
+ },
476
+ location: {
477
+ type: "string",
478
+ enum: ["project", "global"],
479
+ description: "Optional storage location override. 'project' forces project-local .aim directory, 'global' forces global directory. If not specified, uses automatic detection."
480
+ },
245
481
  deletions: {
246
482
  type: "array",
247
483
  items: {
@@ -262,11 +498,30 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
262
498
  },
263
499
  },
264
500
  {
265
- name: "delete_relations",
266
- description: "Delete multiple relations from the knowledge graph",
501
+ name: "aim_delete_relations",
502
+ description: `Delete multiple relations from the knowledge graph.
503
+
504
+ DATABASE SELECTION: Relations are deleted from the specified database's knowledge graph.
505
+
506
+ LOCATION OVERRIDE: Use the 'location' parameter to force deletion from 'project' (.aim directory) or 'global' (configured directory). Leave blank for auto-detection.
507
+
508
+ EXAMPLES:
509
+ - Master database (default): aim_delete_relations({relations: [{from: "John", to: "OldCompany", relationType: "worked_at"}]})
510
+ - Work database: aim_delete_relations({context: "work", relations: [{from: "Alice", to: "CancelledProject", relationType: "manages"}]})
511
+ - Master database in global location: aim_delete_relations({location: "global", relations: [{from: "John", to: "OldCompany", relationType: "worked_at"}]})
512
+ - Personal database in project location: aim_delete_relations({context: "personal", location: "project", relations: [{from: "Me", to: "OldHobby", relationType: "enjoys"}]})`,
267
513
  inputSchema: {
268
514
  type: "object",
269
515
  properties: {
516
+ context: {
517
+ type: "string",
518
+ description: "Optional memory context. Relations will be deleted from the specified context's knowledge graph."
519
+ },
520
+ location: {
521
+ type: "string",
522
+ enum: ["project", "global"],
523
+ description: "Optional storage location override. 'project' forces project-local .aim directory, 'global' forces global directory. If not specified, uses automatic detection."
524
+ },
270
525
  relations: {
271
526
  type: "array",
272
527
  items: {
@@ -285,30 +540,88 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
285
540
  },
286
541
  },
287
542
  {
288
- name: "read_graph",
289
- description: "Read the entire knowledge graph",
543
+ name: "aim_read_graph",
544
+ description: `Read the entire knowledge graph.
545
+
546
+ DATABASE SELECTION: Reads from the specified database or master database if no database is specified.
547
+
548
+ LOCATION OVERRIDE: Use the 'location' parameter to force reading from 'project' (.aim directory) or 'global' (configured directory). Leave blank for auto-detection.
549
+
550
+ EXAMPLES:
551
+ - Master database (default): aim_read_graph({})
552
+ - Work database: aim_read_graph({context: "work"})
553
+ - Master database in global location: aim_read_graph({location: "global"})
554
+ - Personal database in project location: aim_read_graph({context: "personal", location: "project"})`,
290
555
  inputSchema: {
291
556
  type: "object",
292
- properties: {},
557
+ properties: {
558
+ context: {
559
+ type: "string",
560
+ description: "Optional memory context. Reads from the specified context's knowledge graph or master database if not specified."
561
+ },
562
+ location: {
563
+ type: "string",
564
+ enum: ["project", "global"],
565
+ description: "Optional storage location override. 'project' forces project-local .aim directory, 'global' forces global directory. If not specified, uses automatic detection."
566
+ }
567
+ },
293
568
  },
294
569
  },
295
570
  {
296
- name: "search_nodes",
297
- description: "Search for nodes in the knowledge graph based on a query",
571
+ name: "aim_search_nodes",
572
+ description: `Search for nodes in the knowledge graph based on a query.
573
+
574
+ DATABASE SELECTION: Searches within the specified database or master database if no database is specified.
575
+
576
+ LOCATION OVERRIDE: Use the 'location' parameter to force searching in 'project' (.aim directory) or 'global' (configured directory). Leave blank for auto-detection.
577
+
578
+ EXAMPLES:
579
+ - Master database (default): aim_search_nodes({query: "John"})
580
+ - Work database: aim_search_nodes({context: "work", query: "project"})
581
+ - Master database in global location: aim_search_nodes({location: "global", query: "John"})
582
+ - Personal database in project location: aim_search_nodes({context: "personal", location: "project", query: "family"})`,
298
583
  inputSchema: {
299
584
  type: "object",
300
585
  properties: {
586
+ context: {
587
+ type: "string",
588
+ description: "Optional memory context. Searches within the specified context's knowledge graph or master database if not specified."
589
+ },
590
+ location: {
591
+ type: "string",
592
+ enum: ["project", "global"],
593
+ description: "Optional storage location override. 'project' forces project-local .aim directory, 'global' forces global directory. If not specified, uses automatic detection."
594
+ },
301
595
  query: { type: "string", description: "The search query to match against entity names, types, and observation content" },
302
596
  },
303
597
  required: ["query"],
304
598
  },
305
599
  },
306
600
  {
307
- name: "open_nodes",
308
- description: "Open specific nodes in the knowledge graph by their names",
601
+ name: "aim_open_nodes",
602
+ description: `Open specific nodes in the knowledge graph by their names.
603
+
604
+ DATABASE SELECTION: Retrieves entities from the specified database or master database if no database is specified.
605
+
606
+ LOCATION OVERRIDE: Use the 'location' parameter to force retrieval from 'project' (.aim directory) or 'global' (configured directory). Leave blank for auto-detection.
607
+
608
+ EXAMPLES:
609
+ - Master database (default): aim_open_nodes({names: ["John", "TechConf2024"]})
610
+ - Work database: aim_open_nodes({context: "work", names: ["Q4_Project", "Alice"]})
611
+ - Master database in global location: aim_open_nodes({location: "global", names: ["John", "TechConf2024"]})
612
+ - Personal database in project location: aim_open_nodes({context: "personal", location: "project", names: ["Mom", "Birthday_Plans"]})`,
309
613
  inputSchema: {
310
614
  type: "object",
311
615
  properties: {
616
+ context: {
617
+ type: "string",
618
+ description: "Optional memory context. Retrieves entities from the specified context's knowledge graph or master database if not specified."
619
+ },
620
+ location: {
621
+ type: "string",
622
+ enum: ["project", "global"],
623
+ description: "Optional storage location override. 'project' forces project-local .aim directory, 'global' forces global directory. If not specified, uses automatic detection."
624
+ },
312
625
  names: {
313
626
  type: "array",
314
627
  items: { type: "string" },
@@ -318,6 +631,19 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
318
631
  required: ["names"],
319
632
  },
320
633
  },
634
+ {
635
+ name: "aim_list_databases",
636
+ description: `List all available memory databases in both project and global locations.
637
+
638
+ DISCOVERY: Shows which databases exist, where they're stored, and which location is currently active.
639
+
640
+ EXAMPLES:
641
+ - aim_list_databases() - Shows all available databases and current storage location`,
642
+ inputSchema: {
643
+ type: "object",
644
+ properties: {},
645
+ },
646
+ },
321
647
  ],
322
648
  };
323
649
  });
@@ -327,27 +653,29 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
327
653
  throw new Error(`No arguments provided for tool: ${name}`);
328
654
  }
329
655
  switch (name) {
330
- case "create_entities":
331
- return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.createEntities(args.entities), null, 2) }] };
332
- case "create_relations":
333
- return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.createRelations(args.relations), null, 2) }] };
334
- case "add_observations":
335
- return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.addObservations(args.observations), null, 2) }] };
336
- case "delete_entities":
337
- await knowledgeGraphManager.deleteEntities(args.entityNames);
656
+ case "aim_create_entities":
657
+ return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.createEntities(args.entities, args.context, args.location), null, 2) }] };
658
+ case "aim_create_relations":
659
+ return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.createRelations(args.relations, args.context, args.location), null, 2) }] };
660
+ case "aim_add_observations":
661
+ return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.addObservations(args.observations, args.context, args.location), null, 2) }] };
662
+ case "aim_delete_entities":
663
+ await knowledgeGraphManager.deleteEntities(args.entityNames, args.context, args.location);
338
664
  return { content: [{ type: "text", text: "Entities deleted successfully" }] };
339
- case "delete_observations":
340
- await knowledgeGraphManager.deleteObservations(args.deletions);
665
+ case "aim_delete_observations":
666
+ await knowledgeGraphManager.deleteObservations(args.deletions, args.context, args.location);
341
667
  return { content: [{ type: "text", text: "Observations deleted successfully" }] };
342
- case "delete_relations":
343
- await knowledgeGraphManager.deleteRelations(args.relations);
668
+ case "aim_delete_relations":
669
+ await knowledgeGraphManager.deleteRelations(args.relations, args.context, args.location);
344
670
  return { content: [{ type: "text", text: "Relations deleted successfully" }] };
345
- case "read_graph":
346
- return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.readGraph(), null, 2) }] };
347
- case "search_nodes":
348
- return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.searchNodes(args.query), null, 2) }] };
349
- case "open_nodes":
350
- return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.openNodes(args.names), null, 2) }] };
671
+ case "aim_read_graph":
672
+ return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.readGraph(args.context, args.location), null, 2) }] };
673
+ case "aim_search_nodes":
674
+ return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.searchNodes(args.query, args.context, args.location), null, 2) }] };
675
+ case "aim_open_nodes":
676
+ return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.openNodes(args.names, args.context, args.location), null, 2) }] };
677
+ case "aim_list_databases":
678
+ return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.listDatabases(), null, 2) }] };
351
679
  default:
352
680
  throw new Error(`Unknown tool: ${name}`);
353
681
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,qCAAqC;AACrC,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C,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C,OAAiB,EAAE,IAAI,CAAC,QAAgC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACtM,KAAK,oBAAoB;YACvB,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,qBAAqB,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACrH;YACE,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;AAC/D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "mcp-knowledge-graph",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "description": "MCP server enabling persistent memory for AI models through a local knowledge graph",
5
5
  "license": "MIT",
6
6
  "author": "Shane Holloman",
7
7
  "homepage": "https://github.com/shaneholloman/mcp-knowledge-graph",
8
8
  "bugs": "https://github.com/shaneholloman/mcp-knowledge-graph/issues",
9
9
  "type": "module",
10
+ "engines": {
11
+ "node": ">=18.0.0"
12
+ },
10
13
  "bin": {
11
14
  "mcp-knowledge-graph": "dist/index.js"
12
15
  },
@@ -28,4 +31,4 @@
28
31
  "shx": "^0.3.4",
29
32
  "typescript": "^5.6.2"
30
33
  }
31
- }
34
+ }