better-mem0-mcp 1.1.0b18__py3-none-any.whl → 1.1.0b20__py3-none-any.whl
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.
- better_mem0_mcp/docs/memory.md +14 -1
- better_mem0_mcp/server.py +16 -9
- {better_mem0_mcp-1.1.0b18.dist-info → better_mem0_mcp-1.1.0b20.dist-info}/METADATA +1 -1
- {better_mem0_mcp-1.1.0b18.dist-info → better_mem0_mcp-1.1.0b20.dist-info}/RECORD +7 -7
- {better_mem0_mcp-1.1.0b18.dist-info → better_mem0_mcp-1.1.0b20.dist-info}/WHEEL +0 -0
- {better_mem0_mcp-1.1.0b18.dist-info → better_mem0_mcp-1.1.0b20.dist-info}/entry_points.txt +0 -0
- {better_mem0_mcp-1.1.0b18.dist-info → better_mem0_mcp-1.1.0b20.dist-info}/licenses/LICENSE +0 -0
better_mem0_mcp/docs/memory.md
CHANGED
|
@@ -17,6 +17,8 @@ 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
|
+
|
|
20
22
|
### search
|
|
21
23
|
Semantic search across stored memories. Combines vector search with graph context.
|
|
22
24
|
|
|
@@ -24,6 +26,8 @@ Semantic search across stored memories. Combines vector search with graph contex
|
|
|
24
26
|
{"action": "search", "query": "coding preferences", "limit": 5}
|
|
25
27
|
```
|
|
26
28
|
|
|
29
|
+
**Response:** Formatted list of matching memories with optional graph context.
|
|
30
|
+
|
|
27
31
|
### list
|
|
28
32
|
Get all stored memories for a user.
|
|
29
33
|
|
|
@@ -31,6 +35,8 @@ Get all stored memories for a user.
|
|
|
31
35
|
{"action": "list"}
|
|
32
36
|
```
|
|
33
37
|
|
|
38
|
+
**Response:** `Memories (N): - [id] memory text`
|
|
39
|
+
|
|
34
40
|
### delete
|
|
35
41
|
Remove a memory by ID.
|
|
36
42
|
|
|
@@ -38,10 +44,17 @@ Remove a memory by ID.
|
|
|
38
44
|
{"action": "delete", "memory_id": "abc12345-..."}
|
|
39
45
|
```
|
|
40
46
|
|
|
47
|
+
**Response:** `Deleted: {memory_id}`
|
|
48
|
+
|
|
41
49
|
## Parameters
|
|
42
50
|
- `action` - Required: add, search, list, delete
|
|
43
51
|
- `content` - Required for add: information to remember
|
|
44
52
|
- `query` - Required for search: what to search for
|
|
45
53
|
- `memory_id` - Required for delete: ID of memory to remove
|
|
46
54
|
- `limit` - Optional for search: max results (default: 5)
|
|
47
|
-
- `user_id` - Optional: scope memories to a specific user
|
|
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
|
better_mem0_mcp/server.py
CHANGED
|
@@ -108,21 +108,24 @@ async def memory(
|
|
|
108
108
|
if not query:
|
|
109
109
|
return "Error: 'query' required for search action"
|
|
110
110
|
|
|
111
|
-
# Vector search
|
|
112
|
-
|
|
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
|
+
)
|
|
113
116
|
|
|
114
117
|
# Add graph context
|
|
115
118
|
graph_context = ""
|
|
116
119
|
if _graph:
|
|
117
120
|
graph_context = _graph.get_context(query, user_id)
|
|
118
121
|
|
|
119
|
-
if not
|
|
122
|
+
if not memories and not graph_context:
|
|
120
123
|
return "No memories found."
|
|
121
124
|
|
|
122
125
|
output = ""
|
|
123
|
-
if
|
|
126
|
+
if memories:
|
|
124
127
|
output = "Memories:\n" + "\n".join(
|
|
125
|
-
[f"- {
|
|
128
|
+
[f"- {m.get('memory', str(m))}" for m in memories]
|
|
126
129
|
)
|
|
127
130
|
if graph_context:
|
|
128
131
|
output += f"\n\n{graph_context}"
|
|
@@ -130,13 +133,17 @@ async def memory(
|
|
|
130
133
|
return output
|
|
131
134
|
|
|
132
135
|
elif action == "list":
|
|
133
|
-
results
|
|
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
|
+
)
|
|
134
141
|
|
|
135
|
-
if not
|
|
142
|
+
if not memories:
|
|
136
143
|
return "No memories stored."
|
|
137
144
|
|
|
138
|
-
lines = [f"- [{
|
|
139
|
-
return f"Memories ({len(
|
|
145
|
+
lines = [f"- [{m['id'][:8]}] {m['memory']}" for m in memories]
|
|
146
|
+
return f"Memories ({len(memories)}):\n" + "\n".join(lines)
|
|
140
147
|
|
|
141
148
|
elif action == "delete":
|
|
142
149
|
if not memory_id:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: better-mem0-mcp
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.0b20
|
|
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
|
|
@@ -3,10 +3,10 @@ better_mem0_mcp/__main__.py,sha256=IeeRidmZF4oBaamjQM6FUbhXpsSdE4sQF_6y_D2GEE4,1
|
|
|
3
3
|
better_mem0_mcp/config.py,sha256=vgKLIw3jHyeBLTzzBnuHV5x6Nra0Rbav1IJRL8rLCuk,5576
|
|
4
4
|
better_mem0_mcp/graph.py,sha256=rE9z6XECiAktEqDNgmwqCpFpvKSn3azO9H4sRBhj8UU,6195
|
|
5
5
|
better_mem0_mcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
better_mem0_mcp/server.py,sha256=
|
|
7
|
-
better_mem0_mcp/docs/memory.md,sha256=
|
|
8
|
-
better_mem0_mcp-1.1.
|
|
9
|
-
better_mem0_mcp-1.1.
|
|
10
|
-
better_mem0_mcp-1.1.
|
|
11
|
-
better_mem0_mcp-1.1.
|
|
12
|
-
better_mem0_mcp-1.1.
|
|
6
|
+
better_mem0_mcp/server.py,sha256=QYLP46pz0U9gkxQKB_g8FMga77ywElMMjSCU-hGZQ-M,5499
|
|
7
|
+
better_mem0_mcp/docs/memory.md,sha256=198dDuAGccG5Ca7rhEXIU03ZhxNKK44B_Brl2glurGc,1608
|
|
8
|
+
better_mem0_mcp-1.1.0b20.dist-info/METADATA,sha256=7gH4AcEC-2vrtkp1CPw2GlBIboRhfnWW0_mS7aw0DPU,3891
|
|
9
|
+
better_mem0_mcp-1.1.0b20.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
10
|
+
better_mem0_mcp-1.1.0b20.dist-info/entry_points.txt,sha256=2b7E3D6yo94mQXP2Ms0bhUlWkK9f664f0GrstImOq30,57
|
|
11
|
+
better_mem0_mcp-1.1.0b20.dist-info/licenses/LICENSE,sha256=d7xQ6sRyeGus6gnvwgqiQtSY7XdFw0Jd0w5-Co_xHnk,1064
|
|
12
|
+
better_mem0_mcp-1.1.0b20.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|