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
MCP serverOfficial

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
All reasons and checks

firstbatchxyz/mem-agent-mcp

Install

Manual install

make install
make setup
make run-agent
make generate-mcp-json

Run 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 review

Broad 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_DIR required
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.

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

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

Shared local memory for AI agents: Claude Code, Codex, Cursor and others find the agreements of past sessions in it and record new ones

CLIBroad access2.2KRepository stars

Persistent agent memory in a folder of linked markdown notes, so Claude Code remembers a project across sessions

MCP serverExtended access334Repository stars

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

MCP serverExtended access1.4KRepository stars

Comparison with similar tools

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

EntryOfficialAuthenticationRepository starsMain difference
mem-agent-mcp: local memory for an agent (this entry)yesnot required626
Basic Memorynonot required4,403long-term memory in local Markdown files with a relation graph and semantic search
MCP Memory Servicenonot required2,054self-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.

README badge

Report a problem

Foxx AImem-agent-mcp: local memory for an agent
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.