
一个安全的 REST API 和模型上下文协议(MCP)服务器用于你的保险库。
概览
通过安全、认证的REST API,让你的脚本、浏览器扩展和AI代理直接进入你的Obsidian保险库。 https://coddingtonbear.github.io/obsidian-local-rest-api/ 通过 或 访问你的保险库——两个接口都暴露了相同的核心能力,因此脚本、浏览器扩展和 AI 代理都说着相同的语言。 - — 对保险库中任何文件(包括二进制文件)进行完整 CRUD - — 针对标题、块引用或前置键,仅添加、前置或替换该部分,而不触及文件其他部分 - — 简单的全文搜索或对笔记元数据(前言、标签、路径、内容)的结构化 JsonLogic 查询 - — 读取或写入 Obsidian 中当前打开的笔记 - 获取或创建每日、每周、每月、季度和年度笔记 - - 触发任何 Obsidian 命令,就像使用命令调色板一样 - 列出保险库中所有标签的使用次数 - 告诉 Obsidian 在其界面中打开特定笔记 - —...
概述(AI 翻译)
通过安全、认证的REST API,让你的脚本、浏览器扩展和AI代理直接进入你的Obsidian保险库。
-
交互式API文档: https://coddingtonbear.github.io/obsidian-local-rest-api/
-
Obsidian 社区页面: https://community.obsidian.md/plugins/obsidian-local-rest-api/
-
你能做的
-
快速入门
- REST API
- MCP 客户端
- 克劳德代码
- Claude Desktop
- 光标
- 其他客户
- API 概述
- 配置文件目录禁止访问
- 认证失败将被限速
- 条件写入
- 浏览器客户端和响应头
- 补丁笔记
- 原始内容模式
- 针对特定区域
- 搜索
- 事件流
- 服务器状态
- MCP(模型上下文协议)
- 协议修订
- 连接客户
- 可用工具
- 二进制文件和附件
- 签名网址
- 可用资源
- API 扩展
- 类型扩展 API
- 主机重新加载后再次注册
- MCP 工具、资源和提示
- 记录你的路线
- 注释下的子资源
- 延伸赛事
- 延展状态
- 已知分机
- 贡献
- 制作人员
你能做什么
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Local REST API with MCP
Give your scripts, browser extensions, and AI agents a direct line into your Obsidian vault via a secure, authenticated REST API.
-
Interactive API docs: https://coddingtonbear.github.io/obsidian-local-rest-api/
-
Obsidian Community page: https://community.obsidian.md/plugins/obsidian-local-rest-api/
What you can do
Access your vault through the REST API or the built-in MCP server — both interfaces expose the same core capabilities, so scripts, browser extensions, and AI agents all speak the same language.
- Read, create, update, or delete notes — full CRUD on any file in your vault, including binary files
- Surgically patch specific sections — target a heading, block reference, or frontmatter key and append, prepend, replace, delete, or move just that section without touching the rest of the file
- Search your vault — simple full-text search or structured JsonLogic queries against note metadata (frontmatter, tags, path, content)
- Follow vault events — subscribe to Obsidian events (a note created, its frontmatter changed, a file opened) as a filtered Server-Sent Events stream
安装
npx mcp-remote@latest https://127.0.0.1:27124/mcp/ --header Authorization: Bearer <your-api-key>配置
{
"mcpServers": {
"obsidian": {
"type": "http",
"url": "https://127.0.0.1:27124/mcp/",
"headers": {
"Authorization": "Bearer <your-api-key>"
}
}
}
}