# DeepMem [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/deepmemteam/deepmem  
**GitHub Stars:** 113  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/deepmem

## Description
Mem0-compatible persistent memory for AI agents: write facts once, recall them semantically.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "deepmem": {
    "command": "uvx",
    "args": ["deepmem-client"],
    "env": {
      "DEEPMEM_API_KEY": "",
      "DEEPSEEK_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `DEEPMEM_API_KEY`, `DEEPSEEK_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What DeepMem MCP server does

The DeepMem MCP server provides persistent memory for AI agents. It accepts conversation content, extracts durable facts, stores them in a searchable memory system, and retrieves relevant information later. The project also exposes a Mem0-compatible HTTP API, so applications using the `MemoryClient` pattern can migrate by changing the client import rather than rewriting method calls.

Memory is scoped with `user_id`, which supports isolation between users or agent identities. The system is intended for preferences, identity details, project context, research findings, debugging history, and other facts that should survive individual conversations. It is not designed as a knowledge graph: graph relations are not replicated, and relation results remain empty.

## How it works

A FastAPI HTTP layer sits in front of Qdrant, which stores the vector-based memory data. LLM-based fact extraction turns incoming messages into durable memories. Retrieval combines vector similarity with BM25 keyword matching, entity boosting, and time decay rather than relying on a single embedding score.

By default, inferred additions can be processed asynchronously. The cloud client may return a pending result before extracted facts are available. Using `infer=False` stores raw text synchronously and makes it immediately searchable.

The DeepMem MCP server allows MCP clients such as Claude Desktop and Cursor to read and write memories directly. Self-hosted deployments run the HTTP API on port 8000 and the MCP service on port 8001, alongside a Qdrant sidecar in the documented Docker Compose setup.

## Setup and configuration

DeepMem can be used through the managed service at `deepmem.dev` or run locally. Cloud access uses a `dm_live_...` API key and the DeepMem base URL. The Python client is installed with `pip install deepmem-client` and follows the Mem0 `MemoryClient` interface.

For local deployment, the documented path is Docker Compose:

- Copy `.env.example` to `.env`.
- Add an LLM provider key.
- Run `docker compose up --build`.
- Check the HTTP service at `http://localhost:8000/health`.

The published Docker image is `langdeepmem/deepmem:latest`. A direct Docker run publishes ports 8000 and 8001 and passes an LLM key through the environment. The project supports bring-your-own LLM and embedding providers, including OpenAI, Anthropic, OpenAI-compatible endpoints, BGE-M3, Google, and OpenAI-compatible embedding services.

## Tools and capabilities

- Write conversation-derived memories.
- Search memories semantically and by keyword.
- Read and write memories through MCP clients.
- Isolate memory using `user_id`.
- Apply asynchronous fact extraction and batched distillation.
- Use GDPR controls and semantic caching.

## Limitations and notes

The DeepMem MCP server stores extracted preferences and facts rather than complete code dumps; large fenced code blocks are removed before extraction. Retrieval is hybrid, not graph-based, so applications requiring temporal graph relations should use a different system. Reset behavior is scoped to a `user_id` and includes a confirmation guard, unlike the account-wide behavior described for Mem0.

Self-hosting requires managing the service, Qdrant, and the chosen LLM or embedding providers. Open mode does not require an API key or user registration for a local deployment, while DeepMem Cloud requires its API key. Cloud inference may be asynchronous, so clients should account for pending results when using the default extraction behavior.

_Full upstream README: https://allmcps.com/mcp/deepmem/readme_

