mdmem
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mdmemcreate a memory file about Q3 goals and link it to the projects index"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
markdown-hierarchical-memory
An implementation of markdown-hierarchical-memory-spec.md v1.
MCP server (
src/mdmem/): The mechanical execution layer providing file read/write, frontmatter management, a wikilink graph, keyword search with graph expansion, optimistic concurrency control (§16), bidirectional link consistency checks (§12), and a change log (§10/§17). Semantic judgments such as cohesion and importance (§9) are not implemented.Claude Code subagent (.claude/agents/memory-manager.md): The Manager Agent defined in §10 of the specification. This is the component that makes semantic judgments by calling MCP tools.
Scope
Of the features in §15, only link graph + keyword search is supported (embedding vector search is not implemented. It can be added by replacing
_scoreinsrc/mdmem/search.py).The Manager Agent's decision-making logic does not make LLM calls internally within the server. The caller (Claude Code) is expected to make the decisions and pass the results as parameters to tool calls.
Related MCP server: auxly-memory-cli
Setup
pip install -e .
python -m pytest tests/Registering with Claude Code
Copy .mcp.json.example to .mcp.json and replace <ABSOLUTE_PATH_TO_THIS_REPO> with the absolute path to this repository (.mcp.json is excluded by .gitignore because it contains a personal local path):
cp .mcp.json.example .mcp.json
# Edit .mcp.json and fill in the pathAfter restarting Claude Code (or reloading the MCP configuration), the mdmem server will be enabled, and the memory-manager subagent in .claude/agents/memory-manager.md will be able to call the mcp__mdmem__* tool set.
claude mcp listThis command can be used to verify that mdmem is recognized.
Registering with Cursor
MCP:
.cursor/mcp.json(points to the sameMDMEM_ROOTas Claude Code's.mcp.json)Manager Agent:
.cursor/skills/memory-manager/SKILL.md
After restarting Cursor (or reloading mdmem in Settings → Tools & MCP), you can share and use the same memory/ directory with Claude Code.
Directory Structure
memory/
├── index.md # Pure registry (§14)
├── projects/
├── concepts/
└── archive/
└── _manager_log.md # Change log (§10/§17)The actual path of memory/ can be changed with the MDMEM_ROOT environment variable (default: memory/ in the current directory).
Main MCP Tools
Tool | Corresponding specification |
| §14, §15, §11 ( |
| §3, §14 |
| §4 Step1, §16 |
| §12 (executes bidirectional linking as a single operation, with self-checking) |
| §9/§10 splitting |
| §5/§9/§13 summarize and archive |
| §13 forgetting model (content unchanged) |
| §13 (suggestions only; does not execute them. §11) |
| §10/§17 |
All write tools accept expected_updated and return ConflictError if it differs from the value observed during reading (§16).
Known Limitations
Narrow race condition in concurrent writes: Optimistic locking with
expected_updatedonly guarantees the sequence of "read, then validate, then write" within a single process. When Cursor and Claude Code share the sameMDMEM_ROOT(a situation actually observed during development of this repository), there is a theoretical possibility that two processes read the same file at nearly the same time, both pass the check, and one update overwrites the other. This is not critical, but it is not a problem when writes are performed by a single process only.Embedding vector search is not implemented (see the Scope section).
idonly accepts^[A-Za-z0-9_-]+$(because it is used directly in file paths).
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables storing, searching, and discovering knowledge connections using associative memory, with semantic search, hierarchical organization, and cross-environment sync.1MIT
- AlicenseNot gradedqualityAmaintenanceLocal-first, file-based memory layer for AI agents — one shared Markdown vault across Claude, Codex, Gemini, Cursor and any MCP client. Provides read/write memory tools with an audit trail, per-agent trust levels, and Git sync; no cloud and no lock-in.2MIT
- AlicenseNot gradedqualityDmaintenanceProvides persistent long-term memory for AI assistants with tag-based retrieval, wiki-style linking, and source references, storing memories as markdown files with SQLite index.1MIT
- FlicenseNot gradedqualityBmaintenanceA local-first, Markdown-native AI agent layered memory system that provides MCP tools for storing, recalling, exporting, and importing memories with types like working, persona, and fact.
Related MCP Connectors
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
Persistent docs and memory for AI agents — read, write, organize & search a shared workspace.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/masaki-kato-119/markdown-hierarchical-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server