经 AI Skill Hub 精选评估,obsidian-local-rest-api MCP工具 获评「强烈推荐」。已获得 2.2k 颗 GitHub Star,这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.2 分,适合有一定技术背景的用户使用。
为Obsidian笔记库提供安全的REST API和MCP服务器。支持远程访问vault数据,集成AI模型上下文协议,适合开发者构建笔记自动化工具和AI应用。
obsidian-local-rest-api MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
为Obsidian笔记库提供安全的REST API和MCP服务器。支持远程访问vault数据,集成AI模型上下文协议,适合开发者构建笔记自动化工具和AI应用。
obsidian-local-rest-api MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/coddingtonbear/obsidian-local-rest-api
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"obsidian-local-rest-api-mcp--": {
"command": "npx",
"args": ["-y", "obsidian-local-rest-api"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 obsidian-local-rest-api MCP工具 执行以下任务... Claude: [自动调用 obsidian-local-rest-api MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"obsidian-local-rest-api_mcp__": {
"command": "npx",
"args": ["-y", "obsidian-local-rest-api"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
After installing and enabling the plugin, open Settings → Local REST API to find your API key and certificate.
Give your scripts, browser extensions, and AI agents a direct line into your Obsidian vault via a secure, authenticated REST API.
```sh
| Endpoint | Methods | Description |
|---|---|---|
/vault/{path} | GET PUT PATCH POST DELETE | Read, write, or delete any file in your vault |
/active/ | GET PUT PATCH POST DELETE | Operate on the currently open file |
/search/simple/ | POST | Full-text search across all notes |
/search/ | POST | Structured search via JsonLogic |
/commands/ | GET | List available Obsidian commands |
/commands/{commandId}/ | POST | Execute a command |
/tags/ | GET | List all tags with usage counts |
/open/{path} | POST | Open a file in the Obsidian UI |
/ | GET | Server status and authentication check |
/mcp/ | GET POST | MCP (Model Context Protocol) server — connect AI agents directly to your vault |
For full request/response details, see the interactive docs.
curl -k -X PATCH \ -H "Authorization: Bearer <your-api-key>" \ -H "Operation: append" \ -H "Content-Type: text/markdown" \ --data "- $TEMPLATED_CONTENT" \ https://127.0.0.1:27124/vault/notes/daily.md/heading/Log ```
A text/* body is the content carrier, an application/json body the value carrier, and no body at all carries nothing (a delete, or a move via a Destination header). Target-Scope, Within (the instruction's within index as a plain integer, e.g. -1), Create-Target-If-Missing, Reject-If-Content-Preexists, and If-Match headers round out the instruction. See the interactive docs for the header encodings and the full details.
Already using the older header-driven PATCH format? It spread the instruction across request headers instead of a JSON body, and is deprecated and will be removed in 6.0. It still works — sendMarkdown-Patch-Version: 1to opt back into it (the same header also selects the legacy::-joined document map on GET), and responses served by it carry aDeprecation: true; sunset-version="6.0"header. To upgrade, drop that header and move each header into the JSON body; the interactive docs have the field-by-field mapping table.
See the interactive docs for the full instruction schema and options.
Other plugins can register their own authenticated routes, public routes, and MCP tools against this plugin's server. See Adding your own API Routes via an Extension for a walkthrough.
Install this package as a development dependency to get getAPI and the types for everything it returns:
npm install --save-dev obsidian-local-rest-api
This package declares obsidian, zod, and @types/express as peer dependencies, because its types refer to all three — addRoute returns express's IRoute, and addMcpTool takes zod schemas. npm installs peers for you; if you pin them yourself, keep them resolvable. Without them, TypeScript quietly widens those positions to any instead of reporting an error, so a project that suppresses the missing-types diagnostic gets no warning that it has lost type checking exactly where it matters most.
import { getAPI, type LocalRestApiPublicApi } from "obsidian-local-rest-api";
const api: LocalRestApiPublicApi | undefined = getAPI(this.app, this.manifest, 2);
The package entry point is a small standalone module — it resolves the running host plugin out of Obsidian's plugin registry rather than pulling the plugin bundle into your build. Passing an extension API version (2 above) makes getAPI throw ApiVersionUnsupportedError when the installed host is older than the surface you need; omit it to accept whatever is installed and feature-detect yourself. getAPI returns undefined when the plugin isn't installed or hasn't loaded yet.
publicApi.d.ts is generated from src/publicApi.ts, which the implementation is compile-time-checked against, so the published types cannot drift from what the plugin actually offers.
高质量MCP实现,填补Obsidian与AI应用集成的空白。代码活跃维护,设计理念先进。开发者友好,文档齐全。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:obsidian-local-rest-api MCP工具 的核心功能完整,质量优秀。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | obsidian-local-rest-api |
| 原始描述 | 开源MCP工具:A secure REST API and Model Context Protocol (MCP) server for your vault.。⭐2.2k · TypeScript |
| Topics | REST APIMCP服务器Obsidian笔记自动化TypeScript |
| GitHub | https://github.com/coddingtonbear/obsidian-local-rest-api |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-16 · 更新时间:2026-05-19 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端