
publikprinciple/obsidian-mcp-rest 是从 https://github.com/publikprinciple/obsidian-mcp-rest. 导入的 MCP 服务器候选服务器
概览
publikprinciple/obsidian-mcp-rest 是从 https://github.com/publikprinciple/obsidian-mcp-rest. 导入的 MCP 服务器候选服务器
概述(AI 翻译)
一个MCP(模型上下文协议)服务器实现,通过本地REST API提供对Obsidian保险库的访问。该服务器允许AI助手通过标准化界面与Obsidian笔记交互并管理保险库内容。
特色
- 通过MCP访问Obsidian保险库内容
- 阅读和写笔记
- 列表保险库内容
- 搜索功能
- 安全的本地REST API集成
- 兼容 Claude Desktop 及其他 AI 助手
先修条件
- Node.js 16岁及以上
- 安装并配置本地 REST API 插件的 Obsidian
- 一个启用本地REST API的Obsidian Vault(黑曜石保险库)
安装
全局安装该软件包:
或者如果你更喜欢用某个特定版本/分支:
配置
- 首先,配置 Obsidian Local REST API 插件:
- 在 Obsidian 中安装本地 REST API 插件
- 配置API端口(默认:27123)
- 生成并保存API密钥
- 创建一个配置文件
config.json:
用途
-
启动服务器:
-
服务器将启动并监听MCP请求,通过stdin/stdout。
使用 Claude Desktop
- 配置Claude Desktop以使用该MCP服务器:
- 打开 Claude 桌面设置
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Obsidian MCP REST Server
An MCP (Model Context Protocol) server implementation that provides access to Obsidian vaults through a local REST API. This server allows AI assistants to interact with Obsidian notes and manage vault content through a standardized interface.
Features
- Access Obsidian vault contents through MCP
- Read and write notes
- List vault contents
- Search functionality
- Secure local REST API integration
- Compatible with Claude Desktop and other AI assistants
Prerequisites
- Node.js 16 or higher
- Obsidian with Local REST API plugin installed and configured
- An Obsidian vault with Local REST API enabled
Installation
Install the package globally:
npm install -g PublikPrinciple/obsidian-mcp-rest
Or if you prefer using a specific version/branch:
npm install -g PublikPrinciple/obsidian-mcp-rest#main
Configuration
-
First, configure Obsidian Local REST API plugin:
- Install the Local REST API plugin in Obsidian
- Configure the API port (default: 27123)
- Generate and save an API key
-
Create a configuration file
config.json:
{
"obsidian": {
"apiKey": "your-api-key-here",
"port": 27123,
"host": "localhost"
},
"server": {
"name": "obsidian-mcp",
"version": "1.0.0"
}
}
Usage
- Start the server:
obsidian-mcp-rest --config path/to/config.json
- The server will start and listen for MCP requests via stdin/stdout.
Using with Claude Desktop
-
Configure Claude Desktop to use this MCP server:
- Open Claude Desktop settings
- Navigate to the MCP section
- Add new server configuration:
{ "name": "obsidian-mcp", "command": "obsidian-mcp-rest", "args": ["--config", "path/to/config.json"] }
-
Claude can now access your Obsidian vault through commands like:
Read note "Projects/MyProject.md" List all notes in "Projects" folder Search for notes containing "typescript"
Available Tools
listNotes: List all notes in the vault or a specific folderreadNote: Read the contents of a specific notewriteNote: Create or update a notesearchNotes: Search for notes using a query stringgetMetadata: Get metadata for a specific note
Security
- The server only runs locally and communicates through stdin/stdout
- All requests to Obsidian REST API are authenticated with your API key
- No external network access is required
- Data remains local to your machine
Development
- Clone the repository:
git clone https://github.com/PublikPrinciple/obsidian-mcp-rest.git
cd obsidian-mcp-rest
- Install dependencies:
npm install
- Build the project:
npm run build
- Run tests:
npm test
Troubleshooting
Installation Issues
If you encounter any installation issues, try these alternatives:
- Clone and install locally:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →