@prmichaelsen/remember-mcp 2.0.0 → 2.0.4

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.
Files changed (35) hide show
  1. package/AGENT.md +216 -2
  2. package/CHANGELOG.md +48 -0
  3. package/README.md +68 -7
  4. package/agent/design/design.template.md +136 -0
  5. package/agent/design/requirements.template.md +387 -0
  6. package/agent/milestones/milestone-1-{title}.template.md +206 -0
  7. package/agent/patterns/bootstrap.template.md +1237 -0
  8. package/agent/patterns/pattern.template.md +364 -0
  9. package/agent/progress.template.yaml +158 -0
  10. package/agent/progress.yaml +111 -8
  11. package/agent/scripts/check-for-updates.sh +88 -0
  12. package/agent/scripts/uninstall.sh +75 -0
  13. package/agent/scripts/update.sh +75 -0
  14. package/agent/tasks/task-1-{title}.template.md +225 -0
  15. package/agent/tasks/task-22-comprehensive-error-handling.md +218 -0
  16. package/agent/tasks/task-23-fix-relationship-creation-errors.md +97 -0
  17. package/agent/tasks/task-24-fix-weaviate-filter-path-error.md +132 -0
  18. package/agent/tasks/task-25-fix-update-memory-errors.md +116 -0
  19. package/dist/server-factory.js +192 -74
  20. package/dist/server.js +192 -74
  21. package/dist/utils/error-handler.d.ts +40 -0
  22. package/package.json +1 -1
  23. package/src/tools/create-memory.ts +8 -2
  24. package/src/tools/create-relationship.ts +42 -5
  25. package/src/tools/delete-memory.ts +8 -2
  26. package/src/tools/delete-relationship.ts +7 -2
  27. package/src/tools/find-similar.ts +9 -2
  28. package/src/tools/get-preferences.ts +7 -2
  29. package/src/tools/query-memory.ts +8 -2
  30. package/src/tools/search-memory.ts +8 -3
  31. package/src/tools/search-relationship.ts +44 -47
  32. package/src/tools/set-preference.ts +7 -2
  33. package/src/tools/update-memory.ts +41 -10
  34. package/src/tools/update-relationship.ts +8 -2
  35. package/src/utils/error-handler.ts +79 -0
package/AGENT.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Agent Context Protocol (ACP)
2
2
 
3
3
  **Also Known As**: The Agent Directory Pattern
4
- **Version**: 1.0.2
4
+ **Version**: 1.0.3
5
5
  **Created**: 2026-02-11
6
6
  **Status**: Production Pattern
7
7
 
@@ -555,10 +555,14 @@ The Agent Pattern represents a **paradigm shift** in how we approach AI-assisted
555
555
 
556
556
  ### Initialize Prompt
557
557
 
558
+ **Trigger**: `AGENT.md: Initialize`
559
+
558
560
  Use this prompt when starting work on an ACP-structured project:
559
561
 
560
562
  ```markdown
561
- Read ALL files in @agent. We are going to understand this project then work on a generic task.
563
+ First, check for ACP updates by running ./agent/scripts/check-for-updates.sh (if it exists). If updates are available, report what changed and ask if I want to update.
564
+
565
+ Then read ALL files in @agent. We are going to understand this project then work on a generic task.
562
566
 
563
567
  Then read KEY src files per your understanding.
564
568
 
@@ -566,6 +570,7 @@ Then read @agent again, update stale @agent/tasks, stale documentation, and upda
566
570
  ```
567
571
 
568
572
  **Purpose**:
573
+ - Checks for updates to ACP methodology and documentation
569
574
  - Loads complete project context from agent directory
570
575
  - Reviews source code to understand current implementation
571
576
  - Updates documentation to reflect current state
@@ -573,6 +578,8 @@ Then read @agent again, update stale @agent/tasks, stale documentation, and upda
573
578
 
574
579
  ### Proceed Prompt
575
580
 
581
+ **Trigger**: `AGENT.md: Proceed`
582
+
576
583
  Use this prompt to continue with the next task:
577
584
 
578
585
  ```markdown
@@ -584,6 +591,57 @@ Let's proceed with implementing the current or next task. Remember to update @ag
584
591
  - Reminds agent to maintain progress tracking
585
592
  - Keeps workflow focused and documented
586
593
 
594
+ ### Update Prompt
595
+
596
+ **Trigger**: `AGENT.md: Update`
597
+
598
+ Updates all ACP files to the latest version:
599
+
600
+ ```markdown
601
+ Run ./agent/scripts/update.sh to update all ACP files (AGENT.md, templates, and scripts) to the latest version.
602
+ ```
603
+
604
+ **Purpose**:
605
+ - Updates AGENT.md methodology
606
+ - Updates all template files
607
+ - Updates utility scripts
608
+ - Keeps ACP current with latest improvements
609
+
610
+ ### Check for Updates Prompt
611
+
612
+ **Trigger**: `AGENT.md: Check for updates`
613
+
614
+ Checks if updates are available without applying them:
615
+
616
+ ```markdown
617
+ Run ./agent/scripts/check-for-updates.sh to see if ACP updates are available.
618
+ ```
619
+
620
+ **Purpose**:
621
+ - Non-destructive check for updates
622
+ - Shows what changed via CHANGELOG
623
+ - Informs user of available improvements
624
+
625
+ ### Uninstall Prompt
626
+
627
+ **Trigger**: `AGENT.md: Uninstall`
628
+
629
+ Removes all ACP files from the project:
630
+
631
+ ```markdown
632
+ Run ./agent/scripts/uninstall.sh to remove all ACP files (agent/ directory and AGENT.md) from this project.
633
+ ```
634
+
635
+ **Note**: This script requires user confirmation. If the user confirms they want to uninstall, run:
636
+ ```bash
637
+ ./agent/scripts/uninstall.sh -y
638
+ ```
639
+
640
+ **Purpose**:
641
+ - Complete removal of ACP
642
+ - Clean project state
643
+ - Reversible via git
644
+
587
645
  ---
588
646
 
589
647
  ## Instructions for Future Agents
@@ -724,6 +782,17 @@ Let's proceed with implementing the current or next task. Remember to update @ag
724
782
  - Update percentages
725
783
  - Add recent work notes
726
784
 
785
+ 7. **NEVER handle secrets or sensitive data**
786
+ - ❌ **DO NOT** read `.env` files, `.env.local`, or any environment files
787
+ - ❌ **DO NOT** read files containing API keys, tokens, passwords, or credentials
788
+ - ❌ **DO NOT** include secrets in messages, documentation, or code examples
789
+ - ❌ **DO NOT** read files like `secrets.yaml`, `credentials.json`, or similar
790
+ - ✅ **DO** use placeholder values like `YOUR_API_KEY_HERE` in examples
791
+ - ✅ **DO** document that users need to configure secrets separately
792
+ - ✅ **DO** reference environment variable names without reading their values
793
+ - ✅ **DO** create `.env.example` files with placeholder values only
794
+ - **Rationale**: Secrets must never be exposed in chat logs, documentation, or version control. Agents should treat all credential files as off-limits to prevent accidental exposure.
795
+
727
796
  ---
728
797
 
729
798
  ## Best Practices
@@ -804,6 +873,28 @@ Let's proceed with implementing the current or next task. Remember to update @ag
804
873
 
805
874
  ---
806
875
 
876
+ ## Keeping ACP Updated
877
+
878
+ This repository is actively maintained with improvements to the ACP methodology and documentation. To keep your project's AGENT.md current:
879
+
880
+ ```bash
881
+ # Run from your project root (if you have the update script installed)
882
+ ./agent/scripts/update.sh
883
+
884
+ # Or download and run directly
885
+ curl -fsSL https://raw.githubusercontent.com/prmichaelsen/agent-context-protocol/mainlin./agent/scripts/update.sh | bash
886
+ ```
887
+
888
+ The update script will:
889
+ 1. Create a backup of your current AGENT.md
890
+ 2. Download the latest version
891
+ 3. Show you the changes
892
+ 4. Ask for confirmation before applying
893
+
894
+ See [CHANGELOG.md](https://github.com/prmichaelsen/agent-context-protocol/blob/main/CHANGELOG.md) for version history and changes.
895
+
896
+ ---
897
+
807
898
  ## Conclusion
808
899
 
809
900
  The Agent Directory Pattern transforms software development from an implicit, memory-dependent process into an explicit, documented system that enables AI agents to work effectively on complex projects.
@@ -833,6 +924,129 @@ The Agent Directory Pattern transforms software development from an implicit, me
833
924
 
834
925
  ---
835
926
 
927
+ ## What NOT to Do
928
+
929
+ ### ❌ CRITICAL: Don't Create Summary Documents
930
+
931
+ **NEVER create these files under ANY circumstances:**
932
+ - `TASK_SUMMARY.md`
933
+ - `PROJECT_SUMMARY.md`
934
+ - `MILESTONE_SUMMARY.md`
935
+ - `PROGRESS_SUMMARY.md`
936
+ - Any file with `SUMMARY` in the name
937
+
938
+ **Why**: All summary information belongs in [`progress.yaml`](agent/progress.yaml). Creating separate summary documents:
939
+ - Duplicates information
940
+ - Creates inconsistency
941
+ - Requires maintaining multiple files
942
+ - Defeats the purpose of structured progress tracking
943
+
944
+ **Instead**: Update [`progress.yaml`](agent/progress.yaml):
945
+ ```yaml
946
+ recent_work:
947
+ - date: 2026-02-13
948
+ description: Summary of work completed
949
+ items:
950
+ - ✅ Completed task 1
951
+ - ✅ Completed task 2
952
+ ```
953
+
954
+ ### ❌ CRITICAL: Don't Create Variant Task Documents
955
+
956
+ **NEVER create these files under ANY circumstances:**
957
+ - `task-1-simplified.md`
958
+ - `task-1-revised.md`
959
+ - `task-1-v2.md`
960
+ - `task-1-updated.md`
961
+ - `task-1-alternative.md`
962
+
963
+ **Why**: Task documents are living documents that should be updated in place. Creating variants:
964
+ - Creates confusion about which is current
965
+ - Scatters information across multiple files
966
+ - Makes progress tracking impossible
967
+ - Violates single source of truth principle
968
+
969
+ **Instead**: Modify the existing task document directly:
970
+ ```markdown
971
+ # Task 1: Setup Project
972
+
973
+ **Status**: In Progress (Updated 2026-02-13)
974
+
975
+ ## Steps
976
+ 1. Create directory ✅ (Completed)
977
+ 2. Install dependencies ✅ (Completed)
978
+ 3. Configure build (Updated: Changed from webpack to esbuild)
979
+
980
+ ## Notes
981
+ - Originally planned to use webpack
982
+ - Switched to esbuild for better performance
983
+ - Updated configuration accordingly
984
+ ```
985
+
986
+ ### ✅ Correct Approach
987
+
988
+ 1. **For summaries**: Update [`progress.yaml`](agent/progress.yaml)
989
+ 2. **For task changes**: Modify existing task documents in place
990
+ 3. **For major changes**: Update the task and note the changes in [`progress.yaml`](agent/progress.yaml)
991
+ 4. **For new work**: Create new task documents with new numbers
992
+
993
+ ---
994
+
995
+ ## IMPORTANT: CHANGELOG.md Guidelines
996
+
997
+ ### ❌ CRITICAL: Keep CHANGELOG.md Pure
998
+
999
+ **CHANGELOG.md must ONLY contain:**
1000
+ - Version numbers and dates
1001
+ - Added features
1002
+ - Changed functionality
1003
+ - Removed features
1004
+ - Fixed bugs
1005
+
1006
+ **NEVER include in CHANGELOG.md:**
1007
+ - ❌ Future enhancements or roadmap
1008
+ - ❌ How-to instructions or usage guides
1009
+ - ❌ Installation instructions
1010
+ - ❌ Configuration examples
1011
+ - ❌ Detailed documentation
1012
+
1013
+ **Why**: CHANGELOG.md is a historical record of what changed, not a documentation file. Mixing concerns makes it harder to:
1014
+ - Understand version history
1015
+ - Track actual changes
1016
+ - Maintain the changelog
1017
+ - Find relevant information
1018
+
1019
+ **Correct CHANGELOG.md format:**
1020
+ ```markdown
1021
+ ## [1.0.4] - 2026-02-13
1022
+
1023
+ ### Added
1024
+ - New feature X
1025
+ - New feature Y
1026
+
1027
+ ### Changed
1028
+ - Modified behavior of Z
1029
+
1030
+ ### Removed
1031
+ - Deprecated feature A
1032
+ ```
1033
+
1034
+ **Wrong CHANGELOG.md format:**
1035
+ ```markdown
1036
+ ## [1.0.4] - 2026-02-13
1037
+
1038
+ ### Added
1039
+ - New feature X
1040
+
1041
+ ### How to Use Feature X
1042
+ [Installation instructions...] # ❌ WRONG - belongs in README
1043
+
1044
+ ### Future Enhancements
1045
+ - Plan to add Y # ❌ WRONG - belongs in design docs or issues
1046
+ ```
1047
+
1048
+ ---
1049
+
836
1050
  **The Agent Pattern is not just documentation—it's a development methodology that makes complex software projects tractable for AI agents.**
837
1051
 
838
1052
  ---
package/CHANGELOG.md CHANGED
@@ -5,6 +5,54 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.0.2] - 2026-02-14
9
+
10
+ ### ✨ Added
11
+
12
+ - **Comprehensive Error Handling**: Applied centralized error handler to all 12 MCP tools
13
+ - All tools now use `handleToolError()` from `src/utils/error-handler.ts`
14
+ - Consistent error logging with full context across all operations
15
+ - Stack traces included in all error messages
16
+ - Tool-specific context (userId, IDs, operation details) in every error
17
+
18
+ ### 🔧 Improved
19
+
20
+ - **Error Diagnostics**: Production debugging significantly enhanced
21
+ - Memory tools: create, update, delete, search, find-similar, query
22
+ - Relationship tools: create, update, delete, search
23
+ - Preference tools: set, get
24
+ - All errors now include operation context and user information
25
+
26
+ ---
27
+
28
+ ## [2.0.1] - 2026-02-14
29
+
30
+ ### 🐛 Fixed
31
+
32
+ - **Error Reporting**: Improved error logging in `remember_update_memory` for better debugging
33
+ - Added detailed error context including userId, memoryId, and provided fields
34
+ - Added stack traces to error messages for easier troubleshooting
35
+ - Added specific error handling for fetch and update operations
36
+ - Errors now include collection name and operation details
37
+ - Helps diagnose production issues in Cloud Run logs
38
+
39
+ ### 📝 Changes
40
+
41
+ - Error messages now include full context for debugging
42
+ - Separate try-catch blocks for fetch and update operations
43
+ - Better structured logging with error details
44
+
45
+ ---
46
+
47
+ ## [2.0.0] - 2026-02-12
48
+
49
+ ### 🚨 BREAKING CHANGES
50
+
51
+ - **`createServer` is now async**: The factory function now returns `Promise<Server>` instead of `Server`
52
+ - Same breaking change as v1.0.0, but bumped to v2.0.0 for clarity
53
+
54
+ ---
55
+
8
56
  ## [1.0.2] - 2026-02-12
9
57
 
10
58
  ### 🐛 Fixed
package/README.md CHANGED
@@ -2,15 +2,76 @@
2
2
 
3
3
  Multi-tenant memory system MCP server with vector search, relationships, and trust-based access control.
4
4
 
5
+ ## Value Proposition
6
+
7
+ **remember-mcp** gives AI assistants a persistent, searchable memory system that enables them to:
8
+
9
+ - **Remember Everything**: Store and recall information across conversations
10
+ - **Find Connections**: Discover relationships between memories using semantic search
11
+ - **Learn Over Time**: Build a knowledge graph that grows with each interaction
12
+ - **Personalize Responses**: Access user preferences and context for tailored interactions
13
+ - **Search Intelligently**: Use hybrid semantic + keyword search to find relevant memories
14
+ - **Organize Knowledge**: Categorize memories with 45+ content types (people, events, recipes, notes, etc.)
15
+
16
+ ### Why Use remember-mcp?
17
+
18
+ **For AI Assistants**:
19
+ - Persistent memory across sessions (no more forgetting previous conversations)
20
+ - Semantic search finds relevant context even with different wording
21
+ - Relationship tracking reveals connections between memories
22
+ - RAG-optimized queries for natural language understanding
23
+ - Trust-based access control for privacy-sensitive information
24
+
25
+ **For Developers**:
26
+ - Multi-tenant architecture with per-user isolation
27
+ - Production-ready with comprehensive error handling
28
+ - Compatible with Claude Desktop, mcp-auth, and custom integrations
29
+ - Vector embeddings via OpenAI for semantic understanding
30
+ - Firestore for metadata and preferences
31
+
32
+ **For Users**:
33
+ - Their AI assistant remembers important information
34
+ - Discovers connections between different topics
35
+ - Provides personalized responses based on preferences
36
+ - Respects privacy with trust-based access control
37
+
38
+ ## Use Cases
39
+
40
+ ### Personal Assistant
41
+ - "Remember that Sarah's birthday is June 15th"
42
+ - "What did I learn about React hooks last week?"
43
+ - "Find all my camping trip memories"
44
+ - "What recipes have I saved that use chicken?"
45
+
46
+ ### Knowledge Management
47
+ - Store research notes with semantic search
48
+ - Track relationships between concepts
49
+ - Build a personal knowledge graph
50
+ - Query with natural language
51
+
52
+ ### Project Tracking
53
+ - Remember project decisions and context
54
+ - Link related tasks and ideas
55
+ - Search across all project memories
56
+ - Track what inspired each decision
57
+
58
+ ### Relationship Management
59
+ - Remember details about people you meet
60
+ - Track connections between contacts
61
+ - Recall conversation context
62
+ - Find related interactions
63
+
5
64
  ## Features
6
65
 
7
- - 10 MCP tools for memory and relationship management
8
- - Multi-tenant with per-user isolation
9
- - Vector search with Weaviate (semantic + keyword hybrid search)
10
- - Knowledge graph with relationship tracking
11
- - RAG queries with natural language
12
- - 45 content types (notes, events, people, recipes, etc.)
13
- - Trust-based access control (planned for M7)
66
+ - **12 MCP Tools**: Complete CRUD for memories, relationships, and preferences
67
+ - **Multi-Tenant**: Per-user isolation with secure data boundaries
68
+ - **Vector Search**: Semantic + keyword hybrid search with Weaviate
69
+ - **Knowledge Graph**: N-way relationships with bidirectional tracking
70
+ - **RAG Queries**: Natural language queries with context-aware responses
71
+ - **45 Content Types**: Notes, events, people, recipes, goals, tasks, and more
72
+ - **User Preferences**: Customizable search, location, privacy, and display settings
73
+ - **Trust-Based Access**: Fine-grained access control (0-1 trust levels)
74
+ - **Production-Ready**: Comprehensive error handling and logging
14
75
 
15
76
  ## Quick Start
16
77
 
@@ -0,0 +1,136 @@
1
+ # {Feature/Pattern Name}
2
+
3
+ **Concept**: [One-line description of what this design addresses]
4
+ **Created**: YYYY-MM-DD
5
+ **Status**: Proposal | Design Specification | Implemented
6
+
7
+ ---
8
+
9
+ ## Overview
10
+
11
+ [High-level description of what this design document covers and why it exists. Provide context about the problem space and the importance of this design decision.]
12
+
13
+ **Example**: "This document describes the authentication flow for multi-tenant access, enabling secure per-user data isolation across the system."
14
+
15
+ ---
16
+
17
+ ## Problem Statement
18
+
19
+ [Clearly articulate the problem this design solves. Include:]
20
+ - What challenge or limitation exists?
21
+ - Why is this a problem worth solving?
22
+ - What are the consequences of not solving it?
23
+
24
+ **Example**: "Without proper multi-tenant isolation, users could potentially access each other's data, creating security vulnerabilities and privacy concerns."
25
+
26
+ ---
27
+
28
+ ## Solution
29
+
30
+ [Describe the proposed solution at a conceptual level. Include:]
31
+ - High-level approach
32
+ - Key components involved
33
+ - How the solution addresses the problem
34
+ - Alternative approaches considered (and why they were rejected)
35
+
36
+ **Example**: "Implement row-level security using user_id as a tenant identifier, enforced at both the database and application layers."
37
+
38
+ ---
39
+
40
+ ## Implementation
41
+
42
+ [Provide technical details needed to implement this design. Include:]
43
+ - Architecture diagrams (as ASCII art or references)
44
+ - Data structures and schemas
45
+ - API interfaces
46
+ - Code examples (use placeholder names)
47
+ - Configuration requirements
48
+ - Dependencies
49
+
50
+ **Example**:
51
+ ```typescript
52
+ interface TenantContext {
53
+ userId: string;
54
+ permissions: string[];
55
+ }
56
+
57
+ class DataService {
58
+ constructor(private context: TenantContext) {}
59
+
60
+ async getData(id: string): Promise<Data> {
61
+ // Implementation with tenant filtering
62
+ }
63
+ }
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Benefits
69
+
70
+ [List the advantages of this approach:]
71
+ - Benefit 1: [Description]
72
+ - Benefit 2: [Description]
73
+ - Benefit 3: [Description]
74
+
75
+ **Example**:
76
+ - **Security**: Complete data isolation between tenants
77
+ - **Scalability**: Horizontal scaling without data mixing concerns
78
+ - **Compliance**: Meets data privacy regulations (GDPR, etc.)
79
+
80
+ ---
81
+
82
+ ## Trade-offs
83
+
84
+ [Honestly assess the downsides and limitations:]
85
+ - Trade-off 1: [Description and mitigation strategy]
86
+ - Trade-off 2: [Description and mitigation strategy]
87
+ - Trade-off 3: [Description and mitigation strategy]
88
+
89
+ **Example**:
90
+ - **Performance**: Additional filtering adds query overhead (mitigated by proper indexing)
91
+ - **Complexity**: More complex queries and testing requirements
92
+ - **Migration**: Existing data requires backfill with tenant identifiers
93
+
94
+ ---
95
+
96
+ ## Dependencies
97
+
98
+ [List any dependencies this design has:]
99
+ - External services or APIs
100
+ - Other design documents
101
+ - Infrastructure requirements
102
+ - Third-party libraries
103
+
104
+ ---
105
+
106
+ ## Testing Strategy
107
+
108
+ [Describe how to verify this design works correctly:]
109
+ - Unit test requirements
110
+ - Integration test scenarios
111
+ - Security test cases
112
+ - Performance benchmarks
113
+
114
+ ---
115
+
116
+ ## Migration Path
117
+
118
+ [If this changes existing functionality, describe the migration strategy:]
119
+ 1. Step 1: [Description]
120
+ 2. Step 2: [Description]
121
+ 3. Step 3: [Description]
122
+
123
+ ---
124
+
125
+ ## Future Considerations
126
+
127
+ [Note any future enhancements or related work:]
128
+ - Future enhancement 1
129
+ - Future enhancement 2
130
+ - Related design documents to create
131
+
132
+ ---
133
+
134
+ **Status**: [Current implementation status]
135
+ **Recommendation**: [What should be done next - implement, review, revise, etc.]
136
+ **Related Documents**: [Links to related design docs, milestones, or tasks]