memvault

memvault

A local OKF-compatible knowledge engine for AI agents. Enables capturing agent conversations, hybrid semantic+keyword search, MCP serving to agents, interactive graph visualization, and OKF bundle export.

Category
访问服务器

README

memvault

A local, OKF-compatible knowledge engine for AI agents. Capture your Codex / Claude / Gemini sessions, retrieve them with hybrid semantic + keyword search, serve them to every agent harness over MCP, visualize them as an interactive graph, and export to a portable Open Knowledge Format bundle.

License Python MCP OKF


What is this?

Google's Open Knowledge Format (OKF) standardized how to store agent knowledge — markdown files with YAML frontmatter. It deliberately leaves out the hard parts: retrieval, capture, serving, and enforcement.

memvault is that missing engine. Point it at a directory of markdown notes (an OKF bundle) and it becomes a living, queryable, agent-served knowledge base.

OKF (the format) memvault (the engine)
Storage format ✅ markdown + frontmatter uses OKF
Retrieval — (out of scope) ✅ hybrid semantic + keyword (RRF)
Capture — (BigQuery agent only) ✅ Codex / Claude / Gemini sessions
Serving to agents — ✅ one MCP server, every harness
Visualize static viewer ✅ interactive graph
Privacy unspecified ✅ secret scrubbing + sensitivity gate

memvault produces and consumes OKF v0.1 bundles — it rides the standard, it doesn't replace it.


See it

Every page is a node; every cross-link is an edge. Search, filter by type, switch layouts, and read any concept with its backlinks — all in one self-contained HTML file (no server):

memvault interactive knowledge graph

Generated from the public demo bundle in examples/demo with memvault viz. Your own graph stays local.


Quickstart

# install (from a clone)
pip install -e .              # add ".[neural]" for real multilingual embeddings
                              # add ".[yaml]"  for robust YAML frontmatter

# point at your knowledge bundle (default: ~/llm-wiki)
export MEMVAULT_WIKI=~/llm-wiki

# 1. capture your agent conversations (Codex / Claude Code / Gemini)
memvault ingest

# 2. build the semantic index
memvault index

# 3. search (hybrid semantic + keyword)
memvault search "what did I decide about the auth refactor"

# 4. visualize -> writes viz.html you can open in any browser
memvault viz

# 5. export a portable OKF bundle
memvault export --out ./okf-bundle

# 6. serve to your agents over MCP (stdio)
memvault serve

Try it on the bundled demo with no setup:

memvault viz --wiki examples/demo --out demo.html && open demo.html

Wire it into your agents (one command)

memvault registers itself into every harness it detects — registering the MCP server and a wiki-first routing block, so your agents actually consult the wiki:

memvault install            # detect + wire (backs up every file it touches)
memvault install --check    # show wiring status
memvault install --dry-run  # preview, change nothing
memvault install --uninstall
Harness Capability Enforcement
Claude Code MCP server + .mcp SessionStart / UserPromptSubmit hooks inject wiki context
Codex CLI [mcp_servers.memvault] in config.toml AGENTS.md routing (+ opt-in user_prompt_submit hook)
OpenCode drop-in plugin/llm-wiki.js (coexists with omo) AGENTS.md routing
anything MCP memvault serve (stdio) AGENTS.md routing

Or register the stdio server manually anywhere MCP is supported:

{ "command": "memvault", "args": ["serve", "--wiki", "/path/to/bundle"] }

How it works

  ~/.codex  ~/.claude  ~/.gemini        markdown bundle (OKF)
        \       |        /                      |
         ▼      ▼       ▼                        ▼
   ingest (sessions) ───────────────►  raw/manifests/*.jsonl
                                               │
                              index (hashing or neural embeddings)
                                               │
        ┌──────────────┬───────────────┬───────┴────────┐
        ▼              ▼               ▼                ▼
     search        serve (MCP)       viz            export (OKF)
   hybrid RRF    every harness   interactive graph   portable bundle
  • Capture — reads only visible chat turns; tool output, attachments, and credential-looking strings are skipped or scrubbed; sensitive sessions are reduced to counts. Incremental: unchanged files are not re-read.
  • Retrieve — dense cosine over an embedding index fused with a lexical scorer via Reciprocal Rank Fusion. Default embedder is a dependency-free numpy hashing encoder (Korean + English, offline, deterministic); pip install ".[neural]" upgrades to a multilingual transformer automatically.
  • Serve — a pure-stdlib MCP stdio server exposing wiki_answer_context, wiki_search, wiki_semantic_search, and wiki pages as memvault:// resources.
  • Visualize / Export — vendored OKF viewer renders the graph; export emits a conformant OKF v0.1 bundle (frontmatter mapped, wikilinks normalized, index.md generated).

Configuration

Setting Env CLI Default
Knowledge bundle root MEMVAULT_WIKI --wiki ~/llm-wiki
Home root (session scan) MEMVAULT_HOME --home ~

Relationship to OKF

memvault is an independent project. It targets the Open Knowledge Format v0.1 specification published by Google Cloud, and bundles OKF's reference viewer (Apache-2.0). It is not affiliated with or endorsed by Google. See NOTICE.

License

Apache-2.0. See LICENSE.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选