total-agent-memory MCP

A local MCP memory server for coding agents: decisions, errors and facts stay on your machine, with semantic and graph recall

  • 76 ★ on the repository
  • Last commit
  • MIT
MCP server

Extended access

Why this level

  • The server stores decisions, errors and project facts and may hold sensitive data in them
  • In HTTP and Docker mode access is token-protected, but a port opens on the machine
All reasons and checks

vbcherepanov/total-agent-memory

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/total-agent-memory

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

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

  • The server stores decisions, errors and project facts and may hold sensitive data in them
  • In HTTP and Docker mode access is token-protected, but a port opens on the machine

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

What it does

total-agent-memory (TAM) fixes agents that begin every session without memory of earlier ones, so decisions, fixes and project conventions get explained again. The server saves decisions, errors, facts and session summaries in `~/.tam/` on top of SQLite and serves them over MCP to any client with no code changes. Recall combines full-text BM25, dense embeddings, fuzzy matching and a knowledge graph. The ranked lists are fused with reciprocal rank fusion, then a local cross-encoder reranks the result. The default profile makes no LLM call on write or search, so quality can be measured offline. Facts carry validity intervals through `kg_add_fact` and `kg_at`, and a newer value of a single-valued fact retires the older one. Tell the agent "remember that we chose PostgreSQL for billing" and it calls `memory_save`; in a later session `memory_recall` returns the record. The same package runs as a team server: personal, department and company areas are separate stores behind one gateway, with roles, authorship and an audit trail. The `tam setup` wizard finds Claude Code, Claude Desktop, Codex, Cursor, Windsurf, Gemini CLI, Cline and OpenCode.

Who it is for. Developers who work with coding agents daily and want project decisions and conventions to outlive a session, and researchers of agent memory.

Good fit when

  • The agent forgets the database choice and architecture decisions between sessions
  • The same error gets explained over and over
  • Memory must be local, with no cloud and no LLM call on write or search
  • A team wants a shared store with roles and an audit trail
  • You need a baseline memory implementation for research that can be run and modified

Not a fit when

  • You need a hosted memory service reachable from any device with no server of your own
  • You cannot accept a download of about 330 MB of models on first start
  • The project is small and a `CLAUDE.md` file with rules is enough

Example request

Remember that we chose PostgreSQL for billing because of row-level security, and next session remind me which database we chose.

MCP

Transport
stdio, http
Authentication
not required

Environment variables

TAM_MEMORY_DIR
Memory directory, `~/.tam/` by default
TAM_MODEL_CACHE
Folder for embedding models

Limitations

It needs Python 3.11 or newer. The first start downloads about 330 MB of models: a 240 MB embedder and a 90 MB cross-encoder. Fastembed keeps models in a temp directory that macOS clears from time to time, so set `TAM_MODEL_CACHE=~/.tam/models`. A separate sentence-transformers reranker pulls in PyTorch and installs as the `[rerank]` extra. The team server on PostgreSQL needs the `[postgres]` extra. Install one of the two Claude Code plugins, not both. In Docker the server requires the token from `~/.tam/state/http-token`.

How to disable. Remove the server from the client config (`claude mcp remove memory`), uninstall the package with `pip uninstall total-agent-memory` and, if you wish, delete `~/.tam/` with the stored memory.

FAQ

Where is memory stored?

In `~/.tam/` on your machine. The `TAM_MEMORY_DIR` variable points elsewhere.

How do I connect TAM to Claude Code?

With `claude mcp add memory -- total-agent-memory` or through the plugin: `/plugin marketplace add vbcherepanov/total-agent-memory`, then `/plugin install total-agent-memory@vbcherepanov`.

Does TAM call a language model on write?

No, the default profile makes no LLM call on write or search. Embeddings and the cross-encoder run locally.

Which clients does the setup wizard support?

Claude Code, Claude Desktop, Codex, Cursor, Windsurf, Gemini CLI, Cline and OpenCode. `npx -y total-agent-memory connect` also adds continue and aider.

Can TAM run in Docker?

Yes, the `ghcr.io/vbcherepanov/total-agent-memory` image serves MCP over HTTP on port 3737 and a dashboard on 37737. Access needs the token from `~/.tam/state/http-token`.

Discussion

No questions or reviews yet.

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

Local persistent memory for coding agents: hooks record every session, and Claude Code, Codex or Cursor recall past decisions through 54 MCP tools

MCP serverExtended access30.3KRepository stars

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

PluginExtended access4.6KRepository stars

AgentDB keeps agent memory in an .rvf file and, with 41 MCP tools, recalls past solutions while learning from feedback

MCP serverExtended access97Repository stars

Agent memory as a graph of linked facts: decisions and errors outlive the session, with no vector database or paid API calls

MCP serverExtended access244Repository stars

README in short

Covers install from PyPI, npx, Docker and plugins, the `tam setup` wizard, the first start with model downloads, a quickstart script on the MCP SDK and running tests.

README badge

Report a problem