collective-memory-mcp 0.4.0 → 0.5.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 +20 -2
- package/package.json +1 -1
- package/src/server.js +37 -20
package/README.md
CHANGED
|
@@ -34,6 +34,24 @@ Add to your Claude Desktop MCP configuration (`~/.config/Claude/claude_desktop_c
|
|
|
34
34
|
|
|
35
35
|
The `-y` flag suppresses the npx prompt and auto-installs the latest version.
|
|
36
36
|
|
|
37
|
+
## System Prompt (Recommended)
|
|
38
|
+
|
|
39
|
+
Add this to your Claude system prompt to ensure agents know about the Collective Memory:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
You have access to a Collective Memory MCP Server that stores knowledge from previous tasks.
|
|
43
|
+
|
|
44
|
+
BEFORE starting work, search for similar past tasks using:
|
|
45
|
+
- search_collective_memory
|
|
46
|
+
- find_similar_procedures
|
|
47
|
+
|
|
48
|
+
AFTER completing any task, document it using:
|
|
49
|
+
- record_task_completion
|
|
50
|
+
|
|
51
|
+
When writing observations, be SPECIFIC and include facts like file paths, versions,
|
|
52
|
+
metrics, and error messages. Avoid vague statements like "works well" or "fixed bugs".
|
|
53
|
+
```
|
|
54
|
+
|
|
37
55
|
## Entity Types
|
|
38
56
|
|
|
39
57
|
| Type | Description |
|
|
@@ -118,10 +136,10 @@ const result = await session.callTool("find_similar_procedures", {
|
|
|
118
136
|
|
|
119
137
|
## Database
|
|
120
138
|
|
|
121
|
-
The server uses
|
|
139
|
+
The server uses JSON file storage for persistence. Data is stored at:
|
|
122
140
|
|
|
123
141
|
```
|
|
124
|
-
~/.collective-memory/memory.
|
|
142
|
+
~/.collective-memory/memory.json
|
|
125
143
|
```
|
|
126
144
|
|
|
127
145
|
## Requirements
|
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -230,15 +230,16 @@ function createServer() {
|
|
|
230
230
|
{
|
|
231
231
|
name: "search_collective_memory",
|
|
232
232
|
description:
|
|
233
|
-
"Search
|
|
234
|
-
"
|
|
235
|
-
"Returns entities with their
|
|
233
|
+
"**Search all past work** - Use before starting a task to learn from previous solutions. " +
|
|
234
|
+
"Searches entity names, types, and all observation content. " +
|
|
235
|
+
"Returns matching entities with their relations. " +
|
|
236
|
+
"Use find_similar_procedures for more detailed results with artifacts.",
|
|
236
237
|
inputSchema: {
|
|
237
238
|
type: "object",
|
|
238
239
|
properties: {
|
|
239
240
|
query: {
|
|
240
241
|
type: "string",
|
|
241
|
-
description: "
|
|
242
|
+
description: "What are you looking for? (e.g., 'authentication', 'CORS fix', 'database')",
|
|
242
243
|
},
|
|
243
244
|
},
|
|
244
245
|
required: ["query"],
|
|
@@ -265,33 +266,48 @@ function createServer() {
|
|
|
265
266
|
{
|
|
266
267
|
name: "record_task_completion",
|
|
267
268
|
description:
|
|
268
|
-
"
|
|
269
|
-
"Automatically creates
|
|
270
|
-
"
|
|
271
|
-
"
|
|
269
|
+
"**PRIMARY TOOL - Use this after completing any task** Document completed work with full context. " +
|
|
270
|
+
"Automatically creates task entity, agent entity, artifacts, and relations. " +
|
|
271
|
+
"" +
|
|
272
|
+
"**GUIDELINES FOR observations:** " +
|
|
273
|
+
"- Be SPECIFIC: 'Added JWT with 1-hour expiry' not 'Added auth' " +
|
|
274
|
+
"- Include FACTS: file paths, versions, metrics, error messages " +
|
|
275
|
+
"- Be ATOMIC: One fact per observation " +
|
|
276
|
+
"- BAD: 'Works well', 'Fixed bugs', 'Good code' " +
|
|
277
|
+
"- GOOD: 'API response time reduced from 500ms to 120ms', 'Fixed CORS by adding Origin header' " +
|
|
278
|
+
"" +
|
|
279
|
+
"**Parameters:** " +
|
|
280
|
+
"- agent_name: Your identifier (e.g., 'Agent_Backend_Developer') " +
|
|
281
|
+
"- task_name: Unique descriptive name (e.g., 'Task_Add_JWT_Auth_20241224') " +
|
|
282
|
+
"- task_type: Type (implementation/debugging/refactoring/testing) " +
|
|
283
|
+
"- description: High-level summary " +
|
|
284
|
+
"- observations: Array of specific facts (see guidelines above) " +
|
|
285
|
+
"- created_artifacts: Files/code created with their observations " +
|
|
286
|
+
"- modified_structures: Architectural changes " +
|
|
287
|
+
"- session_id: Optional - groups related tasks together",
|
|
272
288
|
inputSchema: {
|
|
273
289
|
type: "object",
|
|
274
290
|
properties: {
|
|
275
291
|
agent_name: {
|
|
276
292
|
type: "string",
|
|
277
|
-
description: "
|
|
293
|
+
description: "Your identifier (e.g., 'Agent_Backend_Developer')",
|
|
278
294
|
},
|
|
279
295
|
task_name: {
|
|
280
296
|
type: "string",
|
|
281
|
-
description: "Unique name
|
|
297
|
+
description: "Unique descriptive name (e.g., 'Task_Add_JWT_Auth_20241224')",
|
|
282
298
|
},
|
|
283
299
|
task_type: {
|
|
284
300
|
type: "string",
|
|
285
|
-
description: "Type
|
|
301
|
+
description: "Type: implementation, debugging, refactoring, testing, etc.",
|
|
286
302
|
},
|
|
287
303
|
description: {
|
|
288
304
|
type: "string",
|
|
289
|
-
description: "High-level
|
|
305
|
+
description: "High-level summary of what was accomplished",
|
|
290
306
|
},
|
|
291
307
|
observations: {
|
|
292
308
|
type: "array",
|
|
293
309
|
items: { type: "string" },
|
|
294
|
-
description: "
|
|
310
|
+
description: "Specific facts about the work. Be atomic and detailed. Include paths, versions, metrics.",
|
|
295
311
|
},
|
|
296
312
|
created_artifacts: {
|
|
297
313
|
type: "array",
|
|
@@ -306,7 +322,7 @@ function createServer() {
|
|
|
306
322
|
},
|
|
307
323
|
required: ["name"],
|
|
308
324
|
},
|
|
309
|
-
description: "
|
|
325
|
+
description: "Files, code, or configs you created",
|
|
310
326
|
},
|
|
311
327
|
modified_structures: {
|
|
312
328
|
type: "array",
|
|
@@ -321,11 +337,11 @@ function createServer() {
|
|
|
321
337
|
},
|
|
322
338
|
required: ["name"],
|
|
323
339
|
},
|
|
324
|
-
description: "
|
|
340
|
+
description: "Architectural patterns or structures that changed",
|
|
325
341
|
},
|
|
326
342
|
session_id: {
|
|
327
343
|
type: "string",
|
|
328
|
-
description: "Optional session identifier",
|
|
344
|
+
description: "Optional session identifier to group related tasks",
|
|
329
345
|
},
|
|
330
346
|
},
|
|
331
347
|
required: ["agent_name", "task_name"],
|
|
@@ -334,15 +350,16 @@ function createServer() {
|
|
|
334
350
|
{
|
|
335
351
|
name: "find_similar_procedures",
|
|
336
352
|
description:
|
|
337
|
-
"
|
|
338
|
-
"
|
|
339
|
-
"
|
|
353
|
+
"**Use BEFORE starting work** - Find how similar tasks were solved previously. " +
|
|
354
|
+
"Returns complete implementation details including artifacts and structures. " +
|
|
355
|
+
"Learn from past solutions before implementing new features. " +
|
|
356
|
+
"Query examples: 'authentication', 'database migration', 'API design', 'error handling'.",
|
|
340
357
|
inputSchema: {
|
|
341
358
|
type: "object",
|
|
342
359
|
properties: {
|
|
343
360
|
query: {
|
|
344
361
|
type: "string",
|
|
345
|
-
description: "
|
|
362
|
+
description: "What are you trying to do? (e.g., 'authentication implementation', 'database migration')",
|
|
346
363
|
},
|
|
347
364
|
},
|
|
348
365
|
required: ["query"],
|