LongMemory plugin

LongMemory keeps project memory in local SQLite and serves it to an agent over MCP: decisions, task state, skills and a code graph

  • 4,576 ★ on the repository
  • Last commit
  • Apache-2.0
Plugin

Extended access

Why this level

  • Stores project notes and code fragments in a local database
  • In HTTP mode without a key any process on the machine can read memory
All reasons and checks

caviraoss/longmemory

Install

Manual install

npm install longmemory

The first README command. MCP starts with `longmemory mcp`.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Stores project notes and code fragments in a local database
  • In HTTP mode without a key any process on the machine can read memory

This is third-party code. Review the repository files before installing.

What it does

LongMemory is a memory engine for LLM applications and agents. Data lives in local SQLite, content is immutable and every fact carries provenance and time. The model stays stateless while the application holds the memory. The MCP server gives an agent 13 high-level tools on an allowlist: project context, memory recall, decision and task-state writes, explanation of selected evidence, conflict reports, skill matching and management, and a code graph with callers and reverse impact. The repository ships plugins for Claude Code and Codex and configs for Cline, Continue and LibreChat.

Who it is for. People running a long project with an agent who are tired of repeating agreements, architecture decisions and task state every session.

Good fit when

  • The agent forgets the chosen architecture between sessions and names an option already rejected again.
  • After a week away the agent has to be brought back into the task context quickly.
  • Before editing a function you want to see who calls it and what would break.
  • Claude Code, Codex and Cline share one memory.
  • Decision choices must be explainable: which facts were pulled and why.

Not a fit when

  • The task is one-off and memory between sessions would not help.
  • Company rules forbid keeping project notes on disk.
  • You want a ready cloud service with no storage or setup of your own.

Example request

Load the project context from LongMemory, recall the accepted authorization decisions and show what a change to `createSession` would affect.

Limitations

Memory is written to a SQLite file on your machine: backups and access to it are your job. In HTTP mode set `LONGMEMORY_API_KEY`, otherwise the server does not require authorization. The `--read-only` mode disables writes and connector sync runs as a dry run by default. The more is accumulated, the more it matters to prune outdated decisions. The engine is written in TypeScript and installs through npm.

How to disable. Remove the `longmemory` entry from the MCP config and uninstall the plugin. The `.longmemory/project.db` database and the `.mcp-audit.jsonl` log are deleted separately.

FAQ

How do I connect MCP locally?

Add the `longmemory` command with the arguments `mcp --db .longmemory/project.db --project current` to the client config. Add `--read-only` to run without writes.

Is there a remote mode?

Yes. `longmemory serve --db ./longmemory.db --mcp-http` opens `http://127.0.0.1:7331/mcp`. If `LONGMEMORY_API_KEY` is set, the server requires the same key.

Which tools does the agent see?

Thirteen: project context, recall, ingest, decisions, task state, explain, conflicts, connectors, skills, code graph and asset catalog. Everything else is closed.

What does the code graph do?

It finds symbols, callers, callees and reverse impact paths from persisted source snapshots. It is read-only.

Where is the call log stored?

By default next to the database, in `<database>.mcp-audit.jsonl`. The `--audit` option changes the path.

Discussion

No questions or reviews yet.

Plugins

A local-first MCP memory server for agents: session history, codebase index and a concept graph in one SQLite database

MCP serverExtended access438Repository stars
Official

Long-term memory for agents: a remote MCP server, plugins for Claude Code, Cursor and Codex, and an API for your own apps

MCP serverExtended access31.6KRepository stars

A long-term memory plugin that keeps decisions, preferences and task state across sessions and injects only what a query needs

PluginBroad access401Repository stars

A self-hosted MCP server for long-term agent memory: structured records, versioned rollback and a visual dashboard

MCP serverExtended access1.4KRepository stars

ContextKeep gives agents persistent memory on SQLite with full-text search, categories and a web interface.

MCP serverExtended access159Repository stars
Official

An MCP server for long-term agent memory: compresses dialogues into atomic facts, resolves pronouns and anchors relative time to absolute dates

MCP serverExtended access3.9KRepository stars

README in short

One TypeScript engine is available as an npm library, CLI, HTTP, MCP, dashboard and VS Code extension. Agent hosts get ready integrations.

README badge

Report a problem