
Obsidian Vault MCP Server
io.github.OleksandrKucherenko由 GitHub 账号 OleksandrKucherenko 发布v1.3.3更新于 Oct 24, 2026
Access Obsidian vaults via Local REST API - read, search, and interact with notes
概览
让助手通过 Obsidian 本地 REST API 读取和搜索 Obsidian 库中的笔记。
- 可以做什么
- 该服务器通过 Obsidian 本地 REST API 将 AI 助手连接到 Obsidian 库。它提供按文件路径获取笔记内容与元数据的工具、对笔记进行关键词搜索的工具,以及语义搜索工具。笔记也可通过 obsidian:// URI 模式作为资源访问。它支持 stdio 和 HTTP 两种传输方式,并可选多 URL 故障转移与健康监控。
- 适用场景
- 当你的笔记存放在 Obsidian 中,并希望助手查找、阅读和总结这些笔记时使用,例如把关于某个主题的所有记录汇总成报告。它适合 Obsidian 正在运行且已启用本地 REST API 插件的本地桌面环境。
- 运行要求
- 需要运行 Obsidian 桌面版并启用本地 REST API 插件,同时通过 API_KEY 提供其 API 密钥。服务器通过 npx 或 Docker 在本地运行;API_URLS(或旧版 API_HOST 与 API_PORT)必须指向该 REST API,且服务器与 Obsidian 之间需要网络连通。HTTP 传输可用 MCP_HTTP_TOKEN 保护。
安装
在 SourceWeft 中
- 打开 控制台中的 Obsidian Vault MCP Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-obsidian
Deployed / Usage
[Ask DeepWiki] [GitHub Stars] [GitHub Forks] [NPM Downloads] [Docker Hub obsidian-mcp] [Docker Hub obsidian-vnc] [License: MIT]
CI/CD Status
[NPM (npmjs.org)] [NPM (GitHub)]
[Docker (GitHub)] [Docker (Docker Hub)]
- mcp-obsidian
MCP Tools & Resources
This MCP server exposes the following tools and resources to AI assistants:
Tools
Resources
Quick Test
Example use-case: "Find all tools in my Obsidian vault for tracking logs and metrics, make a summary report" — the AI searches your vault, finds notes about OpenTelemetry, Datadog, Prometheus, etc., and generates a structured summary.
For other CLI tools (Gemini, OpenCode, Kilo Code, Copilot), see Manual Testing Guide.
Configure MCP
Multi-URL Configuration (Recommended)
Use API_URLS for automatic failover and self-healing. The server tests all URLs in parallel, selects the fastest one, and automatically reconnects on failure.
Self-Healing Features:
- ✅ Parallel URL testing on startup
- ✅ Automatic selection of fastest URL
- ✅ Health monitoring every 30 seconds
- ✅ Automatic failover on connection loss
- ✅ Exponential backoff to prevent thrashing
Available transports:
stdio- Standard input/output (default, best for local MCP clients)http- HTTP JSON-RPC with SSE streaming (best for remote access)
WSL2 Example:
HTTP Transport Configuration
The MCP server supports HTTP transport for remote access with automatic URL failover:
Decoupled Configuration with Authentication
Clients must include the Authorization header:
Stdio Transport Configuration
For local development with stdio transport (default):
-
--rm- Automatically remove the container and its associated anonymous volumes when it exits -
-i, --interactive- Keep STDIN open -
-e, --env- Set environment variables -
--name string- Assign a name to the container -
-p, --publish- Publish container port to host
Legacy Single-URL Configuration
For backward compatibility, you can still use single-URL configuration with API_HOST and API_PORT:
Note: Single-URL configuration does not provide automatic failover or health monitoring. Use API_URLS for production deployments.
Health Endpoint
When HTTP transport is enabled, the server exposes a health check endpoint at /health:
Response:
For comprehensive health status including Obsidian API connection and all transports, you can use the getHealthStatus() function which returns:
CLI Tools Configuration
This section shows how to configure popular AI CLI tools to use the MCP Obsidian server.
Claude Code CLI
Docker:
NPX/Bunx:
Gemini CLI
Docker:
NPX/Bunx:
HTTP Transport (remote server):
List and manage servers:
OpenCode CLI
Create opencode.json in your project root:
Docker:
NPX/Bunx:
HTTP Transport:
Kilo Code CLI
Create .kilocode/mcp.json in your project or ~/.kilocode/cli/global/settings/mcp_settings.json globally:
Docker:
NPX/Bunx:
HTTP Transport:
Codex CLI
Docker:
NPX/Bunx:
GitHub Copilot CLI
Create ~/.copilot/mcp-config.json (or .copilot/mcp-config.json in repo root):
Docker:
NPX/Bunx:
Note: Copilot CLI v0.0.340+ requires ${VAR} syntax for environment variable expansion. Set OBSIDIAN_API_KEY in your shell before running.
Quick Reference
For detailed testing and verification, see Manual Testing Guide.
Setup and Troubleshooting
Setup
- Run Obsidian Desktop Application and enable Local REST API in Settings.
[Obsidian Local REST API Setup]
This setting will allow you to connect to the Local REST API from any network interface (not only localhost, which is critical for WSL2 setup).
-
Copy the API Key from Obsidian Settings; you will need it for the MCP configuration.
-
Verify that the Obsidian Local REST API is running and accessible from your machine.
-
Next Step is always to verify the network setup on your machine (firewall rules, etc).
Verify that the Obsidian REST API is running (Windows Host, MacOS, Linux)
Run in Windows CMD terminal:
Expected REST API response:
WSL2, Docker hosted on Ubuntu
Run inside the WSL2 Ubuntu Terminal:
Verify Windows Firewall
Run GUI and Setup Manual The Rules:
Or Run in Windows PowerShell as Administrator:
Or Run in Windows CMD terminal:
Disable/Enable Firewall
Execute in Windows PowerShell as Administrator:
Verify Connectivity on BusyBox Container
These steps allow us to confirm that the network setup is correct and the container can connect to the Local REST API.
Execute inside the WSL2 Ubuntu terminal:
Dockerized Obsidian
来源:readme.md,提交 ba1c1cd
工具
0版本历史
1- v1.3.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分