doobidoo/mcp-memory-service

Open-source persistent memory for AI agent pipelines (LangGraph, CrewAI, AutoGen) and Claude. REST API + knowledge graph + autonomous consolidation.

What it solves

AI assistants forget everything when a new chat starts, forcing users to re-explain context each time. This project provides a persistent, shared memory backend so agents can store decisions, causal knowledge graphs, and project context, then retrieve it in about 5 milliseconds—without cloud lock-in or per-API costs. It replaces scattered setups of Redis, Pinecone, and glue code with a single self-hosted service.

How it works

The service runs as a local server (default port 8000) and exposes multiple ways to talk to it: a framework-agnostic REST API, an MCP server for terminal/IDE clients like Claude Desktop or Claude Code, and a CLI. Agents store and retrieve memories via HTTP endpoints (e.g., POST /api/memories, POST /api/search), with optional tagging through an X-Agent-ID header and bypassing deduplication via conversation_id. A knowledge graph captures typed causal relationships (causes, fixes, contradicts) between facts, and entity extraction links @mentions, #tags, URLs, and file paths. Semantic search uses local ONNX embeddings (falling back to hash embeddings if not installed) combined with BM25 keyword search, and can be ranked by recency, access frequency, and quality. Optional features include autonomous consolidation (clustering, compression, controlled forgetting), contradiction detection, belief derivation, and search summaries. Storage backends include SQLite, Cloudflare, Hybrid (local reads with background cloud sync), and Milvus (dedicated vector DB). A web dashboard at localhost:8000 provides eight tabs for browsing, managing, and visualizing memories and the knowledge graph.

Who it’s for

Developers and teams building AI agent pipelines—especially those using LangGraph, CrewAI, AutoGen, or any HTTP-based agent workflow—who want persistent, shared memory across sessions and agents. It also suits individuals using Claude Desktop, Claude Code, OpenCode, Codex, or browser-based ChatGPT/claude.ai (via Remote MCP over HTTPS) who want to keep context without cloud dependency.

Highlights

  • One service with four transport options: REST API, MCP, OAuth, CLI, plus a web dashboard
  • Knowledge graph with typed causal edges and entity extraction
  • Semantic + keyword search with ranked mode and optional summarization
  • Local-first by default: ONNX embeddings and SQLite keep data on your infrastructure
  • Hybrid backend for 5ms local reads with background cloud sync (Cloudflare or another instance)
  • Works with many tools: Claude Desktop, Claude Code, Gemini CLI, OpenCode, Codex, VS Code, Cursor, JetBrains, ChatGPT, claude.ai, and more
  • Autonomous consolidation, contradiction handling, and agent bootstrap profiles
  • Import/export JSON including mem0 migration, plus scheduled backups
  • Easy setup: pip install and configure your client in under 60 seconds

Related

  • Project
  • Project
  • Project
  • Project
  • Project