Skip to main content
Glama

Obsidian MCP REST Server

Obsidian MCP REST 服务器

一个 MCP(模型上下文协议)服务器实现,可通过本地 REST API 访问 Obsidian 保险库。该服务器允许 AI 助手通过标准化界面与 Obsidian 笔记进行交互并管理保险库内容。

特征

  • 通过 MCP 访问 Obsidian 保险库内容
  • 阅读和写笔记
  • 列出保管库内容
  • 搜索功能
  • 安全的本地 REST API 集成
  • 兼容 Claude Desktop 和其他 AI 助手

先决条件

  • Node.js 16 或更高版本
  • 安装并配置了本地 REST API 插件的 Obsidian
  • 启用了本地 REST API 的 Obsidian 保险库

安装

全局安装包:

npm install -g PublikPrinciple/obsidian-mcp-rest

或者如果您更喜欢使用特定版本/分支:

npm install -g PublikPrinciple/obsidian-mcp-rest#main

配置

  1. 首先,配置 Obsidian Local REST API 插件:
    • 在 Obsidian 中安装本地 REST API 插件
    • 配置API端口(默认值:27123)
    • 生成并保存 API 密钥
  2. 创建配置文件config.json
{ "obsidian": { "apiKey": "your-api-key-here", "port": 27123, "host": "localhost" }, "server": { "name": "obsidian-mcp", "version": "1.0.0" } }

用法

  1. 启动服务器:
obsidian-mcp-rest --config path/to/config.json
  1. 服务器将启动并通过 stdin/stdout 监听 MCP 请求。

与 Claude Desktop 一起使用

  1. 配置 Claude Desktop 以使用此 MCP 服务器:
    • 打开 Claude 桌面设置
    • 导航至 MCP 部分
    • 添加新的服务器配置:
      { "name": "obsidian-mcp", "command": "obsidian-mcp-rest", "args": ["--config", "path/to/config.json"] }
  2. 克劳德现在可以通过以下命令访问你的 Obsidian 保险库:
    Read note "Projects/MyProject.md" List all notes in "Projects" folder Search for notes containing "typescript"

可用工具

  • listNotes :列出保管库或特定文件夹中的所有注释
  • readNote :阅读特定注释的内容
  • writeNote :创建或更新注释
  • searchNotes :使用查询字符串搜索笔记
  • getMetadata :获取特定笔记的元数据

安全

  • 服务器仅在本地运行并通过 stdin/stdout 进行通信
  • 所有对 Obsidian REST API 的请求均通过您的 API 密钥进行身份验证
  • 无需外部网络访问
  • 数据保留在您的机器本地

发展

  1. 克隆存储库:
git clone https://github.com/PublikPrinciple/obsidian-mcp-rest.git cd obsidian-mcp-rest
  1. 安装依赖项:
npm install
  1. 构建项目:
npm run build
  1. 运行测试:
npm test

故障排除

安装问题

如果您遇到任何安装问题,请尝试以下替代方法:

  1. 克隆并本地安装:
git clone https://github.com/PublikPrinciple/obsidian-mcp-rest.git cd obsidian-mcp-rest npm install npm run build npm install -g .
  1. 如果您看到与 TypeScript 相关的错误,请确保 TypeScript 已全局安装:
npm install -g typescript

贡献

欢迎贡献代码!欢迎提交 Pull 请求。对于重大变更,请先提交一个 issue 来讨论您想要修改的内容。

执照

MIT 许可证 - 详情请参阅许可证文件

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

为 AI 助手提供标准化接口,通过本地 REST API 与 Obsidian 保险库进行交互,从而实现读取、写入、搜索和管理笔记。

  1. 特征
    1. 先决条件
      1. 安装
        1. 配置
          1. 用法
            1. 与 Claude Desktop 一起使用
          2. 可用工具
            1. 安全
              1. 发展
                1. 故障排除
                  1. 安装问题
                2. 贡献
                  1. 执照

                    Related MCP Servers

                    • -
                      security
                      A
                      license
                      -
                      quality
                      Enables AI assistants to interact with Obsidian vaults, providing tools for reading, creating, editing and managing notes and tags.
                      Last updated -
                      598
                      149
                      TypeScript
                      MIT License
                      • Apple
                    • -
                      security
                      A
                      license
                      -
                      quality
                      Provides programmatic search functionality for Obsidian vaults through a REST API interface, allowing external applications to search through notes and retrieve absolute paths to matching documents.
                      Last updated -
                      10
                      Python
                      MIT License
                      • Apple
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A Model Context Protocol server that enables AI assistants to read, write, and manipulate notes in your Obsidian vault through a standardized interface.
                      Last updated -
                      598
                      TypeScript
                      ISC License
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A server implementation that allows AI assistants to read, create, and manipulate notes in Obsidian vaults through the Model Context Protocol.
                      Last updated -
                      1,530
                      1
                      TypeScript
                      MIT License

                    View all related MCP servers

                    MCP directory API

                    We provide all the information about MCP servers via our MCP API.

                    curl -X GET 'https://glama.ai/api/mcp/v1/servers/PublikPrinciple/obsidian-mcp-rest'

                    If you have feedback or need assistance with the MCP directory API, please join our Discord server