Cover image
Try Now
4 天前

通过黑曜石REST API社区插件与黑曜石互动的MCP服务器

3 years

Works with Finder

7

Github Watches

64

Github Forks

625

Github Stars

MCP server for Obsidian

MCP server to interact with Obsidian via the Local REST API community plugin.

server for Obsidian MCP server

Components

Tools

The server implements multiple tools to interact with Obsidian:

  • list_files_in_vault: Lists all files and directories in the root directory of your Obsidian vault
  • list_files_in_dir: Lists all files and directories in a specific Obsidian directory
  • get_file_contents: Return the content of a single file in your vault.
  • search: Search for documents matching a specified text query across all files in the vault
  • patch_content: Insert content into an existing note relative to a heading, block reference, or frontmatter field.
  • append_content: Append content to a new or existing file in the vault.
  • delete_file: Delete a file or directory from your vault.

Example prompts

Its good to first instruct Claude to use Obsidian. Then it will always call the tool.

The use prompts like this:

  • Get the contents of the last architecture call note and summarize them
  • Search for all files where Azure CosmosDb is mentioned and quickly explain to me the context in which it is mentioned
  • Summarize the last meeting notes and put them into a new note 'summary meeting.md'. Add an introduction so that I can send it via email.

Configuration

Obsidian REST API Key

There are two ways to configure the environment with the Obsidian REST API Key.

  1. Add to server config (preferred)
{
  "mcp-obsidian": {
    "command": "uvx",
    "args": [
      "mcp-obsidian"
    ],
    "env": {
      "OBSIDIAN_API_KEY": "<your_api_key_here>",
      "OBSIDIAN_HOST": "<your_obsidian_host>"
    }
  }
}
  1. Create a .env file in the working directory with the following required variable:
OBSIDIAN_API_KEY=your_api_key_here
OBSIDIAN_HOST=your_obsidian_host

Note: You can find the key in the Obsidian plugin config.

Quickstart

Install

Obsidian REST API

You need the Obsidian REST API community plugin running: https://github.com/coddingtonbear/obsidian-local-rest-api

Install and enable it in the settings and copy the api key.

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json

On Windows: %APPDATA%/Claude/claude_desktop_config.json

Development/Unpublished Servers Configuration
{
  "mcpServers": {
    "mcp-obsidian": {
      "command": "uv",
      "args": [
        "--directory",
        "<dir_to>/mcp-obsidian",
        "run",
        "mcp-obsidian"
      ]
    }
  }
}
Published Servers Configuration
{
  "mcpServers": {
    "mcp-obsidian": {
      "command": "uvx",
      "args": [
        "mcp-obsidian"
      ],
      "env": {
        "OBSIDIAN_API_KEY" : "<YOUR_OBSIDIAN_API_KEY>"
      }
    }
  }
}

Development

Building

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:
uv sync

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-obsidian run mcp-obsidian

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

You can also watch the server logs with this command:

tail -n 20 -f ~/Library/Logs/Claude/mcp-server-mcp-obsidian.log

相关推荐

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • Beria Joey
  • 你的职业规划师,不走弯路就问我。Sponsor:小红书“ ItsJoe就出行 ”

  • Benedikt Ess
  • FindetundanalysiertOnlineProdukteeinschlielichAmazonnachVolumenBewertungenundPreis

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • GeyserMC
  • 与Minecraft客户端/服务器通信的库。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • awslabs
  • AWS MCP服务器 - 将AWS最佳实践直接带入您的开发工作流程的专门MCP服务器

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • appcypher
  • 很棒的MCP服务器 - 模型上下文协议服务器的策划列表

  • GLips
  • MCP服务器向像光标这样的AI编码代理提供FIGMA布局信息

  • idosal
  • 结束幻觉! GITMCP是任何GitHub项目的免费,开源的远程MCP服务器

  • Byaidu
  • PDF科学纸翻译带有保留格式的pdf -基于ai完整保留排版的pdf文档全文双语翻译

    Reviews

    4 (1)
    Avatar
    user_2pmgWDcp
    2025-04-17

    As a loyal user of MCP Obsidian, I can confidently say that it has revolutionized my workflow. Markus Pfundstein has done an incredible job in creating a tool that is both intuitive and powerful. The seamless integration and ease of use make it a must-have for anyone serious about their productivity. Highly recommended! Check it out at https://github.com/MarkusPfundstein/mcp-obsidian.