基本能力
产品定位
MCP Obsidian 是一个用于集成 Obsidian 笔记库的 Model Context Protocol 服务器,旨在增强 Claude Desktop 或其他 MCP 客户端与 Obsidian 笔记的交互能力。
核心功能
- obsidian_read_notes: 读取多个笔记的内容,每个笔记的内容与其路径一起返回。
- obsidian_search_notes: 通过名称搜索笔记(支持不区分大小写、部分匹配和正则表达式)。
- obsidian_read_notes_dir: 列出指定路径下的目录结构。
- obsidian_write_note: 在指定路径创建新笔记。
适用场景
- 开发者或用户希望通过 Claude Desktop 或其他 MCP 客户端快速访问和管理 Obsidian 笔记。
- 需要自动化搜索、读取或创建 Obsidian 笔记的场景。
工具列表
- obsidian_read_notes: 读取笔记内容。
- obsidian_search_notes: 搜索笔记。
- obsidian_read_notes_dir: 列出目录结构。
- obsidian_write_note: 创建新笔记。
常见问题解答
- 无
使用教程
使用依赖
- Node.js 18+ (安装命令:
brew install node
) - Obsidian 笔记库
- Claude Desktop (从 https://claude.ai/desktop 安装)
- tsx (安装命令:
npm install -g tsx
)
安装教程
bash
git clone https://github.com/kazuph/mcp-obsidian.git
cd mcp-obsidian
npm install
npm run build
调试方式
- 确保 Claude Desktop 已安装并运行。
- 修改 Claude Desktop 配置文件 (
~/Library/Application Support/Claude/claude_desktop_config.json
),添加以下内容:
json
{
"tools": {
"obsidian": {
"args": ["tsx", "/path/to/mcp-obsidian/index.ts"],
"env": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/obsidian/vault"
}
}
}
} - 替换
/path/to/your/obsidian/vault
为您的实际 Obsidian 笔记库路径。