Skip to content
MCP server

Sessionmem

Local-first project memory that carries decisions and warnings across AI coding sessions

Runs locally

Sessionmem is an open-source MCP server for agent memory. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, macOS, Linux
Runs
Locally
Version
2.3.2
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

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.

Or share it with your project

Add to .mcp.json

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

Claude Code setup guide

Add to claude_desktop_config.json

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

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

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

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

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

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.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.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add sessionmem -- npx -y sessionmem

Or add to config.toml

Add to ~/.codex/config.toml

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

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "sessionmem": {
      "command": "npx",
      "args": [
        "-y",
        "sessionmem"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

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

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

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

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

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

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.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.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

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

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

    Cline setup guide

  • Zed

    Add to Zed settings.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.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

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

    Junie

    Add to ~/.junie/mcp/mcp.json

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

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

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

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

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

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About Sessionmem

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.

What it does

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

Pricing

Open source

Free and open source under the MIT license; runs locally.

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.

How AIPoweredBot checks servers