mem-agent-mcp: local memory for an agent
mem-agent-mcp
An MCP server that answers questions about your Obsidian-style notes through Dria's local mem-agent model.
- 626 ★ on the repository
- Last commit
- Apache-2.0
Broad access
Why this level
- The server reads personal notes with details about you and your relatives and runs memory code on your computer
- In HTTP mode through a tunnel, ChatGPT connects without authentication: the tunnel address opens your memory to anyone who knows it
- The GitHub and Google Docs connectors need access tokens that must be handled with care
Install
- Works in
Manual install
make install
make setup
make run-agent
make generate-mcp-jsonRun in the cloned repository. On macOS install sets up LM Studio, setup opens a folder picker for the memory, and run-agent offers a model precision.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The server reads personal notes with details about you and your relatives and runs memory code on your computer
- In HTTP mode through a tunnel, ChatGPT connects without authentication: the tunnel address opens your memory to anyone who knows it
- The GitHub and Google Docs connectors need access tokens that must be handled with care
This is third-party code. Review the repository files before installing.
What it does
The server exposes one tool, use_memory_agent: the agent asks a question, and Dria's local mem-agent model searches a folder of notes and returns the answer. The notes are Markdown files linked in the Obsidian manner. The main file, `user.md`, describes you and your relationships, and every entity, whether a person or a company, gets its own file in the `entities` folder. You can edit the notes by hand without restarting the server. The model runs on your computer. On macOS it runs through LM Studio with the Metal backend, and on Linux with a GPU through vLLM. On ARM64 Linux vLLM is not installed by default; there the model is reached through OpenRouter, OpenAI or a LiteLLM proxy. The model comes in 4-bit, 8-bit and bf16 variants. You can fill the memory with ready connectors. They parse a ChatGPT history export, Notion and Nuclino exports, and read GitHub repositories and Google Docs folders through their APIs. The `make memory-wizard` helper guides the setup. Answers can carry filters, for example a ban on revealing exact age or email addresses; filters live in a `.filters` file and are picked up on the fly.
Who it is for. For people who keep a personal Markdown notes base and want to query it from Claude or another client without handing the notes to an outside model.
Good fit when
- You have a ChatGPT history export and want to search past discussions and your own decisions in it
- Your notes live in Notion or Nuclino and the agent needs one entry point to them
- You need memory that runs locally: the model sits on your Mac or on a Linux machine with a GPU
- The agent should answer from your notes without revealing certain details, and filters cover that
- You keep linked notes about people and companies and want to ask questions like «what do I know about this client»
Not a fit when
- You have neither an Apple Silicon Mac nor a Linux machine with a GPU, and a paid outside API does not fit
- You need to write new facts into memory straight from the chat: the server has a single tool for questions
- You need ready cloud memory with a login and sync between devices
- Your notes are not linked and do not live as separate Markdown files
Example request
Ask the memory what I noted about Acme Corp and which of my contacts handles purchasing there.MCP
- Transport
- stdio, http
- Authentication
- not required
Environment variables
MEMORY_DIRrequired- Path to the notes folder chosen with make setup.
MCP_TRANSPORT- Server transport: stdio by default or http.
MCP_PORT- Port for HTTP mode, with the default host 127.0.0.1 and path /mcp/.
Limitations
macOS with the Metal backend and Linux with a GPU are supported. The mcp_server folder's `pyproject.toml` specifies Python 3.11. Before starting the server you must install LM Studio or vLLM, pick the memory folder with `make setup` and start the model with `make run-agent`: without a running model the server cannot answer. On ARM64 Linux an external model or a proxy is required.
The memory folder must follow the structure with a `user.md` file and an `entities` directory, and links between files must use the strict double-bracket format. The GitHub and Google Docs connectors need an access token, and a Google token lives for about an hour. The repository has not been updated since November 2025.
Whether Hugging Face and ChatGPT services are reachable from Russia was not checked for this card.
How to disable. Remove the mem-agent entry from the client configuration, in Claude Code that is `claude mcp remove mem-agent`, and stop the model. The notes folder stays on disk and belongs to you. If you exposed the server through a tunnel, close that too.
FAQ
How do I connect mem-agent-mcp to Claude Code?
First start the model with `make run-agent`, then add the server: claude mcp add mem-agent --env MEMORY_DIR=path_to_memory -- python path_to_repo/mcp_server/server.py. Check the connection with `claude mcp list`. For Claude Desktop and LM Studio, `make generate-mcp-json` prepares an `mcp.json` file that you copy into the client configuration.
How is the memory folder organized?
The root holds `user.md` with your details and relationships, and next to it an `entities` folder with one file per entity. Links between files are written as double square brackets around the path `entities/name.md`. The link format must be followed strictly.
How do filters work in mem-agent?
The model is trained to read filters in `<filter>` tags after the question, for example a ban on revealing exact age or email addresses. `make add-filters` writes the rules to the `.filters` file and `make reset-filters` clears it. No server restart is needed.
Can mem-agent-mcp be connected to ChatGPT?
Yes: `make serve-mcp-http` starts the server at `localhost:8081/mcp` and the «ngrok» service exposes it to the network. In ChatGPT developer mode you add the address with the /mcp path and the HTTP protocol, without authentication. Then anyone who learns the tunnel address can query your memory.
What to do on ARM64 Linux without vLLM?
Use an external model: the OpenRouter or OpenAI path, or a LiteLLM proxy set in the `.env` file as VLLM_HOST and VLLM_PORT. Then start the server with `make serve-mcp` or `make serve-mcp-http`.
Discussion
No questions or reviews yet.
Related
MCP serversiai-memory
iai-memory (Personal Memory Engine)
A local long-term memory MCP server for agents: keeps conversations verbatim and returns the right context at the start of a session
A long-term memory MCP server for agents: search, store and correct facts across sessions in the cloud or a local core
A long-term memory MCP server for AI agents: facts fade along a forgetting curve and related records are compressed into a summary
Shared local memory for AI agents: Claude Code, Codex, Cursor and others find the agreements of past sessions in it and record new ones
Persistent agent memory in a folder of linked markdown notes, so Claude Code remembers a project across sessions
A self-hosted MCP server for long-term agent memory: structured records, versioned rollback and a visual dashboard
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| mem-agent-mcp: local memory for an agent (this entry) | yes | not required | 626 | |
| Basic Memory | no | not required | 4,403 | long-term memory in local Markdown files with a relation graph and semantic search |
| MCP Memory Service | no | not required | 2,054 | self-hosted memory with semantic search and a knowledge graph |
README in short
The document briefly introduces the server, lists supported platforms and walks through installation: `make check-uv`, `make install`, `make setup`, `make run-agent` and `make generate-mcp-json`. It then describes the memory structure with examples of `user.md` and entity files, filters, and a connector table with commands and steps for getting exports and tokens. Separate sections explain connecting Claude Code and ChatGPT, and the end gives troubleshooting tips and a Python skeleton for a new connector.