Pre-submission checklist | 提交前检查
Bug Description | 问题描述
The MCP server example (examples/mem_mcp/simple_fastmcp_serve.py) passes memory_content as a plain string to the messages field in the /product/add API payload:
payload = {
"user_id": user_id,
"messages": memory_content, # plain string
}
The /product/add endpoint expects messages to be a list of chat message objects. When a plain string is passed, the SimpleStruct MemReader silently skips it — no error is raised, the API returns success, but no memory is actually stored.
How to Reproduce | 如何重现
- Start the MCP server with
simple_fastmcp_serve.py
- Call the
add_memory tool with any content
- API returns success
- Call
search_memories — nothing is found
Environment | 环境信息
- Python version: 3.11
- Operating System: Linux (Raspberry Pi / aarch64)
- MemOS version: v2.0.8 (also present in v2.0.9 — file unchanged)
- Deployment: Docker
Additional Context | 其他信息
Fix is a one-line change — wrap the content as a chat message object:
"messages": [{"role": "user", "content": memory_content}]
PR: #1275
Willingness to Implement | 实现意愿
Pre-submission checklist | 提交前检查
Bug Description | 问题描述
The MCP server example (
examples/mem_mcp/simple_fastmcp_serve.py) passesmemory_contentas a plain string to themessagesfield in the/product/addAPI payload:The
/product/addendpoint expectsmessagesto be a list of chat message objects. When a plain string is passed, theSimpleStructMemReader silently skips it — no error is raised, the API returns success, but no memory is actually stored.How to Reproduce | 如何重现
simple_fastmcp_serve.pyadd_memorytool with any contentsearch_memories— nothing is foundEnvironment | 环境信息
Additional Context | 其他信息
Fix is a one-line change — wrap the content as a chat message object:
PR: #1275
Willingness to Implement | 实现意愿