Skip to main content
Glama

Obsidian MCP

一个 MCP(模型上下文协议)服务器,让 AI 助手(Claude、Cursor 等)能够访问你的 Obsidian 仓库。浏览文件夹、阅读笔记、创建、编辑、移动、重命名和删除笔记——一切都可以在 AI 聊天中完成。

要求

  • Python 3.10+

  • uv(推荐)或 pip

  • 本地机器上的 Obsidian 仓库

Related MCP server: mcp-obsidian

安装

# Clone the repo
git clone https://github.com/your-username/obsidian-mcp
cd obsidian-mcp

# Copy the env template and set your vault path
cp .env.example .env

编辑 .env 并设置你的仓库路径:

OBSIDIAN_VAULT_PATH="/Users/you/Documents/MyVault"

在 Obsidian 中查找你的仓库路径:设置 → 关于 → 仓库路径

运行服务器

开发模式(使用 MCP Inspector UI)

uv run mcp dev server.py

这将在浏览器中打开 MCP Inspector,你可以在其中交互式地测试所有工具。

生产模式

uv run server.py

连接到 Cursor

将此添加到你的 .cursor/mcp.json(或 Cursor 全局 MCP 设置)中:

{
  "mcpServers": {
    "obsidian": {
      "command": "python",
      "args": ["/absolute/path/to/obsidian-mcp/server.py"],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/path/to/your/vault"
      }
    }
  }
}

/absolute/path/to/obsidian-mcp/server.py 替换为你机器上 server.py 的实际路径,并将 /path/to/your/vault 替换为你的仓库路径(在 Obsidian 中查找:设置 → 关于 → 仓库路径)。

连接到 Claude Desktop

将此添加到你的 claude_desktop_config.json 中:

{
  "mcpServers": {
    "obsidian": {
      "command": "uv",
      "args": ["run", "/absolute/path/to/obsidian-mcp/server.py"],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/path/to/your/vault"
      }
    }
  }
}

可用工具

工具

描述

list_folder(folder_path)

列出仓库文件夹中的子文件夹和笔记。留空表示仓库根目录。

read_note(note_path)

读取笔记的完整内容(相对于仓库根目录的路径)。

create_note(note_path, content)

创建新笔记。如有需要,会创建中间文件夹。

update_note(note_path, content)

替换现有笔记的完整内容。

delete_note(note_path)

从仓库中删除笔记。

rename_note(note_path, new_name)

重命名笔记,同时保持其位于同一文件夹中。

move_note(note_path, destination_path)

将笔记移动到其他文件夹。也可以在移动时重命名。如有需要,会创建目标文件夹。

delete_folder(folder_path, recursive)

删除文件夹。使用 recursive=True 可删除包含文件的文件夹。

所有路径均相对于仓库根目录,例如 "Projects/App/roadmap.md"

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides an MCP server that allows AI assistants to interact with Obsidian vaults, enabling reading/writing notes, managing metadata, searching content, and working with daily notes.
    36
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    An MCP server that enables AI assistants to interact with Obsidian vaults by providing tools for note management, full-text search, and link analysis. It supports comprehensive file operations, frontmatter manipulation, and daily note creation while ensuring security through path validation.
    19
    1
  • F
    license
    Not graded
    quality
    D
    maintenance
    A local MCP server that wraps the Obsidian CLI to give AI assistants direct access to read, edit, and manage notes within an Obsidian vault. It enables advanced operations such as frontmatter property management, context-aware searching, and the execution of internal Obsidian commands.
    2

View all related MCP servers

Related MCP Connectors

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

  • Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.

  • An MCP server that gives your AI access to the source code and docs of all public github repos

View all MCP Connectors

Latest Blog Posts

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/DavidBurckhardt/obsidian-mcp'

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