IHMT — Infinite Hierarchical Memory Tree
Local long-term memory MCP server that gives AI coding agents persistent, time-aware recall stored as a tree of plain text files.
At a Glance
Self-hosted local MCP memory server released under the MIT License; no account, database or paid service required beyond your own AI agent.
Engagement
Available On
Alternatives
Listed Oct 2026
About IHMT — Infinite Hierarchical Memory Tree
IHMT (Infinite Hierarchical Memory Tree) is an open-source, MIT-licensed long-term memory system for AI coding agents, published by gonzaroman. It runs as a stdio MCP server that lets agents such as Claude Code, Codex and opencode save decisions, preferences and corrections once and retrieve them in later sessions and across projects.
What It Is
IHMT stores memory locally as a recursive tree of plain files: raw text leaves at the bottom, JSON summaries above them, and a single root.json trunk. Searches walk the tree from root to branch to leaf rather than scanning a flat index, so the README says retrieval typically costs 200–900 tokens regardless of memory size. It needs no vector database, server or account, and the core uses only Python 3.10+ and the standard library.
How Memory Is Saved and Retrieved
The MCP server exposes nine tools in three families: long-term memory (search_memory, save_memory, mark_outdated), project indexes (project_map, find_code, read_file) and session scratch memory (note, recall, digest_output). Ingestion detects the type and domain of each document and splits it without cutting logical blocks, using code-, narrative-, date- and process-aware chunkers. Ranking uses BM25 and, when a query is ambiguous, the agent is asked for a clue instead of guessing.
Time Awareness
IHMT records dated facts such as location, workplace and stack. When a value changes, the older memory is kept as history, flagged OUTDATED, and searches return the current one first. Corrections can also be linked explicitly with the replaces parameter.
Setup Path
An agent can install it from a prompt that points to INSTALL.md, or users can install manually from a git clone or via uvx from the ihmt-memory PyPI package. Claude Code is officially supported; Codex and opencode are tested, and other MCP clients should work but are untested. A local graphical interface and a CLI are also included. The README states that matching is lexical rather than semantic and that writes assume a single writer.
Community Discussions
Be the first to start a conversation about IHMT — Infinite Hierarchical Memory Tree
Share your experience with IHMT — Infinite Hierarchical Memory Tree, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
Self-hosted local MCP memory server released under the MIT License; no account, database or paid service required beyond your own AI agent.
- MIT License
- Local storage as plain text files; no cloud, no account
- Works with Claude Code, Codex and opencode via stdio MCP server
- Optional Anthropic summarizer requires your own API key (external cost)
Capabilities
Key Features
- Persistent long-term memory across sessions and projects
- Shared memory across Claude Code, Codex and opencode
- Tree-based retrieval with BM25 ranking
- Time-aware facts with OUTDATED flagging and history
- Ambiguity detection with clue loop
- Plain-text, local, portable memory folder
- Project code indexes with symbol-level lookup
- Session scratch memory and log digesting
- Local graphical interface (bilingual ES/EN)
- CLI and Python library
- Optional Anthropic summarizer backend with heuristic fallback
