Personal knowledge vault MCP server for Claude Desktop
Project description
vault-mcp
English
Personal knowledge vault MCP server for Claude Desktop. Capture thoughts, search notes, and read files from a local markdown-based knowledge vault.
Quick Start (uvx — Recommended)
The lightest way to run vault-mcp. No Docker, no manual venv — just uv and one config change.
Step 1. Install uv (if you don't have it):
curl -LsSf https://astral.sh/uv/install.sh | sh
Step 2. Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"vault": {
"command": "uvx",
"args": ["obsidian-in-a-vat-mcp"],
"env": {
"VAULT_LOCAL_PATH": "/Users/yourname/my-vault"
}
}
}
}
Replace /Users/yourname/my-vault with the absolute path to your local vault directory.
Step 3. Fully quit and reopen Claude Desktop. The vault tools will appear automatically.
Don't have a vault yet? Copy the included template:
cp -r example_vault /Users/yourname/my-vault
Alternative Setup (Docker)
If you prefer Docker:
{
"mcpServers": {
"vault": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "/Users/yourname/my-vault:/vault",
"ghcr.io/oliverxuzy-ai/obsidian-in-a-vat:latest"
]
}
}
}
Requires Docker Desktop running in the background.
Update to latest: docker pull ghcr.io/oliverxuzy-ai/obsidian-in-a-vat:latest
Alternative Setup (Python / uv manual)
For development or if you want to pin a local checkout:
uv venv && source .venv/bin/activate
uv pip install -e .
Claude Desktop config:
{
"mcpServers": {
"vault": {
"command": "/absolute/path/to/.venv/bin/python",
"args": ["-m", "vault_mcp"],
"env": {
"VAULT_LOCAL_PATH": "/Users/yourname/my-vault"
}
}
}
}
Use the absolute path to the venv's python — Claude Desktop does not inherit your shell PATH.
Tools
| Tool | Actions | Description |
|---|---|---|
vault_read |
search, get, list_captures |
Search vault, read files, list captures by status |
vault_capture |
save, delete |
Capture refined insights with auto-tagging, or delete captures |
vault_promote |
promote |
Promote captures into structured notes with auto-wikilinks |
vault_analyze |
rebuild_graph, clusters, connections, orphans |
Knowledge graph: build graph, Louvain clustering, N-degree connections, orphan detection |
vault_topic |
prepare, create, update |
Topic lifecycle: gather materials (progressive disclosure), create/update MOC-style topics |
Auto-Tag Extraction
Tags are extracted from capture text using three sources (in priority order):
- tags.yaml — Custom tags and synonym mappings at the vault root
- Existing notes — Tags collected from existing vault files' frontmatter
- Default domains — Fallback: ai, llm, productivity, writing, coding, design, business, learning, health, finance, philosophy, psychology
Example tags.yaml in your vault root:
tags:
ai: [artificial intelligence, machine learning, ML, deep learning]
coding: [programming, software, development, code]
design: [UX, UI, user experience]
Development
# Build image locally
docker build -t vault-mcp .
# Test the container starts (Ctrl+C to stop)
echo '{}' | docker run -i --rm -v $(pwd)/example_vault:/vault vault-mcp
# Syntax check
python -m py_compile src/vault_mcp/server.py
# Interactive MCP Inspector
mcp dev src/vault_mcp/server.py
中文
个人知识库 MCP 服务器,适配 Claude Desktop。捕获想法、搜索笔记、读取本地 markdown 知识库中的文件。
快速开始(uvx — 推荐)
最轻量的运行方式。不需要 Docker,不需要手动创建虚拟环境 — 只需安装 uv 即可。
第一步. 安装 uv(如果还没有):
curl -LsSf https://astral.sh/uv/install.sh | sh
第二步. 添加到 Claude Desktop 配置文件(~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"vault": {
"command": "uvx",
"args": ["obsidian-in-a-vat-mcp"],
"env": {
"VAULT_LOCAL_PATH": "/Users/yourname/my-vault"
}
}
}
}
将 /Users/yourname/my-vault 替换为你本地 vault 目录的绝对路径。
第三步. 完全退出并重新打开 Claude Desktop,vault 工具会自动出现。
还没有 vault? 复制内置模板:
cp -r example_vault /Users/yourname/my-vault
备选安装方式(Docker)
如果你更喜欢用 Docker:
{
"mcpServers": {
"vault": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "/Users/yourname/my-vault:/vault",
"ghcr.io/oliverxuzy-ai/obsidian-in-a-vat:latest"
]
}
}
}
需要 Docker Desktop 在后台运行。
更新到最新版:docker pull ghcr.io/oliverxuzy-ai/obsidian-in-a-vat:latest
备选安装方式(Python / uv 手动)
适用于开发或本地调试:
uv venv && source .venv/bin/activate
uv pip install -e .
Claude Desktop 配置:
{
"mcpServers": {
"vault": {
"command": "/绝对路径/.venv/bin/python",
"args": ["-m", "vault_mcp"],
"env": {
"VAULT_LOCAL_PATH": "/Users/yourname/my-vault"
}
}
}
}
必须使用 venv 内 python 的绝对路径 — Claude Desktop 不继承你的 shell PATH。
工具
| 工具 | Actions | 说明 |
|---|---|---|
vault_read |
search, get, list_captures |
搜索 vault、读取文件、按状态列出 captures |
vault_capture |
save, delete |
捕获精炼洞察并自动打标签,或删除 capture |
vault_promote |
promote |
将 captures 提升为结构化笔记,自动插入 wikilinks |
vault_analyze |
rebuild_graph, clusters, connections, orphans |
知识图谱:构建图谱、Louvain 聚类、N 度关联查询、孤岛检测 |
vault_topic |
prepare, create, update |
Topic 生命周期:收集原材料(渐进式披露)、创建/更新 MOC 结构笔记 |
自动标签提取
标签从 capture 文本中提取,使用三个来源(按优先级排序):
- tags.yaml — vault 根目录的自定义标签和同义词映射
- 已有笔记 — 收集已有 vault 文件 frontmatter 中的标签进行匹配
- 默认领域 — 兜底列表:ai, llm, productivity, writing, coding, design, business, learning, health, finance, philosophy, psychology
tags.yaml 示例(放在 vault 根目录):
tags:
ai: [artificial intelligence, machine learning, ML, deep learning]
coding: [programming, software, development, code]
design: [UX, UI, user experience]
开发
# 本地构建镜像
docker build -t vault-mcp .
# 测试容器启动(Ctrl+C 停止)
echo '{}' | docker run -i --rm -v $(pwd)/example_vault:/vault vault-mcp
# 语法检查
python -m py_compile src/vault_mcp/server.py
# 使用 MCP Inspector 交互测试
mcp dev src/vault_mcp/server.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file obsidian_in_a_vat_mcp-0.3.5.tar.gz.
File metadata
- Download URL: obsidian_in_a_vat_mcp-0.3.5.tar.gz
- Upload date:
- Size: 115.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e284bf1e608254db95adb15b8178353ed51137cfc7bbf2df73f918b8e73d63e3
|
|
| MD5 |
5a940353308db21ba9d7343eadaee340
|
|
| BLAKE2b-256 |
2f6de843b8c9aa5b1311e00558ac032dd2dd3c62fade6825b5c33bef3c3746c2
|
Provenance
The following attestation bundles were made for obsidian_in_a_vat_mcp-0.3.5.tar.gz:
Publisher:
release.yml on oliverxuzy-ai/obsidian-in-a-vat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
obsidian_in_a_vat_mcp-0.3.5.tar.gz -
Subject digest:
e284bf1e608254db95adb15b8178353ed51137cfc7bbf2df73f918b8e73d63e3 - Sigstore transparency entry: 1154106034
- Sigstore integration time:
-
Permalink:
oliverxuzy-ai/obsidian-in-a-vat@ab52af5a21d10c265c8e10c6100c02ed921d4a9c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/oliverxuzy-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ab52af5a21d10c265c8e10c6100c02ed921d4a9c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file obsidian_in_a_vat_mcp-0.3.5-py3-none-any.whl.
File metadata
- Download URL: obsidian_in_a_vat_mcp-0.3.5-py3-none-any.whl
- Upload date:
- Size: 27.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9acd4707d8147d4c9aba57a2859556434aa90ccd6b2ac130815b65d9ffa70ce
|
|
| MD5 |
1c6e1b2ea520a5540b2750ecc03b68c3
|
|
| BLAKE2b-256 |
36fd1a55842e6b2d0b51b768705a3b63c0a4463f41a547488dbd973b5642ce6d
|
Provenance
The following attestation bundles were made for obsidian_in_a_vat_mcp-0.3.5-py3-none-any.whl:
Publisher:
release.yml on oliverxuzy-ai/obsidian-in-a-vat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
obsidian_in_a_vat_mcp-0.3.5-py3-none-any.whl -
Subject digest:
b9acd4707d8147d4c9aba57a2859556434aa90ccd6b2ac130815b65d9ffa70ce - Sigstore transparency entry: 1154106039
- Sigstore integration time:
-
Permalink:
oliverxuzy-ai/obsidian-in-a-vat@ab52af5a21d10c265c8e10c6100c02ed921d4a9c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/oliverxuzy-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ab52af5a21d10c265c8e10c6100c02ed921d4a9c -
Trigger Event:
workflow_dispatch
-
Statement type: