MCP Memory Tools and CLI Use Separate Backends - Data Not Synced
Description
In v3.0.0-alpha.125, the MCP memory tools and CLI memory commands use completely separate storage backends that don't synchronize:
- CLI uses SQLite database at
.swarm/memory.db
- MCP tools use JSON file at
.claude-flow/memory/store.json
This causes MCP memory operations to always show 0 entries while CLI shows correct data.
Steps to Reproduce
- Install claude-flow v3.0.0-alpha.125
- Add MCP server:
claude mcp add claude-flow -- bunx -y @claude-flow/cli@latest
- Store data via CLI:
bunx @claude-flow/cli@latest memory store --key "test" --value "hello" --namespace default
- Verify CLI shows the entry:
bunx @claude-flow/cli@latest memory list
# Shows 1+ entries
- Use MCP tool to list memory:
mcp__claude-flow__memory_list
# Shows 0 entries
Expected Behavior
MCP memory tools should see the same data as CLI memory commands. Both should use the same storage backend.
Actual Behavior
- CLI stores to
.swarm/memory.db (SQLite) - works correctly
- MCP tools read from
.claude-flow/memory/store.json (JSON) - always empty
- No synchronization between backends
Evidence
Source code analysis of memory-tools.js:
const MEMORY_DIR = '.claude-flow/memory';
const MEMORY_FILE = 'store.json';
function getMemoryPath() {
return resolve(join(MEMORY_DIR, MEMORY_FILE));
}
Meanwhile, the CLI uses a different path with SQLite via the memory service.
Environment
- claude-flow version: 3.0.0-alpha.125
- Installation:
bunx @claude-flow/cli@latest
- OS: Linux (WSL2)
- Node: 22.x
- Bun: 1.x
Related Issues
Workaround
Currently using CLI via Bash instead of MCP tools for memory operations:
bunx @claude-flow/cli@latest memory search --query "pattern"
bunx @claude-flow/cli@latest memory store --key "k" --value "v"
Suggested Fix
Either:
- Unify both backends to use SQLite (recommended for persistence and performance)
- Add synchronization layer between backends
- Have MCP tools call CLI internally for consistency
Impact
This breaks the MCP integration for Claude Code users who rely on MCP tools for memory operations. The memory system is a core feature for cross-session learning and agent coordination.
MCP Memory Tools and CLI Use Separate Backends - Data Not Synced
Description
In v3.0.0-alpha.125, the MCP memory tools and CLI memory commands use completely separate storage backends that don't synchronize:
.swarm/memory.db.claude-flow/memory/store.jsonThis causes MCP memory operations to always show 0 entries while CLI shows correct data.
Steps to Reproduce
claude mcp add claude-flow -- bunx -y @claude-flow/cli@latestbunx @claude-flow/cli@latest memory list # Shows 1+ entriesExpected Behavior
MCP memory tools should see the same data as CLI memory commands. Both should use the same storage backend.
Actual Behavior
.swarm/memory.db(SQLite) - works correctly.claude-flow/memory/store.json(JSON) - always emptyEvidence
Source code analysis of
memory-tools.js:Meanwhile, the CLI uses a different path with SQLite via the memory service.
Environment
bunx @claude-flow/cli@latestRelated Issues
Workaround
Currently using CLI via Bash instead of MCP tools for memory operations:
Suggested Fix
Either:
Impact
This breaks the MCP integration for Claude Code users who rely on MCP tools for memory operations. The memory system is a core feature for cross-session learning and agent coordination.