In-depth architectural comparison of the Mem0 MCP Selfhosted and Codebase Memory MCP MCP servers. Compare execution transports, security boundaries, tool capabilities, quality scores, and ready-to-paste client installation snippets for Claude, Cursor, Windsurf, and VS Code.
At a Glance & Executive Verdict
Mem0 MCP Selfhosted
Knowledge & Memory · Local stdio
Quality: 57/100 (Good) | Auth: other
Codebase Memory MCP
Knowledge & Memory · Local stdio
Quality: 72/100 (Great) | Auth: No auth required
Verdict Summary: Choose Mem0 MCP Selfhosted if you need specialized Knowledge & Memory tools running via a local process. Choose Codebase Memory MCP if your workspace requires Knowledge & Memory integration with local subprocess execution. Both servers can be configured concurrently in your client's mcpServers manifest.
Which MCP Server Should You Choose?
Choose Mem0 MCP Selfhosted when:
You need dedicated capabilities in the Knowledge & Memory domain.
You prefer local stdio subprocess transport architecture.
Your security boundary fits: other (Free / Open Source).
Self-hosted mem0 MCP server for Claude Code with Qdrant vector search, Neo4j knowledge graph, and Ollama embeddings. Zero-config OAT auth, split-model graph routing, session hooks for automatic cross-session memory, and 11 tools. Supports both Anthropic and fully local Ollama setups.
Code-intelligence engine that indexes a repo into a persistent knowledge graph — functions, classes, call chains, HTTP routes, cross-service links. 159 languages via tree-sitter + Hybrid LSP, sub-ms structural queries, 99% fewer tokens than grep. Single static binary, zero dependencies, 100% local. npx codebase-memory-mcp
Tools & Capabilities Breakdown
Mem0 MCP Selfhosted Tools (11)
add_memory
Store text or conversation history as memories. Supports `enable_graph`, `infer`, `metadata`.
search_memories
Semantic search with optional `filters`, `threshold`, `rerank`, `enable_graph`.
get_memories
List/filter memories (non-search). Supports `limit` and scope filters.
get_memory
Fetch a single memory by UUID.
update_memory
Replace memory text. Re-embeds and re-indexes in Qdrant.
delete_memory
Ready-to-Paste Client Configurations
Paste either (or both) of these JSON server blocks into your client config file (e.g. claude_desktop_config.json or ~/.cursor/mcp.json).
Mem0 MCP Selfhosted is categorized under Knowledge & Memory and uses a local stdio subprocess. In contrast, Codebase Memory MCP belongs to Knowledge & Memory using local stdio subprocess. Select Mem0 MCP Selfhosted when you need capabilities focused on knowledge & memory and Codebase Memory MCP when you require tools for knowledge & memory.
List users/agents/runs with memory counts. Uses Qdrant Facet API.
delete_entities
Cascade-delete an entity and all its memories.
search_graph
Search Neo4j entities by name substring. Returns entities + outgoing relationships.
get_entity
Get all relationships for an entity (bidirectional: incoming + outgoing).
Codebase Memory MCP Tools (14)
index_repository
Index a repository into the graph. Auto-sync keeps it fresh after that.
list_projects
List all indexed projects with node/edge counts.
delete_project
Remove a project and all its graph data.
index_status
Check indexing status of a project.
search_graph
Structural, BM25, and semantic search. Page structural rows with `offset`/`limit` and ranked semantic rows independently with `semantic_offset`/`semantic_limit`.
trace_path
BFS traversal — who calls a function and what it calls (alias: `trace_call_path`). Depth 1-5.
detect_changes
Map git diff to affected symbols + blast radius with risk classification.
query_graph
Execute Cypher-like graph queries (read-only).
get_graph_schema
Node/edge counts, relationship patterns, property definitions per label. Run this first.
get_code_snippet
Read source code for a function by qualified name.