Mimir's Vault

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.

Category
访问服务器

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>

Python MCP Protocol FastMCP Obsidian License


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:

  1. Inspect .context/overview.md via get_root_node.
  2. Follow Obsidian wikilinks ([[modules/auth]]).
  3. Inspect only the targeted source code files mapped in that module note.
  4. 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 cloned Mimir-s_Vault (e.g. /home/user/projects/Mimir-s_Vault or C:/Projects/Mimir-s_Vault).

Cursor IDE

  1. Open Cursor Settings → Features → MCP Servers.
  2. Click + Add New MCP Server.
  3. Name: Mimirs_Vault
  4. Type: command
  5. 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: "Consult get_root_node first. 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_context prompt 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:

  1. Call get_root_node to inspect .context/overview.md.
  2. Follow [[modules/auth]] to extract mapped file paths (src/auth/service.py).
  3. 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:

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

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选