Shodh-Memory MCP

A long-term memory MCP server for agents: one Rust binary that runs offline and never calls a language model

  • 316 ★ on the repository
  • Last commit
  • Apache-2.0
MCP server

Broad access

Why this level

  • Stores the content of your sessions and decisions on disk and starts a local HTTP server on port 3030
  • Claude Code hooks record session context on their own without being asked
  • First run downloads a binary and models from the network
All reasons and checks

varun29ankus/shodh-memory

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/shodh-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

Broad accessThe tool can change data, run commands or handle secrets.

  • Stores the content of your sessions and decisions on disk and starts a local HTTP server on port 3030
  • Claude Code hooks record session context on their own without being asked
  • First run downloads a binary and models from the network

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

What it does

Shodh-Memory keeps an AI agent's long-term memory entirely on your machine and calls no language model on write or recall. The server is exposed over MCP, REST, a Python package and a Rust library. Memories move through three tiers: working memory of 100 items, session memory of 100 MB and long-term storage in RocksDB. What you use becomes easier to find. Forgotten items lose weight over time, and related memories surface together. Entities and relations (for example "works at" or "caused by") are assembled into a graph by rules and small ONNX models, with no API calls. For Claude Code there are hooks that capture session context on their own. The tools cover memory, search, sessions, todos and projects, reminders and backups.

Who it is for. For developers who want memory across Claude Code or Cursor sessions on their own machine, and for robotics teams on ROS2.

Good fit when

  • The agent forgets decisions and preferences between Claude Code or Cursor sessions
  • Data must not leave the machine: the server works offline and the vector and entity models run on CPU
  • You want memory writes in milliseconds with no paid API call per save
  • You want hooks to capture session context and bring it back later without being asked
  • You need memory for a robot or edge device: there is a Zenoh and ROS2 bridge

Not a fit when

  • You need memory where a language model extracts facts: here rules and small ONNX models do the parsing
  • You need a cloud service for several people without running your own server: storage is local by default
  • You want simple memory as human-readable Markdown files: data sits in a RocksDB database
  • You cannot download models on first run: the embedding, entity and rerank models are fetched automatically

Example request

Remember that this project uses Postgres 16 and sqlx migrations, and remind me of it in the next session before creating a table

MCP

Transport
stdio
Authentication
key is optional

Environment variables

SHODH_API_KEY secret
Access key for a remote server. Generated automatically for a local run.
SHODH_CE_RERANK
Set to 0 to disable cross-encoder reranking of search results.

Limitations

The speed figures were measured on specific machines: a write takes 55–60 ms, and CI runs varied by up to 2.3 times, so treat them as an order of magnitude. On first run the server downloads the embedding and entity models and then runs them on the CPU. Data sits in a RocksDB database that is awkward to read directly. A shared server for several people needs your own host with Docker, and the service listens on port 3030.

How to disable. Remove the server with `claude mcp remove shodh-memory` and delete the hooks from `.claude/settings.json`. Data lives in the directory you set during `shodh init` and can be deleted with it. A container is stopped with `docker stop`.

FAQ

How do I connect Shodh-Memory to Claude Code?

Run `claude mcp add shodh-memory -- npx -y @shodh/memory-mcp`: the package downloads the server binary itself. Then optionally run `npx @shodh/memory-mcp setup-hooks` so context is captured automatically.

How does Shodh-Memory differ from mem0, Cognee and Zep?

In the author's comparison table Shodh-Memory makes zero LLM calls per write, while mem0, Cognee and Zep make two or more. No external services are needed: it runs offline, learns from use with a Hebbian rule and forgets through decay.

Do I need an API key or a cloud?

No. Locally a key is generated automatically, and no cloud or external database is needed. For a remote server add the `SHODH_API_KEY` variable.

Which tools does the server expose?

51 in total: memory write and recall, quick queries and summaries, session history, GTD todos with comments, projects, reminders, and backups with verification and restore.

Can I run the server in Docker?

Yes: `docker run -d -p 3030:3030 -v shodh-data:/data varunshodh/shodh-memory`, then connect the client through `npx -y @shodh/memory-mcp`. This setup suits shared servers.

Discussion

No questions or reviews yet.

Self-hosted long-term memory for agents: semantic search, a knowledge graph and autonomous consolidation over MCP and a REST API

MCP serverExtended access2.1KRepository stars

Local memory for agents in a single Rust binary: stores, searches by meaning and keyword, works with no network and no keys

CLIExtended access278Repository stars

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

MCP serverExtended access1.4KRepository stars

A long-term memory MCP server for AI agents: facts fade along a forgetting curve and related records are compressed into a summary

MCP serverExtended access270Repository stars

iai-memory

iai-memory (Personal Memory Engine)

Official

A local long-term memory MCP server for agents: keeps conversations verbatim and returns the right context at the start of a session

MCP serverExtended access916Repository 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.5KRepository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialAuthenticationRepository starsMain difference
Shodh-Memory (this entry)nokey is optional316
Claude-Memno104,915a memory plugin for Claude Code only
Basic Memorynonot required4,403keeps memory in human-readable Markdown files
agent-memoryno4,374Markdown as the source of truth with a SQLite cache, no graph or decay

README in short

The README opens with a comparison against mem0, Cognee and Zep and a description of the local models. Install options for the CLI, Claude Code, Python, Rust and Docker follow, then a latency table and the tool list. It ends with the REST API, robotics on Zenoh and ROS2, and neuroscience references.

README badge

Report a problem

Foxx AIShodh-Memory
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.