All notable changes to this project will be documented in this file.
- Fixed embedder configuration - Corrected OpenAI API key reference for Supabase mode
- Published to npmjs - Updated package available via npx for immediate testing
- Confirmed functionality - Supabase storage mode tested and working with vector search
- Memory operations verified - All tools (add_memory, search_memory, delete_memory) functional with Supabase
- Added Supabase as a third storage option alongside Mem0 cloud and local storage
- Persistent storage with free tier - Supabase offers generous free tier for development
- Self-hostable option - Users can run their own Supabase instance for complete control
- Vector search with pgvector - Efficient similarity search using PostgreSQL's pgvector extension
- SQL access - Direct database access for advanced queries and analytics
- Storage mode priority: Cloud (MEM0_API_KEY) > Supabase (SUPABASE_URL + SUPABASE_KEY) > Local (OPENAI_API_KEY)
- Environment variables: Added support for
SUPABASE_URLandSUPABASE_KEY - Database setup: Comprehensive SQL migrations for memories and memory_history tables
- Vector search function: Custom PostgreSQL function for similarity search with filtering
- Full tool support: All three tools (add_memory, search_memory, delete_memory) work with Supabase
- Comprehensive Supabase setup guide with step-by-step SQL migrations
- Configuration examples for all three installation methods (global, npx, cloned repo)
- Storage mode comparison highlighting benefits of each option
- Environment variable documentation for Supabase credentials
- Free persistent storage - Alternative to paid Mem0 cloud service
- Local control - Self-hosted option for privacy and compliance
- Scalability - Grows from free tier to enterprise scale
- Advanced features - Real-time subscriptions, webhooks, direct SQL access
- No vendor lock-in - Open source PostgreSQL with standard SQL
- SUCCESS: Confirmed that
app_idandrun_idparameters are now working correctly! - Dashboard Behavior: Parameters appear in individual memory details (Event Details panel) as expected
- API Version: Re-added
version="v2"for add operations as recommended by Mem0 docs (v1 is deprecated) - UI Limitation: Mem0 dashboard doesn't show
app_id/run_idin main list view by design - this is normal behavior
- Mem0 stores
app_idandrun_idas first-class fields, not in metadata - Dashboard UI focuses on user/agent groupings;
app_id/run_idappear in memory details and are fully queryable - Parameters are working correctly - the "missing" display in main list was expected behavior
- All memory operations now use proper API versions and endpoints
- ✅ Project scoping via
app_id- WORKING - ✅ Session tracking via
run_id- WORKING - ✅ Agent identification via
agent_id- WORKING - ✅ Memory organization and filtering - WORKING
- API Endpoint Corrections:
- Add Memory: Uses
/v1/memories/ - Search Memory: Uses
/v1/memories/search/withversion=v2parameter - Delete Memory: Uses
/v1/memories/{id}/
- Add Memory: Uses
- Fixed delete endpoint URL from
/v2/memories/{id}to/v1/memories/{id}/
- API Call Priority: Now prioritizes direct REST API calls over Node.js SDK when
app_idorrun_idparameters are provided - Enhanced Parameter Support: Ensures
app_idandrun_idparameters are properly passed to Mem0 API for project scoping and session tracking - Better Debugging: Added specific logging when using direct API calls for parameter-sensitive operations
- Modified both
add_memoryandsearch_memorymethods to use direct REST API calls whenapp_idorsessionIdparameters are present - The Node.js SDK appears to have limitations with certain parameters, so direct API calls ensure full parameter support
- Maintains backward compatibility while ensuring all parameters work correctly
- Added fallback logic to SDK if direct API calls fail
- Updated README with comprehensive parameter configuration guide
- Added system prompt recommendations for LLM usage
- Enhanced examples showing correct parameter usage
- Clarified that org_id/project_id are auto-assigned by Mem0
- MAJOR FIX: Replaced incorrect
orgId/projectIdparameters with correct Mem0 API parameters - Parameter Mapping:
agentId- The LLM/agent making the tool calluserId- The user's identifierappId- The user's project/application (this controls project scope!)sessionId- Maps torun_idfor session tracking
- Environment Fallbacks: Added
DEFAULT_AGENT_IDandDEFAULT_APP_IDenvironment variables - API Compliance: Now uses correct Mem0 API parameters (
app_id,agent_id,run_id) instead of non-functional org/project IDs
- Root Cause: org_id and project_id are set by Mem0 automatically and cannot be changed by users
- Correct Scope Control: app_id is what actually controls the user's project scope in Mem0
- Parameter Precedence: Tool parameters take precedence over environment variable defaults
- Enhanced Logging: Added comprehensive parameter resolution logging for debugging
- Removed all references to
orgId/projectId(these are auto-assigned by Mem0) - Implemented proper
app_idparameter for project scoping - Updated tool schemas to reflect correct parameter names and descriptions
- Added fallback logic for
DEFAULT_AGENT_IDandDEFAULT_APP_IDenvironment variables - Updated direct REST API calls to use correct parameter names
- CRITICAL FIX: Added fallback to direct REST API calls when Node.js SDK doesn't properly handle org_id/project_id parameters
- SDK Limitation Workaround: Node.js SDK appears to ignore org_id/project_id parameters, so we now use direct REST API calls as fallback
- Enhanced Error Handling: Added comprehensive error handling with automatic fallback from SDK to direct API calls
- Better Debugging: Added detailed logging for both SDK attempts and direct API calls to help identify issues
- When
cloudClient.add()orcloudClient.search()fails or ignores org/project parameters, automatically falls back to direct REST API calls - Direct API calls use proper
https://api.mem0.ai/v1/memories/endpoints with full parameter support - Maintains backward compatibility while ensuring org_id and project_id parameters work correctly
- Added comprehensive request/response logging for debugging
- CRITICAL FIX: Removed organizationId and projectId from client-level initialization to fix environment variable fallbacks
- Parameter Override Issue: Client-level org/project settings were overriding per-request parameters, preventing environment variables and tool parameters from working
- Enhanced Debugging: Added comprehensive logging to track parameter resolution and API call options
- Environment Variable Fallbacks: ORG_ID and PROJECT_ID environment variables now work correctly when tool parameters are omitted
- Removed
organizationIdandprojectIdfrom MemoryClient constructor options - Client-level settings were preventing per-request
org_idandproject_idparameters from taking effect - Added detailed logging to help debug parameter resolution issues
- Environment variable fallback logic now works as intended
- BREAKING FIX: Fixed client initialization issue where org_id and project_id set at client level were overriding per-request values
- API Parameter Format: Changed API method parameters from camelCase to snake_case to match Mem0 REST API specification
userId→user_idorgId→org_idprojectId→project_idagentId→agent_idsessionId→session_idcustomCategories→custom_categoriescustomInstructions→custom_instructionsoutputFormat→output_formatexpirationDate→expiration_datetopK→top_kkeywordSearch→keyword_searchfilterMemories→filter_memories
- Client Initialization: Now properly sets organizationId and projectId at client level using camelCase (as expected by JavaScript SDK)
- Environment Variable Fallbacks: ORG_ID and PROJECT_ID environment variable fallbacks now work properly when explicit parameters are not provided
- Enhanced error messages to include API response details for better debugging
- Added comprehensive parameter validation and logging
- Improved client initialization logging to show which parameters are being used
- This version fixes the core issue where organization and project IDs were not being properly passed to the Mem0 API
- Users should now see their memories properly scoped to their organization and project
- Environment variable fallbacks (ORG_ID, PROJECT_ID) will now work as expected when tool parameters are omitted
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- CRITICAL FIX: Fixed organization and project ID parameters not working properly
- Changed from snake_case (
org_id,project_id) to camelCase (organizationId,projectId) for JavaScript client compatibility - Fixed environment variable fallbacks (
ORG_ID,PROJECT_ID) not working due to incorrect parameter names - Updated all API calls to use correct JavaScript/Node.js parameter naming convention
- This resolves issues where explicit org/project parameters were ignored and environment defaults weren't applied
- Changed from snake_case (
- Updated
add_memory,search_memory, anddelete_memorymethods to use camelCase parameters - Fixed parameter mapping:
userId,organizationId,projectId,sessionId,agentId - Fixed advanced parameters:
outputFormat,customCategories,customInstructions,expirationDate,topK,keywordSearch,filterMemories - Maintains backward compatibility with environment variable names
- 🐛 CRITICAL BUG FIX: Fixed DEFAULT_USER_ID environment variable not being used as fallback when userId parameter is omitted
-
- 🐛 Also fixed issue with PROJECT_ID and ORG_ID variables not being used as fallback when projectId and orgId parameters are omitted during tool use
- 📚 Enhanced README: Added comprehensive section explaining environment variable fallback behavior
- 🎯 Clarified priority order: Tool parameters override environment variables
- 📝 Added detailed examples showing when defaults are used vs. overridden
- 💡 Provided guidance on instructing LLMs to use configured defaults
- 🔍 Added GitHub issue comment explaining fallback behavior to user
- 📖 Improved documentation clarity for environment variable usage patterns
- 🐛 CRITICAL BUG FIX: Fixed DEFAULT_USER_ID environment variable not being used as fallback when userId parameter is omitted
- ✅ All three tools (add_memory, search_memory, delete_memory) now properly use DEFAULT_USER_ID as fallback
- 🔧 Updated tool schemas to make userId parameter optional with clear fallback documentation
- 📝 Improved error messages to indicate when DEFAULT_USER_ID environment variable is missing
- 🎯 Resolves GitHub issue #3 where environment variables were not taking effect
- 📋 Made userId parameter optional in all tool schemas since DEFAULT_USER_ID provides fallback
- 🔄 Enhanced parameter validation logic to use environment variable fallbacks consistently
- 🔒 CRITICAL: Fixed high severity security vulnerabilities in dependencies
- 🛡️ Updated axios from 1.7.7 to 1.9.0 to address SSRF and credential leakage vulnerability (GHSA-jr5f-v2jv-69x6)
- 🛡️ Updated undici from 5.28.5 to 7.10.0 to address denial of service vulnerability (GHSA-cxrh-j4jr-qwg3)
- ⚙️ Added npm overrides in package.json to ensure secure dependency versions
- ✅ All security vulnerabilities resolved - npm audit now shows 0 vulnerabilities
- 📦 Added dependency overrides for axios and undici to maintain security compliance
- 🔧 Enhanced package.json with security-focused dependency management
- ✨ Added support for
orgIdandprojectIdas parameters in all tools (add_memory, search_memory, delete_memory) - 🚀 Added comprehensive support for advanced Mem0 API parameters:
- add_memory:
includes,excludes,infer,outputFormat,customCategories,customInstructions,immutable,expirationDate - search_memory:
topK,fields,rerank,keywordSearch,filterMemories
- add_memory:
- 📊 Parameter-provided
orgIdandprojectIdnow take precedence over environment variables for better user control - 🔧 Enhanced configuration generator with
ORG_IDandPROJECT_IDprompts for easier setup - 🌟 Added global installation support with
mem0-mcpcommand - 📚 Added comprehensive installation documentation with three methods: global install, npx, and local build
- 🎯 Enhanced configuration generator with global install option
- 📋 Updated all README configuration examples to show complete environment variables
- 🔧 Updated TypeScript interfaces to include all new parameters
- 📝 Enhanced tool schemas with detailed descriptions for all new parameters
- 🏗️ Improved parameter handling logic with proper fallbacks
- 🧹 Removed unused
tiktoken-nodedependency to clean up the project
- ✅ Resolved version mismatch between package.json and source code (now both 0.3.3)
- 🔧 Fixed configuration generator indentation issues and removed unused session ID environment variables
- 📝 Clarified that session IDs are tool parameters, not environment variables
0.3.2 - 2025-04-20
- Fixed issue with
thresholdparameter insearch_memorytool when using cloud storage mode. The parameter is now properly handled to ensure it's never passed as null to the Mem0 API, which was causing errors for some users.
0.3.0 - 2025-04-05
- ✨ Added
delete_memorytool to remove specific memories by ID. - ☁️ Implemented support for Mem0 Cloud API using
MEM0_API_KEY. - 🏢 Added optional support for
ORG_IDandPROJECT_IDenvironment variables for Cloud API scoping. - 🔄 Added dynamic switching between Cloud API (if
MEM0_API_KEYis present) and local in-memory storage (ifOPENAI_API_KEYis present).
0.2.7 - 2025-04-08
- New MCP tool:
delete_memoryfor removing specific memories by ID - Comprehensive documentation for advanced Mem0 API parameters
- Detailed explanation of filters and comparison operators for the search functionality
- Fixed mapping between
sessionIdandrun_idin search functionality for cloud API - Clarified in-memory storage limitations in documentation
0.2.5 - 2025-04-05
- Implemented
SafeLoggerclass to selectively redirect console.log calls from mem0ai library to stderr without breaking MCP protocol - Fixed critical issue where stdout writes from internal libraries were disrupting the MCP communication protocol
- Added environment variable configurations to minimize debug logging from libraries
- Improved error handling and cleanup on process exit
0.1.7 - 2025-04-05
- Fixed MCP communication by removing all
consolelogging that was interfering with the stdout protocol channel.
0.1.6 - 2025-04-05
- Reverted
search_memorytool description and schema to explicitly requireuserId, removing misleading "optional" phrasing related to theDEFAULT_USER_IDfallback. - Added documentation to
README.mdexplaining theDEFAULT_USER_IDenvironment variable and its use as a server-side fallback forsearch_memoryif theuserIdargument is omitted (though providinguserIdin the call is recommended).
0.1.5- 2025-04-05
- Resolved issue where memories were not being stored correctly due to unconfigured default database (Qdrant). Explicitly configured
mem0aiclient to use the in-memory vector store by default, ensuring basic functionality works out-of-the-box.
0.1.0 - 2025-04-05
- Initial functional Node.js/TypeScript implementation of
@pinkpixel/mem0-mcp. - Integration with
mem0aiNode.js SDK. - MCP tools:
mem0_add_memoryandmem0_search_memory. - Requires
OPENAI_API_KEYenvironment variable. - Configuration for npm publishing under
@pinkpixelscope. README.mdwith description, features, prerequisites, and installation instructions.- Standard
LICENSE(MIT),CHANGELOG.md, and.gitignore.