# OpenMem

> OpenMem is an open-source MCP server for knowledge and memory. One set of memory tools for coding agents over Hindsight, mem0 or Cognee. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/bcmyguest/openmem
- **MCP Registry name:** io.github.bcmyguest/openmem
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

OpenMem puts a stable set of memory_* tools in front of whichever memory backend you run, so an agent keeps the same interface if you switch provider. Hindsight is the default, with mem0 and Cognee as alternatives chosen through MEMORY_PROVIDER. Switching does not move data by itself; export and import, or re-indexing, carries content across, and the export format is called PMM.

An indexer polls Git repositories and watches folders, feeding docs, code outlines, Obsidian vaults, notes, papers, bookmarks, RSS and OpenAlex feeds into the active provider. Session hooks for Claude Code, Codex, Cursor and OpenCode recall memory at the start of a session and retain it at the end. A setup wizard, a doctor command and an install-coding-agent command handle the rest.

The stack runs under Docker Compose v2 and needs Node 24 or newer plus an LLM route for Hindsight. A notice in the README says the older context-management pieces (smart compaction, the LiteLLM context proxy, the OpenCode trim plugin) are deprecated here and have moved to a separate project, Smarter Compact; OpenMem is now for memory.

## Features

- **Swappable providers:** Runs the same memory tools over Hindsight, mem0 or Cognee.
- **Source indexer:** Polls repos and watches folders, vaults and feeds to build memory.
- **Session hooks:** Recalls memory when a coding session starts and retains it when it stops.
- **Portable export:** memory_export and memory_import use the PMM format to move content between providers.
- **Setup wizard and doctor:** Plans first-time setup with a dry run and checks the stack afterwards.

## Good for

- Give a coding agent persistent project knowledge
- Index an Obsidian vault or notes folder for agent recall
- Try mem0 or Cognee without changing agent configuration
- Move memory content between providers

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add openmem -- npx -y @bcmyguest/openmem
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "openmem": {
      "command": "npx",
      "args": [
        "-y",
        "@bcmyguest/openmem"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "openmem": {
      "command": "npx",
      "args": [
        "-y",
        "@bcmyguest/openmem"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "openmem": {
      "command": "npx",
      "args": [
        "-y",
        "@bcmyguest/openmem"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "openmem": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@bcmyguest/openmem"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add openmem -- npx -y @bcmyguest/openmem
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.openmem]
command = "npx"
args = ["-y", "@bcmyguest/openmem"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "openmem": {
      "command": "npx",
      "args": [
        "-y",
        "@bcmyguest/openmem"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user openmem npx -- -y @bcmyguest/openmem

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "openmem": {
      "command": "npx",
      "args": [
        "-y",
        "@bcmyguest/openmem"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "openmem": {
      "command": "npx",
      "args": [
        "-y",
        "@bcmyguest/openmem"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "openmem": {
      "command": "npx",
      "args": [
        "-y",
        "@bcmyguest/openmem"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "openmem": {
      "command": "npx",
      "args": [
        "-y",
        "@bcmyguest/openmem"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "openmem": {
      "command": "npx",
      "args": [
        "-y",
        "@bcmyguest/openmem"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "openmem": {
      "command": "npx",
      "args": [
        "-y",
        "@bcmyguest/openmem"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "openmem": {
      "command": "npx",
      "args": [
        "-y",
        "@bcmyguest/openmem"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "openmem": {
      "command": "npx",
      "args": [
        "-y",
        "@bcmyguest/openmem"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 6 tools changes data; 3 names don't say. From the server's own tool labels and tool names; not verified by us.

- `memory_recall`: Recalls stored memory.
- `memory_add` (name suggests: changes): Adds to memory.
- `memory_search` (name suggests: reads): Searches memory.
- `memory_reflect`: Synthesises across stored memory.
- `memory_export` (name suggests: reads): Exports memory in the portable PMM format.
- `memory_import`: Imports memory from a PMM export.

## FAQ

### What does OpenMem require?

Docker Compose v2, Node 24 or newer, and an LLM route for Hindsight.

### Which providers are supported?

Hindsight (default), mem0 and Cognee, selected with MEMORY_PROVIDER.

### Which coding agents are covered?

Claude Code, Codex, Cursor and OpenCode.

### Does switching providers migrate my data?

No. Use memory export and import, or re-index the sources.

### What happened to context management?

It is deprecated in OpenMem and moved to Smarter Compact.

### Is OpenMem free?

Yes. OpenMem is open source, so you can use and self-host it for free.

### How do I add OpenMem to Claude Code?

Run this command in your terminal: claude mcp add openmem -- npx -y @bcmyguest/openmem

### What are the best alternatives to OpenMem?

The closest alternatives to OpenMem are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/openmem
