Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

improvement(OMM)- fix the sse failed to connect issue (#2696)

heng1b0d8bdd2e6e
diff --git a/openmemory/api/app/mcp_server.py b/openmemory/api/app/mcp_server.py
index e57745907..fa6863a42 100644
--- a/openmemory/api/app/mcp_server.py
+++ b/openmemory/api/app/mcp_server.py
@@ -350,7 +350,7 @@ async def handle_sse(request: Request):
client_name_var.reset(client_token)
-@mcp_router.post("/messages/")
+@mcp_router.post("/{client_name}/sse/{user_id}/messages/")
async def handle_post_message(request: Request):
"""Handle POST messages for SSE"""
try:
@@ -362,7 +362,7 @@ async def handle_post_message(request: Request):
# Create a simple send function that does nothing
async def send(message):
- pass
+ return {}
# Call handle_post_message with the correct arguments
await sse.handle_post_message(request.scope, receive, send)