MCP 黑曜石
用于与Obsidian集成的模型上下文协议 (MCP)的服务器实现。这允许 AI 助手读取、创建和操作 Obsidian 库中的笔记。
特征
读取 Obsidian 中的活动文件
删除活动文件
在特定位置插入内容(标题、块引用、前言)
将内容附加到文件
打开特定文件
列出保管库中的文件
搜索你的笔记
先决条件
添加到光标
将您的机密放入 .env 文件中
选择命令 MCP 然后输入此命令
安装
克隆此存储库:
git clone https://github.com/gregkonush/mcp-obsidian.git cd mcp-obsidian安装依赖项:
bun install复制示例环境文件并进行配置:
cp .env.example .env
配置
使用您的特定配置编辑.env文件:
用法
启动 MCP 服务器:
服务器将启动并通过标准 I/O 与 MCP 兼容的 AI 助手进行通信。
可用工具
此实现为AI助手提供了以下工具:
get_active_file- 返回当前活动文件的内容delete_active_file- 删除当前活动文件insert_active_file- 修改相对于标题、块引用或前置字段的内容append_active_file- 将内容附加到活动文件的末尾open_file- 在 Obsidian 中打开特定文件search_simple- 搜索与文本查询匹配的文档list_files- 列出你的 Vault 根目录中的文件list_directory_files- 列出保管库特定目录中的文件
发展
项目结构
添加新工具
要添加新工具:
在
src/tools/目录中创建一个新文件使用 MCP SDK 实现该工具
在
src/index.ts中导入并注册该工具
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE.md文件。
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
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-qualityProvides a standardized interface for AI assistants to interact with Obsidian vaults through a local REST API, enabling reading, writing, searching, and managing notes.Last updated -58MIT License
- Asecurity-licenseAqualityA Model Context Protocol server that enables AI assistants to read, write, and manipulate notes in your Obsidian vault through a standardized interface.Last updated -52282ISC License
- -security-license-qualityProvides an MCP server that allows AI assistants to interact with Obsidian vaults, enabling reading/writing notes, managing metadata, searching content, and working with daily notes.Last updated -28MIT License