Obsidian MCP REST 服务器
一个 MCP(模型上下文协议)服务器实现,可通过本地 REST API 访问 Obsidian 保险库。该服务器允许 AI 助手通过标准化界面与 Obsidian 笔记进行交互并管理保险库内容。
特征
通过 MCP 访问 Obsidian 保险库内容
阅读和写笔记
列出保管库内容
搜索功能
安全的本地 REST API 集成
兼容 Claude Desktop 和其他 AI 助手
先决条件
Node.js 16 或更高版本
安装并配置了本地 REST API 插件的 Obsidian
启用了本地 REST API 的 Obsidian 保险库
安装
全局安装包:
或者如果您更喜欢使用特定版本/分支:
配置
首先,配置 Obsidian Local REST API 插件:
在 Obsidian 中安装本地 REST API 插件
配置API端口(默认值:27123)
生成并保存 API 密钥
创建配置文件
config.json:
用法
启动服务器:
服务器将启动并通过 stdin/stdout 监听 MCP 请求。
与 Claude Desktop 一起使用
配置 Claude Desktop 以使用此 MCP 服务器:
打开 Claude 桌面设置
导航至 MCP 部分
添加新的服务器配置:
{ "name": "obsidian-mcp", "command": "obsidian-mcp-rest", "args": ["--config", "path/to/config.json"] }
克劳德现在可以通过以下命令访问你的 Obsidian 保险库:
Read note "Projects/MyProject.md" List all notes in "Projects" folder Search for notes containing "typescript"
可用工具
listNotes:列出保管库或特定文件夹中的所有注释readNote:阅读特定注释的内容writeNote:创建或更新注释searchNotes:使用查询字符串搜索笔记getMetadata:获取特定笔记的元数据
安全
服务器仅在本地运行并通过 stdin/stdout 进行通信
所有对 Obsidian REST API 的请求均通过您的 API 密钥进行身份验证
无需外部网络访问
数据保留在您的机器本地
发展
克隆存储库:
安装依赖项:
构建项目:
运行测试:
故障排除
安装问题
如果您遇到任何安装问题,请尝试以下替代方法:
克隆并本地安装:
如果您看到与 TypeScript 相关的错误,请确保 TypeScript 已全局安装:
贡献
欢迎贡献代码!欢迎提交 Pull 请求。对于重大变更,请先提交一个 issue 来讨论您想要修改的内容。
执照
MIT 许可证 - 详情请参阅许可证文件
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
为 AI 助手提供标准化接口,通过本地 REST API 与 Obsidian 保险库进行交互,从而实现读取、写入、搜索和管理笔记。
Related Resources
Related MCP Servers
- -security-license-qualityEnables AI assistants to interact with Obsidian vaults, providing tools for reading, creating, editing and managing notes and tags.Last updated -228545MIT License
 - -security-license-qualityA server implementation that allows AI assistants to read, create, and manipulate notes in Obsidian vaults through the Model Context Protocol.Last updated -6815MIT License
 - Asecurity-licenseAqualityA server that enables AI agents to perform sophisticated knowledge discovery and analysis across Obsidian vaults through the Local REST API plugin, supporting complex multi-step workflows with advanced filtering and full content retrieval.Last updated -318MIT License
 - -security-license-qualityAllows AI models to interact with Obsidian notes through the Local REST API, enabling creation, reading, updating, searching of notes, and Git-based automatic backups.Last updated -338MIT License