better-mem0-mcp 1.1.0b21__tar.gz → 1.1.2__tar.gz

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 (34) hide show
  1. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/.github/workflows/cd.yml +1 -1
  2. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/.mise.toml +1 -1
  3. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/.pre-commit-config.yaml +1 -1
  4. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/CHANGELOG.md +3 -23
  5. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/CONTRIBUTING.md +0 -49
  6. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/PKG-INFO +31 -56
  7. better_mem0_mcp-1.1.2/README.md +120 -0
  8. better_mem0_mcp-1.1.2/SECURITY.md +27 -0
  9. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/pyproject.toml +1 -1
  10. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/src/better_mem0_mcp/docs/memory.md +1 -14
  11. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/src/better_mem0_mcp/server.py +9 -16
  12. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/uv.lock +1 -1
  13. better_mem0_mcp-1.1.0b21/CODE_OF_CONDUCT.md +0 -82
  14. better_mem0_mcp-1.1.0b21/README.md +0 -145
  15. better_mem0_mcp-1.1.0b21/SECURITY.md +0 -32
  16. better_mem0_mcp-1.1.0b21/src/better_mem0_mcp/__main__.py +0 -6
  17. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/.dockerignore +0 -0
  18. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/.editorconfig +0 -0
  19. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/.github/scripts/check-ci-cd-status.sh +0 -0
  20. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/.github/scripts/merge-with-auto-resolve.sh +0 -0
  21. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/.github/workflows/ci.yml +0 -0
  22. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/.gitignore +0 -0
  23. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/.python-version +0 -0
  24. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/.releaserc.json +0 -0
  25. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/.vscode/better-mem0-mcp.code-workspace +0 -0
  26. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/Dockerfile +0 -0
  27. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/LICENSE +0 -0
  28. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/package-lock.json +0 -0
  29. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/package.json +0 -0
  30. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/scripts/clean-venv.mjs +0 -0
  31. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/src/better_mem0_mcp/__init__.py +0 -0
  32. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/src/better_mem0_mcp/config.py +0 -0
  33. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/src/better_mem0_mcp/graph.py +0 -0
  34. {better_mem0_mcp-1.1.0b21 → better_mem0_mcp-1.1.2}/src/better_mem0_mcp/py.typed +0 -0
@@ -71,7 +71,7 @@ jobs:
71
71
  - name: Setup Node.js
72
72
  uses: actions/setup-node@v6
73
73
  with:
74
- node-version: "24"
74
+ node-version: "22"
75
75
 
76
76
  - name: Install uv (for toml-cli)
77
77
  uses: astral-sh/setup-uv@v5
@@ -5,7 +5,7 @@
5
5
 
6
6
  [tools]
7
7
  python = "3.13"
8
- node = "24"
8
+ node = "22"
9
9
  uv = "latest"
10
10
 
11
11
  [settings]
@@ -30,7 +30,7 @@ repos:
30
30
  hooks:
31
31
  - id: ty
32
32
  name: ty type check
33
- entry: mise exec -- uv run ty check
33
+ entry: uv run ty check
34
34
  language: system
35
35
  types: [python]
36
36
  pass_filenames: false
@@ -1,30 +1,10 @@
1
- # [1.1.0-beta.21](https://github.com/n24q02m/better-mem0-mcp/compare/v1.1.0-beta.20...v1.1.0-beta.21) (2026-01-12)
1
+ ## [1.1.2](https://github.com/n24q02m/better-mem0-mcp/compare/v1.1.1...v1.1.2) (2026-01-05)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * update Node.js version to 24 in CI/CD configuration and Mise setup ([92ab0a9](https://github.com/n24q02m/better-mem0-mcp/commit/92ab0a96cd30643b9ecf927c68b46cde6472d732))
7
-
8
- # [1.1.0-beta.20](https://github.com/n24q02m/better-mem0-mcp/compare/v1.1.0-beta.19...v1.1.0-beta.20) (2026-01-05)
9
-
10
-
11
- ### Bug Fixes
12
-
13
- * correct search response parsing and improve documentation ([d4d4753](https://github.com/n24q02m/better-mem0-mcp/commit/d4d4753a7d0d3c8eb23ef15c051a7bcb1b000310))
14
-
15
- # [1.1.0-beta.19](https://github.com/n24q02m/better-mem0-mcp/compare/v1.1.0-beta.18...v1.1.0-beta.19) (2026-01-05)
16
-
17
-
18
- ### Bug Fixes
19
-
20
- * correct Mem0 API response parsing for search and get_all ([8a612b1](https://github.com/n24q02m/better-mem0-mcp/commit/8a612b1443c59c229e7583ffedced6d38f1b13d1))
21
-
22
- # [1.1.0-beta.18](https://github.com/n24q02m/better-mem0-mcp/compare/v1.1.0-beta.17...v1.1.0-beta.18) (2026-01-05)
23
-
24
-
25
- ### Bug Fixes
26
-
27
- * Add `__main__.py` entry point and update README with `better-mem0` server configuration. ([5c44f58](https://github.com/n24q02m/better-mem0-mcp/commit/5c44f58a5357c90c586009f75ddd876c45ef6f66))
6
+ * correct semantic-release outputs detection ([eecfeea](https://github.com/n24q02m/better-mem0-mcp/commit/eecfeea50c9d4a758f6810d5989ae4c1eaf1398a))
7
+ * verify ci/cd workflow changes ([dfb6480](https://github.com/n24q02m/better-mem0-mcp/commit/dfb6480f13721a04606a3246947af5fd0764cc6a))
28
8
 
29
9
  # [1.1.0-beta.17](https://github.com/n24q02m/better-mem0-mcp/compare/v1.1.0-beta.16...v1.1.0-beta.17) (2026-01-05)
30
10
 
@@ -84,8 +84,6 @@ We use [Conventional Commits](https://www.conventionalcommits.org/):
84
84
  - `perf`: Performance improvements
85
85
  - `test`: Adding or updating tests
86
86
  - `chore`: Maintenance tasks
87
- - `ci`: CI/CD changes
88
- - `build`: Build system changes
89
87
 
90
88
  ### Examples
91
89
 
@@ -95,44 +93,6 @@ fix: handle database connection timeout
95
93
  docs: update configuration examples
96
94
  ```
97
95
 
98
- ## Release Process
99
-
100
- Releases are automated using **Semantic Release**. We strictly follow the **Conventional Commits** specification to determine version bumps and generate changelogs automatically.
101
-
102
- ### How to Release
103
-
104
- 1. Create a Pull Request with your changes.
105
- 2. Ensure your commit messages follow the convention above.
106
- 3. Merge the PR to `main`.
107
- 4. The CI pipeline will automatically:
108
- - Analyze the new commits
109
- - Determine the next version number
110
- - Generate release notes
111
- - Update `CHANGELOG.md`
112
- - Publish to PyPI
113
- - Create a GitHub Release
114
- - Build and push Docker images
115
-
116
- You do **not** need to create manual tags or changelog entries.
117
-
118
- ## Pull Request Guidelines
119
-
120
- - Keep PRs focused on a single feature or fix
121
- - Update documentation if needed
122
- - Add tests for new functionality
123
- - Ensure all checks pass
124
-
125
- ### PR Checklist
126
-
127
- Before submitting your PR, ensure:
128
-
129
- - [ ] Code follows Python best practices
130
- - [ ] All tests pass (`uv run pytest`)
131
- - [ ] Linting passes (`uv run ruff check .`)
132
- - [ ] Formatting is correct (`uv run ruff format --check .`)
133
- - [ ] Commit messages follow **Conventional Commits**
134
- - [ ] Documentation updated (if needed)
135
-
136
96
  ## Code Style
137
97
 
138
98
  This project uses **Ruff** for formatting and linting.
@@ -166,15 +126,6 @@ better-mem0-mcp/
166
126
  └── README.md
167
127
  ```
168
128
 
169
- ## Questions?
170
-
171
- Feel free to open an issue for:
172
-
173
- - Bug reports
174
- - Feature requests
175
- - Questions about the codebase
176
- - Discussion about architecture
177
-
178
129
  ## License
179
130
 
180
131
  By contributing, you agree that your contributions will be licensed under the MIT License.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: better-mem0-mcp
3
- Version: 1.1.0b21
3
+ Version: 1.1.2
4
4
  Summary: Zero-setup MCP Server for AI memory - works with Neon/Supabase
5
5
  Project-URL: Homepage, https://github.com/n24q02m/better-mem0-mcp
6
6
  Project-URL: Repository, https://github.com/n24q02m/better-mem0-mcp.git
@@ -29,28 +29,16 @@ Description-Content-Type: text/markdown
29
29
 
30
30
  # better-mem0-mcp
31
31
 
32
- **Self-hosted MCP Server for AI memory with PostgreSQL (pgvector).**
32
+ **Zero-setup** MCP Server for AI memory. Works with Neon/Supabase free tier.
33
33
 
34
- [![PyPI](https://img.shields.io/pypi/v/better-mem0-mcp)](https://pypi.org/project/better-mem0-mcp/)
35
- [![Docker](https://img.shields.io/docker/v/n24q02m/better-mem0-mcp?label=docker)](https://hub.docker.com/r/n24q02m/better-mem0-mcp)
36
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
37
-
38
- ## Features
39
-
40
- - **Self-hosted PostgreSQL** - Your data stays with you (Neon/Supabase free tier supported)
41
- - **Graph Memory** - SQL-based relationship tracking alongside vector memory
42
- - **Multi-provider LLM** - Gemini, OpenAI, Anthropic, Groq, DeepSeek, Mistral
43
- - **Fallback chains** - Multi-key per provider + multi-model fallback
44
- - **Zero manual setup** - Just `DATABASE_URL` + `API_KEYS`
45
-
46
- ---
34
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
47
35
 
48
36
  ## Quick Start
49
37
 
50
38
  ### 1. Get Prerequisites
51
39
 
52
- - **Database**: [Neon](https://neon.tech) or [Supabase](https://supabase.com) (free tier works)
53
- - **API Key**: Any supported provider ([Google AI Studio](https://aistudio.google.com/apikey) is free)
40
+ - **Database**: [Neon](https://neon.tech) or [Supabase](https://supabase.com) (free tier)
41
+ - **API Key**: [Google AI Studio](https://aistudio.google.com/apikey) (free tier)
54
42
 
55
43
  ### 2. Add to mcp.json
56
44
 
@@ -59,9 +47,9 @@ Description-Content-Type: text/markdown
59
47
  ```json
60
48
  {
61
49
  "mcpServers": {
62
- "better-mem0": {
50
+ "memory": {
63
51
  "command": "uvx",
64
- "args": ["better-mem0-mcp@latest"],
52
+ "args": ["better-mem0-mcp"],
65
53
  "env": {
66
54
  "DATABASE_URL": "postgresql://user:pass@xxx.neon.tech/neondb?sslmode=require",
67
55
  "API_KEYS": "gemini:AIza..."
@@ -76,7 +64,7 @@ Description-Content-Type: text/markdown
76
64
  ```json
77
65
  {
78
66
  "mcpServers": {
79
- "better-mem0": {
67
+ "memory": {
80
68
  "command": "docker",
81
69
  "args": ["run", "-i", "--rm", "-e", "DATABASE_URL", "-e", "API_KEYS", "n24q02m/better-mem0-mcp:latest"],
82
70
  "env": {
@@ -90,7 +78,7 @@ Description-Content-Type: text/markdown
90
78
 
91
79
  ### 3. Done!
92
80
 
93
- Ask your AI: "Remember that I prefer dark mode and use FastAPI"
81
+ Ask Claude: "Remember that I prefer dark mode and use FastAPI"
94
82
 
95
83
  ---
96
84
 
@@ -98,26 +86,22 @@ Ask your AI: "Remember that I prefer dark mode and use FastAPI"
98
86
 
99
87
  | Variable | Required | Description |
100
88
  |----------|----------|-------------|
101
- | `DATABASE_URL` | Yes | PostgreSQL with pgvector extension |
102
- | `API_KEYS` | Yes | `provider:key` pairs, comma-separated |
103
- | `LLM_MODELS` | No | Model fallback chain |
104
- | `EMBEDDER_MODELS` | No | Embedding model chain |
105
-
106
- ### Supported Providers
107
-
108
- `gemini`, `openai`, `anthropic`, `groq`, `deepseek`, `mistral`
89
+ | `DATABASE_URL` | Yes | PostgreSQL connection string |
90
+ | `API_KEYS` | Yes | `provider:key,...` (multi-key per provider OK) |
91
+ | `LLM_MODELS` | No | `provider/model,...` (fallback chain) |
92
+ | `EMBEDDER_MODELS` | No | `provider/model,...` (fallback chain) |
109
93
 
110
94
  ### Examples
111
95
 
112
- **Single provider:**
113
- ```bash
96
+ **Minimal (Gemini only):**
97
+ ```
114
98
  API_KEYS=gemini:AIza...
115
99
  ```
116
100
 
117
101
  **Multi-key with fallback:**
118
- ```bash
102
+ ```
119
103
  API_KEYS=gemini:AIza-1,gemini:AIza-2,openai:sk-xxx
120
- LLM_MODELS=gemini/gemini-3-flash-preview,openai/gpt-4o-mini
104
+ LLM_MODELS=gemini/gemini-2.5-flash,openai/gpt-4o-mini
121
105
  EMBEDDER_MODELS=gemini/gemini-embedding-001,openai/text-embedding-3-small
122
106
  ```
123
107
 
@@ -125,7 +109,7 @@ EMBEDDER_MODELS=gemini/gemini-embedding-001,openai/text-embedding-3-small
125
109
 
126
110
  | Setting | Default |
127
111
  |---------|---------|
128
- | `LLM_MODELS` | `gemini/gemini-3-flash-preview` |
112
+ | `LLM_MODELS` | `gemini/gemini-2.5-flash` |
129
113
  | `EMBEDDER_MODELS` | `gemini/gemini-embedding-001` |
130
114
 
131
115
  ---
@@ -134,41 +118,32 @@ EMBEDDER_MODELS=gemini/gemini-embedding-001,openai/text-embedding-3-small
134
118
 
135
119
  | Tool | Description |
136
120
  |------|-------------|
137
- | `memory` | Memory operations: `add`, `search`, `list`, `delete` |
138
- | `help` | Get full documentation for tools |
121
+ | `memory` | `action`: add, search, list, delete |
122
+ | `help` | Detailed documentation |
139
123
 
140
- ### Usage Examples
124
+ ### Usage
141
125
 
142
126
  ```json
143
127
  {"action": "add", "content": "I prefer TypeScript over JavaScript"}
144
- {"action": "search", "query": "programming preferences"}
128
+ {"action": "search", "query": "preferences"}
145
129
  {"action": "list"}
146
130
  {"action": "delete", "memory_id": "abc123"}
147
131
  ```
148
132
 
149
133
  ---
150
134
 
151
- ## Build from Source
152
-
153
- ```bash
154
- git clone https://github.com/n24q02m/better-mem0-mcp
155
- cd better-mem0-mcp
135
+ ## Why better-mem0-mcp?
156
136
 
157
- # Setup (requires mise: https://mise.jdx.dev/)
158
- mise run setup
159
-
160
- # Run
161
- uv run better-mem0-mcp
162
- ```
163
-
164
- **Requirements:** Python 3.13+
137
+ | Feature | Official mem0-mcp | better-mem0-mcp |
138
+ |---------|-------------------|-----------------|
139
+ | Storage | Mem0 Cloud | **Self-hosted PostgreSQL** |
140
+ | Graph Memory | No | **Yes (SQL-based)** |
141
+ | LLM Provider | OpenAI only | **Any (Gemini/OpenAI/Ollama/...)** |
142
+ | Fallback | No | **Yes (multi-key + multi-model)** |
143
+ | Setup | API Key | **DATABASE_URL + API_KEYS** |
165
144
 
166
145
  ---
167
146
 
168
- ## Contributing
169
-
170
- See [CONTRIBUTING.md](CONTRIBUTING.md)
171
-
172
147
  ## License
173
148
 
174
- MIT - See [LICENSE](LICENSE)
149
+ MIT
@@ -0,0 +1,120 @@
1
+ # better-mem0-mcp
2
+
3
+ **Zero-setup** MCP Server for AI memory. Works with Neon/Supabase free tier.
4
+
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ ## Quick Start
8
+
9
+ ### 1. Get Prerequisites
10
+
11
+ - **Database**: [Neon](https://neon.tech) or [Supabase](https://supabase.com) (free tier)
12
+ - **API Key**: [Google AI Studio](https://aistudio.google.com/apikey) (free tier)
13
+
14
+ ### 2. Add to mcp.json
15
+
16
+ #### uvx (Recommended)
17
+
18
+ ```json
19
+ {
20
+ "mcpServers": {
21
+ "memory": {
22
+ "command": "uvx",
23
+ "args": ["better-mem0-mcp"],
24
+ "env": {
25
+ "DATABASE_URL": "postgresql://user:pass@xxx.neon.tech/neondb?sslmode=require",
26
+ "API_KEYS": "gemini:AIza..."
27
+ }
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ #### Docker
34
+
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "memory": {
39
+ "command": "docker",
40
+ "args": ["run", "-i", "--rm", "-e", "DATABASE_URL", "-e", "API_KEYS", "n24q02m/better-mem0-mcp:latest"],
41
+ "env": {
42
+ "DATABASE_URL": "postgresql://...",
43
+ "API_KEYS": "gemini:AIza..."
44
+ }
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ ### 3. Done!
51
+
52
+ Ask Claude: "Remember that I prefer dark mode and use FastAPI"
53
+
54
+ ---
55
+
56
+ ## Configuration
57
+
58
+ | Variable | Required | Description |
59
+ |----------|----------|-------------|
60
+ | `DATABASE_URL` | Yes | PostgreSQL connection string |
61
+ | `API_KEYS` | Yes | `provider:key,...` (multi-key per provider OK) |
62
+ | `LLM_MODELS` | No | `provider/model,...` (fallback chain) |
63
+ | `EMBEDDER_MODELS` | No | `provider/model,...` (fallback chain) |
64
+
65
+ ### Examples
66
+
67
+ **Minimal (Gemini only):**
68
+ ```
69
+ API_KEYS=gemini:AIza...
70
+ ```
71
+
72
+ **Multi-key with fallback:**
73
+ ```
74
+ API_KEYS=gemini:AIza-1,gemini:AIza-2,openai:sk-xxx
75
+ LLM_MODELS=gemini/gemini-2.5-flash,openai/gpt-4o-mini
76
+ EMBEDDER_MODELS=gemini/gemini-embedding-001,openai/text-embedding-3-small
77
+ ```
78
+
79
+ ### Defaults
80
+
81
+ | Setting | Default |
82
+ |---------|---------|
83
+ | `LLM_MODELS` | `gemini/gemini-2.5-flash` |
84
+ | `EMBEDDER_MODELS` | `gemini/gemini-embedding-001` |
85
+
86
+ ---
87
+
88
+ ## Tools
89
+
90
+ | Tool | Description |
91
+ |------|-------------|
92
+ | `memory` | `action`: add, search, list, delete |
93
+ | `help` | Detailed documentation |
94
+
95
+ ### Usage
96
+
97
+ ```json
98
+ {"action": "add", "content": "I prefer TypeScript over JavaScript"}
99
+ {"action": "search", "query": "preferences"}
100
+ {"action": "list"}
101
+ {"action": "delete", "memory_id": "abc123"}
102
+ ```
103
+
104
+ ---
105
+
106
+ ## Why better-mem0-mcp?
107
+
108
+ | Feature | Official mem0-mcp | better-mem0-mcp |
109
+ |---------|-------------------|-----------------|
110
+ | Storage | Mem0 Cloud | **Self-hosted PostgreSQL** |
111
+ | Graph Memory | No | **Yes (SQL-based)** |
112
+ | LLM Provider | OpenAI only | **Any (Gemini/OpenAI/Ollama/...)** |
113
+ | Fallback | No | **Yes (multi-key + multi-model)** |
114
+ | Setup | API Key | **DATABASE_URL + API_KEYS** |
115
+
116
+ ---
117
+
118
+ ## License
119
+
120
+ MIT
@@ -0,0 +1,27 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ | ------- | ------------------ |
7
+ | 0.x.x | :white_check_mark: |
8
+
9
+ ## Reporting a Vulnerability
10
+
11
+ If you discover a security vulnerability, please report it by:
12
+
13
+ 1. **Do NOT** create a public GitHub issue
14
+ 2. Email the maintainer directly or use GitHub's private vulnerability reporting
15
+ 3. Include detailed steps to reproduce the issue
16
+ 4. Allow reasonable time for a fix before public disclosure
17
+
18
+ We take security seriously and will respond promptly to valid reports.
19
+
20
+ ## Security Best Practices
21
+
22
+ When using better-mem0-mcp:
23
+
24
+ - **Never commit API keys** to version control
25
+ - Use environment variables or secure secret management
26
+ - Keep dependencies updated
27
+ - Use `sslmode=require` for production database connections
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "better-mem0-mcp"
3
- version = "1.1.0-beta.21"
3
+ version = "1.1.2"
4
4
  description = "Zero-setup MCP Server for AI memory - works with Neon/Supabase"
5
5
  readme = "README.md"
6
6
  license = { text = "MIT" }
@@ -17,8 +17,6 @@ Save information to long-term memory. Mem0 automatically:
17
17
  {"action": "add", "content": "User prefers dark mode and uses FastAPI"}
18
18
  ```
19
19
 
20
- **Response:** `Saved: {results: [{id, memory, event}]}`
21
-
22
20
  ### search
23
21
  Semantic search across stored memories. Combines vector search with graph context.
24
22
 
@@ -26,8 +24,6 @@ Semantic search across stored memories. Combines vector search with graph contex
26
24
  {"action": "search", "query": "coding preferences", "limit": 5}
27
25
  ```
28
26
 
29
- **Response:** Formatted list of matching memories with optional graph context.
30
-
31
27
  ### list
32
28
  Get all stored memories for a user.
33
29
 
@@ -35,8 +31,6 @@ Get all stored memories for a user.
35
31
  {"action": "list"}
36
32
  ```
37
33
 
38
- **Response:** `Memories (N): - [id] memory text`
39
-
40
34
  ### delete
41
35
  Remove a memory by ID.
42
36
 
@@ -44,17 +38,10 @@ Remove a memory by ID.
44
38
  {"action": "delete", "memory_id": "abc12345-..."}
45
39
  ```
46
40
 
47
- **Response:** `Deleted: {memory_id}`
48
-
49
41
  ## Parameters
50
42
  - `action` - Required: add, search, list, delete
51
43
  - `content` - Required for add: information to remember
52
44
  - `query` - Required for search: what to search for
53
45
  - `memory_id` - Required for delete: ID of memory to remove
54
46
  - `limit` - Optional for search: max results (default: 5)
55
- - `user_id` - Optional: scope memories to a specific user (default: "default")
56
-
57
- ## Technical Notes
58
- - Mem0 API returns `{"results": [...]}` for both `search()` and `get_all()`
59
- - Graph context is automatically included in search results when available
60
- - Embeddings use 1536 dimensions for pgvector HNSW compatibility
47
+ - `user_id` - Optional: scope memories to a specific user
@@ -108,24 +108,21 @@ async def memory(
108
108
  if not query:
109
109
  return "Error: 'query' required for search action"
110
110
 
111
- # Vector search - returns {"results": [...]} (same as get_all)
112
- response = _memory.search(query, user_id=user_id, limit=limit)
113
- memories = (
114
- response.get("results", []) if isinstance(response, dict) else response
115
- )
111
+ # Vector search
112
+ results = _memory.search(query, user_id=user_id, limit=limit)
116
113
 
117
114
  # Add graph context
118
115
  graph_context = ""
119
116
  if _graph:
120
117
  graph_context = _graph.get_context(query, user_id)
121
118
 
122
- if not memories and not graph_context:
119
+ if not results and not graph_context:
123
120
  return "No memories found."
124
121
 
125
122
  output = ""
126
- if memories:
123
+ if results:
127
124
  output = "Memories:\n" + "\n".join(
128
- [f"- {m.get('memory', str(m))}" for m in memories]
125
+ [f"- {r.get('memory', str(r))}" for r in results]
129
126
  )
130
127
  if graph_context:
131
128
  output += f"\n\n{graph_context}"
@@ -133,17 +130,13 @@ async def memory(
133
130
  return output
134
131
 
135
132
  elif action == "list":
136
- # get_all returns {"results": [...]} or list directly
137
- response = _memory.get_all(user_id=user_id)
138
- memories = (
139
- response.get("results", []) if isinstance(response, dict) else response
140
- )
133
+ results = _memory.get_all(user_id=user_id)
141
134
 
142
- if not memories:
135
+ if not results:
143
136
  return "No memories stored."
144
137
 
145
- lines = [f"- [{m['id'][:8]}] {m['memory']}" for m in memories]
146
- return f"Memories ({len(memories)}):\n" + "\n".join(lines)
138
+ lines = [f"- [{r['id'][:8]}] {r['memory']}" for r in results]
139
+ return f"Memories ({len(results)}):\n" + "\n".join(lines)
147
140
 
148
141
  elif action == "delete":
149
142
  if not memory_id:
@@ -136,7 +136,7 @@ wheels = [
136
136
 
137
137
  [[package]]
138
138
  name = "better-mem0-mcp"
139
- version = "1.1.0b18"
139
+ version = "1.1.0b15"
140
140
  source = { editable = "." }
141
141
  dependencies = [
142
142
  { name = "google-genai" },
@@ -1,82 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- - Demonstrating empathy and kindness toward other people
14
- - Being respectful of differing opinions, viewpoints, and experiences
15
- - Giving and gracefully accepting constructive feedback
16
- - Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- - Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- - The use of sexualized language or imagery, and sexual attention or advances of any kind
22
- - Trolling, insulting or derogatory comments, and personal or political attacks
23
- - Public or private harassment
24
- - Publishing others' private information, such as a physical or email address, without their explicit permission
25
- - Other conduct which could reasonably be considered inappropriate in a professional setting
26
-
27
- ## Enforcement Responsibilities
28
-
29
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30
-
31
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32
-
33
- ## Scope
34
-
35
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36
-
37
- ## Enforcement
38
-
39
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at quangminh2402.dev@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
40
-
41
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42
-
43
- ## Enforcement Guidelines
44
-
45
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46
-
47
- ### 1. Correction
48
-
49
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50
-
51
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52
-
53
- ### 2. Warning
54
-
55
- **Community Impact**: A violation through a single incident or series of actions.
56
-
57
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58
-
59
- ### 3. Temporary Ban
60
-
61
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62
-
63
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64
-
65
- ### 4. Permanent Ban
66
-
67
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68
-
69
- **Consequence**: A permanent ban from any sort of public interaction within the community.
70
-
71
- ## Attribution
72
-
73
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
74
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
75
-
76
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
77
-
78
- [homepage]: https://www.contributor-covenant.org
79
-
80
- For answers to common questions about this code of conduct, see the FAQ at
81
- https://www.contributor-covenant.org/faq. Translations are available at
82
- https://www.contributor-covenant.org/translations.
@@ -1,145 +0,0 @@
1
- # better-mem0-mcp
2
-
3
- **Self-hosted MCP Server for AI memory with PostgreSQL (pgvector).**
4
-
5
- [![PyPI](https://img.shields.io/pypi/v/better-mem0-mcp)](https://pypi.org/project/better-mem0-mcp/)
6
- [![Docker](https://img.shields.io/docker/v/n24q02m/better-mem0-mcp?label=docker)](https://hub.docker.com/r/n24q02m/better-mem0-mcp)
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
8
-
9
- ## Features
10
-
11
- - **Self-hosted PostgreSQL** - Your data stays with you (Neon/Supabase free tier supported)
12
- - **Graph Memory** - SQL-based relationship tracking alongside vector memory
13
- - **Multi-provider LLM** - Gemini, OpenAI, Anthropic, Groq, DeepSeek, Mistral
14
- - **Fallback chains** - Multi-key per provider + multi-model fallback
15
- - **Zero manual setup** - Just `DATABASE_URL` + `API_KEYS`
16
-
17
- ---
18
-
19
- ## Quick Start
20
-
21
- ### 1. Get Prerequisites
22
-
23
- - **Database**: [Neon](https://neon.tech) or [Supabase](https://supabase.com) (free tier works)
24
- - **API Key**: Any supported provider ([Google AI Studio](https://aistudio.google.com/apikey) is free)
25
-
26
- ### 2. Add to mcp.json
27
-
28
- #### uvx (Recommended)
29
-
30
- ```json
31
- {
32
- "mcpServers": {
33
- "better-mem0": {
34
- "command": "uvx",
35
- "args": ["better-mem0-mcp@latest"],
36
- "env": {
37
- "DATABASE_URL": "postgresql://user:pass@xxx.neon.tech/neondb?sslmode=require",
38
- "API_KEYS": "gemini:AIza..."
39
- }
40
- }
41
- }
42
- }
43
- ```
44
-
45
- #### Docker
46
-
47
- ```json
48
- {
49
- "mcpServers": {
50
- "better-mem0": {
51
- "command": "docker",
52
- "args": ["run", "-i", "--rm", "-e", "DATABASE_URL", "-e", "API_KEYS", "n24q02m/better-mem0-mcp:latest"],
53
- "env": {
54
- "DATABASE_URL": "postgresql://...",
55
- "API_KEYS": "gemini:AIza..."
56
- }
57
- }
58
- }
59
- }
60
- ```
61
-
62
- ### 3. Done!
63
-
64
- Ask your AI: "Remember that I prefer dark mode and use FastAPI"
65
-
66
- ---
67
-
68
- ## Configuration
69
-
70
- | Variable | Required | Description |
71
- |----------|----------|-------------|
72
- | `DATABASE_URL` | Yes | PostgreSQL with pgvector extension |
73
- | `API_KEYS` | Yes | `provider:key` pairs, comma-separated |
74
- | `LLM_MODELS` | No | Model fallback chain |
75
- | `EMBEDDER_MODELS` | No | Embedding model chain |
76
-
77
- ### Supported Providers
78
-
79
- `gemini`, `openai`, `anthropic`, `groq`, `deepseek`, `mistral`
80
-
81
- ### Examples
82
-
83
- **Single provider:**
84
- ```bash
85
- API_KEYS=gemini:AIza...
86
- ```
87
-
88
- **Multi-key with fallback:**
89
- ```bash
90
- API_KEYS=gemini:AIza-1,gemini:AIza-2,openai:sk-xxx
91
- LLM_MODELS=gemini/gemini-3-flash-preview,openai/gpt-4o-mini
92
- EMBEDDER_MODELS=gemini/gemini-embedding-001,openai/text-embedding-3-small
93
- ```
94
-
95
- ### Defaults
96
-
97
- | Setting | Default |
98
- |---------|---------|
99
- | `LLM_MODELS` | `gemini/gemini-3-flash-preview` |
100
- | `EMBEDDER_MODELS` | `gemini/gemini-embedding-001` |
101
-
102
- ---
103
-
104
- ## Tools
105
-
106
- | Tool | Description |
107
- |------|-------------|
108
- | `memory` | Memory operations: `add`, `search`, `list`, `delete` |
109
- | `help` | Get full documentation for tools |
110
-
111
- ### Usage Examples
112
-
113
- ```json
114
- {"action": "add", "content": "I prefer TypeScript over JavaScript"}
115
- {"action": "search", "query": "programming preferences"}
116
- {"action": "list"}
117
- {"action": "delete", "memory_id": "abc123"}
118
- ```
119
-
120
- ---
121
-
122
- ## Build from Source
123
-
124
- ```bash
125
- git clone https://github.com/n24q02m/better-mem0-mcp
126
- cd better-mem0-mcp
127
-
128
- # Setup (requires mise: https://mise.jdx.dev/)
129
- mise run setup
130
-
131
- # Run
132
- uv run better-mem0-mcp
133
- ```
134
-
135
- **Requirements:** Python 3.13+
136
-
137
- ---
138
-
139
- ## Contributing
140
-
141
- See [CONTRIBUTING.md](CONTRIBUTING.md)
142
-
143
- ## License
144
-
145
- MIT - See [LICENSE](LICENSE)
@@ -1,32 +0,0 @@
1
- # Security Policy
2
-
3
- ## Supported Versions
4
-
5
- | Version | Supported |
6
- | ------- | ------------------ |
7
- | 1.x.x | :white_check_mark: |
8
- | < 1.0 | :x: |
9
-
10
- ## Reporting a Vulnerability
11
-
12
- If you discover a security vulnerability, please **DO NOT** create a public issue.
13
-
14
- Instead, please email: **quangminh2402.dev@gmail.com**
15
-
16
- Include:
17
-
18
- 1. Detailed description of the vulnerability
19
- 2. Steps to reproduce
20
- 3. Potential impact
21
- 4. Suggested fix (if any)
22
-
23
- You will receive acknowledgment within 48 hours.
24
-
25
- ## Security Best Practices
26
-
27
- When using better-mem0-mcp:
28
-
29
- - **Never commit API keys** to version control
30
- - Use environment variables or secure secret management
31
- - Keep dependencies updated
32
- - Use `sslmode=require` for production database connections
@@ -1,6 +0,0 @@
1
- """Entry point for `python -m better_mem0_mcp`."""
2
-
3
- from .server import main
4
-
5
- if __name__ == "__main__":
6
- main()