-
Notifications
You must be signed in to change notification settings - Fork 25
Update OpenMemory MCP configuration to build from Ushadow-io/mem0 for… #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
402656d
e7e44d1
9de6466
37768b5
4aef6c5
658615f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,3 @@ | ||
| cache/ | ||
| cache/ | ||
| mem0-fork/ | ||
| .env |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,50 +1,97 @@ | ||||||||||||||||||||||
| services: | ||||||||||||||||||||||
| # Qdrant vector database for OpenMemory (following original naming) | ||||||||||||||||||||||
| # Qdrant vector database for OpenMemory | ||||||||||||||||||||||
| mem0_store: | ||||||||||||||||||||||
| image: qdrant/qdrant | ||||||||||||||||||||||
| ports: | ||||||||||||||||||||||
| - "6335:6333" # Different port to avoid conflict with main Qdrant | ||||||||||||||||||||||
| - "6335:6333" # Different port to avoid conflict with main Chronicle Qdrant | ||||||||||||||||||||||
| volumes: | ||||||||||||||||||||||
| - ./data/mem0_storage:/qdrant/storage | ||||||||||||||||||||||
| networks: | ||||||||||||||||||||||
| - mem0-network | ||||||||||||||||||||||
| restart: unless-stopped | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # OpenMemory MCP Server (official Docker image) | ||||||||||||||||||||||
| # OpenMemory MCP API Server (pre-built image from fork) | ||||||||||||||||||||||
| openmemory-mcp: | ||||||||||||||||||||||
| image: mem0/openmemory-mcp:latest | ||||||||||||||||||||||
| image: ghcr.io/ushadow-io/u-mem0-api:latest | ||||||||||||||||||||||
| env_file: | ||||||||||||||||||||||
| - .env | ||||||||||||||||||||||
| environment: | ||||||||||||||||||||||
| - USER=${USER:-openmemory} | ||||||||||||||||||||||
| - API_KEY=${API_KEY:-} | ||||||||||||||||||||||
| - OPENAI_API_KEY=${OPENAI_API_KEY} | ||||||||||||||||||||||
| - OPENMEMORY_USER_ID=${OPENMEMORY_USER_ID:-openmemory} | ||||||||||||||||||||||
| - QDRANT_URL=http://mem0_store:6333 | ||||||||||||||||||||||
| - NEO4J_URL=${NEO4J_URL:-bolt://neo4j:7687} | ||||||||||||||||||||||
| - NEO4J_USERNAME=${NEO4J_USERNAME:-neo4j} | ||||||||||||||||||||||
| - NEO4J_PASSWORD=${NEO4J_PASSWORD:-taketheredpillNe0} | ||||||||||||||||||||||
|
Comment on lines
+23
to
+25
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical: Hardcoded Neo4j password is a major security vulnerability. The password
🔎 Recommended fixesOption 1 (Recommended): Remove defaults entirely and require users to set secure passwords: - - NEO4J_PASSWORD=${NEO4J_PASSWORD:-taketheredpillNe0}
+ - NEO4J_PASSWORD=${NEO4J_PASSWORD:?NEO4J_PASSWORD must be set in .env}
- - NEO4J_AUTH=neo4j/taketheredpillNe0
+ - NEO4J_AUTH=${NEO4J_USERNAME:-neo4j}/${NEO4J_PASSWORD:?NEO4J_PASSWORD required}Option 2: Generate a random password during setup: Add to your setup script: # Generate secure random password if not set
if [ -z "$NEO4J_PASSWORD" ]; then
NEO4J_PASSWORD=$(openssl rand -base64 32)
echo "NEO4J_PASSWORD=$NEO4J_PASSWORD" >> .env
fiOption 3: Use Docker secrets (for production): secrets:
neo4j_password:
file: ./secrets/neo4j_password.txt
environment:
- NEO4J_AUTH=neo4j/run/secrets/neo4j_passwordAlso update the README to emphasize that users must change the default password before deployment. Also applies to: 65-65 🤖 Prompt for AI Agents |
||||||||||||||||||||||
| depends_on: | ||||||||||||||||||||||
| - mem0_store | ||||||||||||||||||||||
| - neo4j | ||||||||||||||||||||||
| ports: | ||||||||||||||||||||||
| - "8765:8765" | ||||||||||||||||||||||
| networks: | ||||||||||||||||||||||
| - mem0-network | ||||||||||||||||||||||
| - chronicle-network | ||||||||||||||||||||||
| restart: unless-stopped | ||||||||||||||||||||||
| healthcheck: | ||||||||||||||||||||||
| test: ["CMD", "python", "-c", "import requests; exit(0 if requests.get('http://localhost:8765/docs').status_code == 200 else 1)"] | ||||||||||||||||||||||
| test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8765/docs')"] | ||||||||||||||||||||||
| interval: 30s | ||||||||||||||||||||||
| timeout: 10s | ||||||||||||||||||||||
| retries: 3 | ||||||||||||||||||||||
| start_period: 30s | ||||||||||||||||||||||
| networks: | ||||||||||||||||||||||
| - default | ||||||||||||||||||||||
| - chronicle-network | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # OpenMemory UI (starts by default with the MCP server) | ||||||||||||||||||||||
| # OpenMemory UI (pre-built image from fork) | ||||||||||||||||||||||
| openmemory-ui: | ||||||||||||||||||||||
| image: mem0/openmemory-ui:latest | ||||||||||||||||||||||
| image: ghcr.io/ushadow-io/u-mem0-ui:latest | ||||||||||||||||||||||
| ports: | ||||||||||||||||||||||
| - "3001:3000" # Different port to avoid conflict | ||||||||||||||||||||||
| - "3333:3000" | ||||||||||||||||||||||
| environment: | ||||||||||||||||||||||
| - NEXT_PUBLIC_API_URL=http://localhost:8765 | ||||||||||||||||||||||
| - NEXT_PUBLIC_USER_ID=openmemory | ||||||||||||||||||||||
| - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8765} | ||||||||||||||||||||||
| - NEXT_PUBLIC_USER_ID=${NEXT_PUBLIC_USER_ID:-openmemory} | ||||||||||||||||||||||
| depends_on: | ||||||||||||||||||||||
| - openmemory-mcp | ||||||||||||||||||||||
| networks: | ||||||||||||||||||||||
| - mem0-network | ||||||||||||||||||||||
| restart: unless-stopped | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Neo4j graph database for advanced memory features | ||||||||||||||||||||||
| neo4j: | ||||||||||||||||||||||
| image: neo4j:latest | ||||||||||||||||||||||
| container_name: neo4j-mem0 | ||||||||||||||||||||||
| volumes: | ||||||||||||||||||||||
| - ./data/neo4j_data:/data | ||||||||||||||||||||||
| - ./data/neo4j_logs:/logs | ||||||||||||||||||||||
| - ./data/neo4j_config:/config | ||||||||||||||||||||||
| environment: | ||||||||||||||||||||||
| - NEO4J_AUTH=neo4j/taketheredpillNe0 | ||||||||||||||||||||||
| - NEO4J_server_memory_heap_initial__size=1G | ||||||||||||||||||||||
| - NEO4J_server_memory_heap_max__size=2G | ||||||||||||||||||||||
| - NEO4J_server_memory_pagecache_size=1G | ||||||||||||||||||||||
| - NEO4J_apoc_export_file_enabled=true | ||||||||||||||||||||||
| - NEO4J_apoc_import_file_enabled=true | ||||||||||||||||||||||
| - NEO4J_apoc_import_file_use__neo4j__config=true | ||||||||||||||||||||||
| - NEO4J_PLUGINS=["apoc", "graph-data-science"] | ||||||||||||||||||||||
| - NEO4J_dbms_security_procedures_unrestricted=apoc.*,gds.* | ||||||||||||||||||||||
|
Comment on lines
+69
to
+73
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security risk: Unrestricted procedures and file operations enabled. Lines 69-73 enable APOC file import/export and mark all APOC/GDS procedures as unrestricted. This configuration:
Consider restricting procedures to only those explicitly needed: - - NEO4J_dbms_security_procedures_unrestricted=apoc.*,gds.*
+ - NEO4J_dbms_security_procedures_unrestricted=apoc.load.*,apoc.export.*If full unrestricted access is genuinely required, document why in a comment and add authentication/network isolation safeguards. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| ports: | ||||||||||||||||||||||
| - "7474:7474" | ||||||||||||||||||||||
| - "7687:7687" | ||||||||||||||||||||||
| networks: | ||||||||||||||||||||||
| - mem0-network | ||||||||||||||||||||||
| restart: unless-stopped | ||||||||||||||||||||||
| healthcheck: | ||||||||||||||||||||||
| test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:7474"] | ||||||||||||||||||||||
| interval: 30s | ||||||||||||||||||||||
| timeout: 10s | ||||||||||||||||||||||
| retries: 5 | ||||||||||||||||||||||
| start_period: 40s | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| volumes: | ||||||||||||||||||||||
| mem0_storage: | ||||||||||||||||||||||
| neo4j_data: | ||||||||||||||||||||||
| neo4j_logs: | ||||||||||||||||||||||
| neo4j_config: | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| networks: | ||||||||||||||||||||||
| default: | ||||||||||||||||||||||
| name: openmemory-mcp_default | ||||||||||||||||||||||
| mem0-network: | ||||||||||||||||||||||
| driver: bridge | ||||||||||||||||||||||
| chronicle-network: | ||||||||||||||||||||||
| external: true | ||||||||||||||||||||||
| external: true | ||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove debug text from extraction prompt.
The prompt contains
"hehehe"which appears to be leftover debug/test text and should be removed before merging.🔎 Proposed fix
prompt: Extract important information from this conversation and return a JSON object with an array named "facts". Include personal preferences, plans, names, - dates, locations, numbers, and key details hehehe. Keep items concise and useful. + dates, locations, numbers, and key details. Keep items concise and useful.📝 Committable suggestion
🤖 Prompt for AI Agents