Skip to main content
Glama

memory-mcp

Persistent memory for AI agents over the Model Context Protocol (MCP). Filesystem-backed, dependency-light, with keyword search — so an agent can remember things across sessions without a database, embeddings, or API keys.

Why

Most agents forget everything between runs. memory-mcp gives any MCP-compatible client (Claude Desktop, Claude Code, and others) five simple tools to write, read, search, list, and delete memories that persist on disk as plain JSON. The storage layer is standard-library only and independently tested, so it's easy to audit and hard to break.

Tools

Tool

What it does

memory_write

Store or update an entry under a key (with optional tags).

memory_read

Read an entry back by its key.

memory_search

Keyword search across content, tags, and keys — returns ranked snippets.

memory_list

List all keys, optionally filtered by tag.

memory_delete

Remove an entry by key.

Install

pip install git+https://github.com/M-Ashrey/memory-mcp

Requires Python 3.10+.

Use with Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "memory": {
      "command": "memory-mcp"
    }
  }
}

By default, memories are stored under a local file resolved from the MEMORY_MCP_PATH environment variable. Set it to control where data lives:

{
  "mcpServers": {
    "memory": {
      "command": "memory-mcp",
      "env": { "MEMORY_MCP_PATH": "/path/to/memory.json" }
    }
  }
}

Develop

git clone https://github.com/M-Ashrey/memory-mcp
cd memory-mcp
pip install -e ".[dev]"
pytest

The store logic (memory_mcp/store.py) has no third-party dependencies and its tests never import the MCP server, so the test suite runs even without the mcp SDK installed.

Part of a small set of AI-agent tooling — see also the Claude MCP starter kit.

License

MIT

-
license - not tested
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/M-Ashrey/memory-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server