MCP server for MyLLMWiki (Obsidian) capture across Cursor, Codex, Claude
Project description
MyLLMWiki MCP Server
跨 Cursor / Codex / Claude Code 的统一 wiki 能力层。MCP 进程在宿主环境运行,不受 Codex 项目沙箱限制,写入 MyLLMWiki 更可靠。
架构
任意 vibecoding 工具
│ MCP stdio
▼
integrations/mcp/server.py
│ 读 config.env
▼
MyLLMWiki/wiki/ + index.md + log.md + inbox.jsonl
▼
Obsidian
与 Skill/Rule 的关系:
| 层 | 职责 |
|---|---|
| Skill / Rule | 何时沉淀(触发词、质量闸门) |
| MCP | 如何读写(路径、搜索、写页、记 log) |
| CAPTURE.md | 写什么(SSOT 约定) |
安装
cd /Users/jack/MyLLMWiki/integrations/mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# 或从仓库根:
./integrations/install.sh mcp
工具列表
| Tool | 用途 |
|---|---|
wiki_paths |
返回可配置路径(同 myllmwiki paths) |
wiki_get_spec |
读 CAPTURE.md |
wiki_read_page |
读任意 wiki 文件 |
wiki_search |
在 wiki/ 内搜索 |
wiki_list_recent |
列出近期 summaries/projects/… |
wiki_write_page |
写入/追加页面(仅限受管目录) |
wiki_append_log |
追加 log.md 条目 |
wiki_inbox |
追加会话索引 |
wiki_capture_checklist |
返回沉淀步骤(用户已触发时) |
wiki_update_index |
插入/更新 index.md 分区表格行(v0.2) |
wiki_list_by_status |
按 frontmatter status 列页(v0.2) |
wiki_set_status |
设置页 frontmatter status(v0.2) |
wiki_paths() 含 mcp_schema_version(当前 0.2)。
PyPI
uvx myllmwiki-mcp # 或 pip install myllmwiki-mcp
Cursor 配置
~/.cursor/mcp.json 或项目 .cursor/mcp.json:
{
"mcpServers": {
"myllmwiki": {
"command": "/Users/jack/MyLLMWiki/integrations/mcp/.venv/bin/python",
"args": ["/Users/jack/MyLLMWiki/integrations/mcp/server.py"],
"env": {
"MYLLMWIKI_ROOT": "/Users/jack/MyLLMWiki"
}
}
}
}
Codex 配置
~/.codex/config.toml:
[mcp_servers.myllmwiki]
type = "stdio"
command = "/Users/jack/MyLLMWiki/integrations/mcp/.venv/bin/python"
args = ["/Users/jack/MyLLMWiki/integrations/mcp/server.py"]
[mcp_servers.myllmwiki.env]
MYLLMWIKI_ROOT = "/Users/jack/MyLLMWiki"
重启 Codex 后在工具列表中应出现 myllmwiki MCP。
Claude Code 配置
~/.claude/settings.json 或项目 .mcp.json(视版本而定):
{
"mcpServers": {
"myllmwiki": {
"command": "/Users/jack/MyLLMWiki/integrations/mcp/.venv/bin/python",
"args": ["/Users/jack/MyLLMWiki/integrations/mcp/server.py"],
"env": {
"MYLLMWIKI_ROOT": "/Users/jack/MyLLMWiki"
}
}
}
}
推荐使用方式
用户说「沉淀」后,agent 应:
wiki_capture_checklist(topics=[...], project="...")wiki_get_spec()+wiki_search(...)避免重复建页wiki_write_page(...)写 summary / concept / projectwiki_append_log(...)+ 更新wiki/index.md
MCP 不能替代触发闸门 — 仍需要用户说「沉淀」或 rule/skill 约束,避免自动写 wiki。
可配置目录
与 CLI 相同:编辑 integrations/config.env,MCP 启动时自动加载。
本地测试
source integrations/mcp/.venv/bin/activate
python integrations/mcp/server.py # stdio,需 MCP 客户端连接
# 或快速测 paths 模块:
python -c "from paths import load_paths; print(load_paths())"
优劣
| MCP | Skill + 直接写文件 | |
|---|---|---|
| 跨工具 | ✅ 同一 server | ❌ 每工具一套 |
| Codex 沙箱 | ✅ 进程外写入 | ❌ 常需 escalation |
| 路径校验 | ✅ server 内统一 | ❌ 靠 prompt |
| 实现成本 | 中 | 低 |
| 需安装 | venv + 各工具注册 | symlink 即可 |
Project details
Release history Release notifications | RSS feed
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 myllmwiki_mcp-0.2.0.tar.gz.
File metadata
- Download URL: myllmwiki_mcp-0.2.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
779582e07a31dde47f78f4b847d134a55ffc56b7153bfa515fa9d230000d6779
|
|
| MD5 |
69ab8233b8438f01ffafcee035e9d942
|
|
| BLAKE2b-256 |
34b6985c99c8500babff4c5337ec88da814a5833f465a8f36b08298976e24424
|
File details
Details for the file myllmwiki_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: myllmwiki_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a380be6da5ef4f6f90174230988ab00ad92f044d6d1d6587fa5950b2eddaf04
|
|
| MD5 |
eed4aed5ff1b42e5bb402452ca6f1d28
|
|
| BLAKE2b-256 |
1f99c9b866d3603f09d10bcdcfc42109dfcfa674422756adf132b55f8c20ad0c
|