Mimir's Vault
An Obsidian-compatible memory graph and context management MCP server that lets AI agents navigate project architecture and relationships via wikilinks before scanning raw code, reducing token waste.
README
<div align="center">
<img src="assets/readme/hero.svg" alt="Mímir's Vault Banner" width="100%" />
<p align="center"> <b>ᚱ • ᚢ • ᛖ • ᛋ • ᚨ • ᛗ • ᛟ • ᛚ</b><br> <i>"Just as Odin drank from Mímir's Well to gain infinite cosmic wisdom,<br> AI agents require targeted knowledge—not a chaotic ocean of raw files."</i> </p>
Key Pillars • System Architecture • Installation • MCP Client Setup • Tool Reference • Agent Workflow Guide
</div>
The Problem: Wandering AI Coding Agents
When AI coding agents (Claude Code, Cursor, Antigravity) work on complex software repositories, they frequently suffer from Context Inflation & Wandering:
- They blindly grep directories, re-scan full codebases, and load 30+ unrelated files into memory.
- They waste thousands of LLM tokens, increase execution latency, and lose track of core architectural rules.
The Solution: Mímir's Vault Memory Graph
Mímir's Vault (Mimirs_Vault) is a high-performance Model Context Protocol (MCP) server built in Python (FastMCP).
It maintains a human-readable, interlinked Obsidian-Wikilink memory graph inside ./.context/ for any software repository.
AI agents follow the Memory-First Scanning Rule:
- Inspect
.context/overview.mdviaget_root_node. - Follow Obsidian wikilinks (
[[modules/auth]]). - Inspect only the targeted source code files mapped in that module note.
- Edit zero unnecessary files.
Key Pillars
| Rune | Pillar | Rationale |
|---|---|---|
| ᛗ | Memory-First Protocol | Mandates AI agents to consult .context/overview.md before reading project source code. |
| ᛟ | Obsidian-Wikilink Graph | Interlinked notes ([[modules/auth]]) viewable natively in Obsidian, VS Code, and Foam graph visualizers. |
| ⚡ | Zero Token Waste | Reduces context consumption by up to 80%, eliminating agent codebase wandering. |
| ⚔️ | Surgical Node Updates | Tools to append, update, and log Architectural Decision Records (ADRs) without clobbering existing notes. |
| ᛚ | Human & Agent Shared Memory | Clean Markdown files (.context/) readable by both human developers and LLMs alike. |
System Architecture
<div align="center"> <img src="assets/readme/architecture.svg" alt="Mímir's Vault Architecture Flowchart" width="100%" /> </div>
<your-project-root>/
└── .context/ <-- Memory Graph Root (Ignored in .gitignore)
├── overview.md <-- ROOT NODE (Scope, File Structure Map, [[modules/*]] index)
├── decisions.md <-- Architectural Decision Records (ADRs)
└── modules/ <-- LINKED MODULE NODES
├── auth.md <-- Module Note (Scope, Mapped Source Files)
├── database.md <-- Module Note
└── ui/ <-- Submodule Directory
└── components.md <-- Submodule Note ([[modules/ui/components]])
Installation
Prerequisites
- Python 3.10+
1. Clone the Repository & Initialize Environment
# Clone repository
git clone https://github.com/GopikChenth/Mimir-s_Vault.git
cd "Mimir-s_Vault"
# Create virtual environment & install dependencies
python3 -m venv .venv
.venv/bin/pip install "fastmcp>=3.4.0" "mcp>=1.2.0" "pydantic>=2.0.0"
2. Verify Installation & Test Graph Engine
.venv/bin/python test_graph.py
Expected Result:
ALL TESTS PASSED SUCCESSFULLY!
MCP Client Setup
Add Mimirs_Vault to your preferred AI Client configuration:
Google Antigravity IDE (agy.json / Settings) or Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"Mimirs_Vault": {
"command": "<path-to-repo>/.venv/bin/python",
"args": [
"<path-to-repo>/main.py"
]
}
}
}
Note: Replace
<path-to-repo>with the absolute path where you clonedMimir-s_Vault(e.g./home/user/projects/Mimir-s_VaultorC:/Projects/Mimir-s_Vault).
Cursor IDE
- Open Cursor Settings → Features → MCP Servers.
- Click + Add New MCP Server.
- Name:
Mimirs_Vault - Type:
command - Command:
<path-to-repo>/.venv/bin/python "<path-to-repo>/main.py"
MCP Tool Reference
Mimirs_Vault exposes 7 core tools for AI agent navigation:
| Tool | Signature | Purpose |
|---|---|---|
get_root_node |
(workspace_path: str = ".") |
Fetches .context/overview.md (Project Scope, Master File Structure Map, [[modules/*]] index). |
navigate_node |
(node_path: str, workspace_path: str = ".") |
Traverses a wikilink node (e.g. modules/auth, decisions). Returns content & mapped source files. |
search_nodes |
(query: str, workspace_path: str = ".") |
Performs keyword and topic search across all .context/ markdown notes. |
init_context_graph |
(project_name, description, scope, workspace_path) |
Bootstraps .context/ folder with starter overview.md and decisions.md. |
create_module_node |
(module_name, scope, source_files, parent_node) |
Creates a module note and registers [[modules/name]] in the parent node. |
update_node |
(node_path, content, section_heading, mode) |
Surgically appends or replaces content under a specific section heading. |
log_decision |
(title, context, decision, consequences) |
Appends an Architectural Decision Record (ADR) in .context/decisions.md. |
System Prompts & Resources
MCP Prompts
memory_first_workflow: Instructs AI agents: "Consultget_root_nodefirst. Read ONLY the target source files mapped in module wikilinks."bootstrap_project_context: Guides AI to auto-scan an un-documented repository and build.context/notes.
MCP Resources
context://root— Direct read of.context/overview.md.context://decisions— Direct read of.context/decisions.md.
Agent Workflow Guide
1. Bootstrapping a New Repository
In any project workspace, prompt your AI agent:
"Run the
bootstrap_project_contextprompt to initialize the memory graph for this repository."
The AI will call init_context_graph and create_module_node to build your project's .context/ tree.
2. Daily Task Execution
When asking your AI agent to implement a feature:
"Implement user authentication with JWT. Check the memory graph first."
The AI will:
- Call
get_root_nodeto inspect.context/overview.md. - Follow
[[modules/auth]]to extract mapped file paths (src/auth/service.py). - Inspect & edit only
src/auth/service.py(zero token waste).
3. Logging Architecture Decisions
"Log an architectural decision that we switched to RS256 JWT signing."
The AI calls log_decision, appending ADR-002 to .context/decisions.md.
Visualizing Your Memory Graph in 3D
Because all nodes use standard Obsidian Wikilink syntax ([[modules/auth]]), open your repository's .context/ directory in:
- Obsidian
- VS Code Foam Extension
Enjoy an interactive, 3D visual graph of your codebase's architectural memory!
<div align="center">
ᛗ Built with Wisdom for AI-First Engineering ᛗ
Crafted with Python FastMCP • Report Issue • Submit Request
</div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。