# Sessionmem

> Sessionmem is an open-source MCP server for agent memory. Local-first project memory that carries decisions and warnings across AI coding sessions. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, Windows, Self-hosted
- **Repository:** https://github.com/catfish-1234/sessionmem
- **MCP Registry name:** io.github.catfish-1234/sessionmem
- **Categories:** [agent memory](https://ai-powered.com/categories/agent-memory)
- **Listing updated:** 2026-11-27

## About

Sessionmem gives coding assistants a memory of past work. Decisions, warnings and project facts are stored in a single SQLite file on the developer's machine, then loaded back at the start of a later session so the assistant does not need the setup explained again.

It runs as a stdio MCP server. In Claude Code, lifecycle hooks capture tool events and summarize them at session end. For Codex and Cursor, a background watcher imports transcript history, while other MCP hosts rely on the tools and instructions the installer writes. Retrieval uses BM25 ranking with entity overlap, optional recency and importance weighting, and a fixed token budget, and it can make offline calls only.

It suits developers who work across several AI coding tools and want their project context kept private, inspectable and under their own control. Secrets are redacted before saving, old memories are pruned by a configurable retention window, and teams can share memories through a folder they already manage.

## Features

- **Cross-session memory:** Stores decisions, warnings and facts so a new session starts with relevant prior context.
- **Local SQLite storage:** All memories live in one inspectable file on the computer, with no account required.
- **Secret redaction:** Common credential formats are scrubbed before memories are written, using best-effort pattern matching.
- **Automatic transcript capture:** A login-started watcher imports Claude Code, Codex CLI and Cursor history without API keys.
- **Retention and supersession:** Old memories are pruned by a configurable window, and replaced facts can be linked to their successors.
- **Optional team sharing:** Memories can be synced through a shared folder such as a network drive, with no server needed.

## Good for

- Resuming a multi-day refactor without re-explaining the stack and open decisions
- Keeping track of known bugs and fixes across repeated coding sessions
- Sharing project decisions between teammates who use different AI coding assistants
- Recording preferences or constraints by hand so an agent keeps them in later sessions

## Install

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

```sh
claude mcp add sessionmem -- npx -y sessionmem
```

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": {
    "sessionmem": {
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "sessionmem": {
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "sessionmem": {
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "sessionmem": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
```

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 sessionmem -- npx -y sessionmem
```

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

```toml
[mcp_servers.sessionmem]
command = "npx"
args = ["-y", "sessionmem"]
```

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

```json
{
  "mcpServers": {
    "sessionmem": {
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user sessionmem npx -- -y sessionmem

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

```json
{
  "mcpServers": {
    "sessionmem": {
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "sessionmem": {
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
```

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": {
    "sessionmem": {
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
```

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

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "sessionmem": {
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
```

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": {
    "sessionmem": {
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "sessionmem": {
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "sessionmem": {
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
```

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": {
    "sessionmem": {
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
```

## FAQ

### Does sessionmem need an account or send data to the cloud?

No account is needed and storage and retrieval run locally by default. Data leaves the machine only if sharing or cloud summarization is enabled, and cloud summarization is off by default.

### Which AI tools does Sessionmem work with?

Claude Code, Cursor, Codex, Cline and Windsurf are named, along with Antigravity and QCoder, and any other MCP-compatible host can use its tools. Automatic capture is available for Claude Code, Codex and Cursor.

### What do I need to install Sessionmem?

Node.js 22.13 or newer. The package is installed with npm install -g sessionmem, then sessionmem install is run in the project folder.

### Is sessionmem open source?

The package is distributed under the MIT license, as stated in the repository.

### Is Sessionmem free?

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

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

Run this command in your terminal: claude mcp add sessionmem -- npx -y sessionmem

### What are the best alternatives to Sessionmem?

The closest alternatives to Sessionmem are Memoria, memry, Memstack, Memorinth and Memoire.

## Where this comes from

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

## Alternatives

- [Memoria](https://ai-powered.com/mcp/memoria-2): Memoria is an open-source MCP server for knowledge and memory.
- [memry](https://ai-powered.com/mcp/memry): memry is an MCP server for developer tools.
- [Memstack](https://ai-powered.com/mcp/memstack): Memstack is an open-source MCP server for knowledge and memory.
- [Memorinth](https://ai-powered.com/mcp/memorinth): Memorinth is a free MCP server for knowledge and memory.
- [Memoire](https://ai-powered.com/mcp/memoire-2): Memoire is an open-source MCP server for knowledge and memory.
- [Memex](https://ai-powered.com/mcp/memex-5): Memex is an open-source MCP server for ai models and llm tooling.
- [Nan Forget](https://ai-powered.com/mcp/nan-forget): Nan Forget is an open-source MCP server for knowledge and memory.
- [Heirmos](https://ai-powered.com/mcp/heirmos): Heirmos is a free MCP server for knowledge and memory.

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