
一个轻量级的模型上下文协议(MCP)服务器,使像Cursor和Claude这样的AI助手能够读取和写入你的Obsidian保险库。
概览
一个轻量级的模型上下文协议(MCP)服务器,使像Cursor和Claude这样的AI助手能够读取和写入你的Obsidian保险库。 - “明天为standup创建一个新笔记,描述我今天做的代码修改”(也应该用Git)- “查看我关于项目想法的笔记”- “查看我有哪些与重构相关的待办事项” - 获取Obsidian Vault中所有文件名列表 - 有助于发现可用的文件 2. - 从Obsidian vault检索指定文件内容 - 支持精确文件名、部分文件名或大小写不区分匹配 - 每个文件内容前缀为“# File: filename”以示清晰识别 3. - 从Obsidian vault中的markdown文件中检索所有未完成的待办事项- 查找未勾选的复选框项(包含“- [ ] '行)- 返回它们及其文件位置 1.
概述(AI 翻译)
一个轻量级的模型上下文协议(MCP)服务器,使像Cursor和Claude这样的AI助手能够读取和写入你的Obsidian保险库。
示例互动
- “明天为站立表演创建一个新笔记,描述我今天做的代码更改”(也应该用Git)
- “查看我关于项目创意的笔记”
- “查看我有哪些与重构相关的待办事项”
工具
阅读
- getAllFilenames
- 获取黑曜石保险库中所有文件名的列表
- 有助于发现可用的文件
- readMultipleFiles
- 从Obsidian保险库中检索指定文件的内容
- 支持精确文件名、部分文件名或大小写不区分匹配
- 每个文件内容前缀为“# File: filename”,以便清晰识别
- getOpenTodos
- 从 Obsidian Vault 中的 markdown 文件中检索所有未完成的待办事项
- 查找未勾选的复选框项(包含“- [ ] '的行)
- 返回文件及其文件位置
写
- 更新FileContent
- 更新 Obsidian Vault 中指定文件的内容,添加新的 markdown 内容
- 如果文件不存在,将被创建
本页由 AI 翻译,技术细节请以原文为准。
README
Obsidian MCP Server
A lightweight Model Context Protocol (MCP) server that enables AI assistants like Cursor & Claude to read from and write to your Obsidian vault.
Example Interactions
- “Create a new note for standup tomorrow describing the code changes I’ve made today” (should also use Git)
- “Check my notes about project ideas”
- “Check what todos I have related to refactoring”
Tools
Read
-
getAllFilenames
- Gets a list of all filenames in the Obsidian vault
- Useful for discovering what files are available
-
readMultipleFiles
- Retrieves the contents of specified files from the Obsidian vault
- Supports exact filenames, partial filenames, or case-insensitive matches
- Each file’s content is prefixed with ‘# File: filename’ for clear identification
-
getOpenTodos
- Retrieves all open TODO items from markdown files in the Obsidian vault
- Finds unchecked checkbox items (lines containing '- [ ] ')
- Returns them with their file locations
Write
- updateFileContent
- Updates the content of a specified file in the Obsidian vault with new markdown content
- If the file doesn’t exist, it will be created
- Automatically creates any necessary directories
Install & build
npm install obsidian-mcp-server
npm run build
Integrating with Claude Desktop and Cursor
To use your MCP server with Claude Desktop add it to your Claude configuration:
{
"mcpServers": {
"obsidian": {
"command": "node",
"args": [
"obsidian-mcp-server/build/index.js",
"/path/to/your/vault"
]
}
}
}
For Cursor go to the MCP tab Cursor Settings (command + shift + J). Add a server with this command:
node obsidian-mcp-server/build/index.js /path/to/your/vault
Comparison with Other Solutions
While this implementation is intentionally lightweight, other solutions like jacksteamdev/obsidian-mcp-tools offer a more feature-rich approach as an Obsidian plugin.
This standalone server has the advantage of direct filesystem access without requiring the Obsidian application to be running.
Resources
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"obsidian": {
"command": "node",
"args": [
"obsidian-mcp-server/build/index.js",
"/path/to/your/vault"
]
}
}
}