Skip to main content
Glama
Obsidian MCP Server

Obsidian MCP Server

by Airgap-fleet

Obsidian MCP Server

用于 Obsidian 仓库操作的 FastMCP 服务器 — 通过 Model Context Protocol 读取、写入、搜索和管理笔记。

功能

  • read_note — 读取笔记,可选解析 frontmatter

  • write_note — 写入笔记,支持 YAML frontmatter

  • list_notes — 列出笔记,支持 glob 过滤和递归

  • search_notes — 在仓库内容中进行正则搜索

  • search_frontmatter — 按 frontmatter 键/值查询笔记

  • get_daily_note — 获取或创建带模板的每日笔记

Related MCP server: Obsidian RAG MCP Server

安装

pip install -e .

使用方法

obsidian-mcp

或在你的 MCP 客户端中配置:

{
  "mcpServers": {
    "obsidian": {
      "command": "obsidian-mcp",
      "env": {
        "OBSIDIAN_MCP_VAULT_PATH": "C:/path/to/vault"
      }
    }
  }
}

配置

环境变量

默认值

描述

OBSIDIAN_MCP_VAULT_PATH

当前目录

Obsidian 仓库根目录路径

OBSIDIAN_MCP_MAX_FILE_SIZE

10MB

操作的最大文件大小

OBSIDIAN_MCP_DEFAULT_ENCODING

utf-8

文本编码

OBSIDIAN_MCP_INDEX_FRONTMATTER

true

解析 YAML frontmatter

OBSIDIAN_MCP_FOLLOW_SYMLINKS

false

跟随符号链接

工具参考

read_note

{
  "path": "Projects/roadmap.md",
  "include_frontmatter": true
}

write_note

{
  "path": "Projects/new-idea.md",
  "content": "# New Idea\n\nDetails here...",
  "frontmatter": { "tags": ["idea", "draft"], "status": "wip" }
}

list_notes

{
  "path": "Projects",
  "glob_pattern": "**/*.md",
  "recursive": true
}
{
  "pattern": "MCP",
  "path": ".",
  "max_results": 50
}
{
  "key": "status",
  "value": "done",
  "operator": "eq"
}

get_daily_note

{
  "date": "2026-08-21",
  "folder": "Daily Notes",
  "create_if_missing": true
}

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables interaction between LLMs and Obsidian vaults through the Model Context Protocol, supporting secure file operations, content management, and advanced search capabilities.
      7,721 npm
      706
      Apache 2.0
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables semantic search and content retrieval from local Obsidian vaults through the Model Context Protocol. It allows AI assistants to query notes by meaning, filter by tags, and access full note content for enhanced knowledge integration.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with Obsidian vaults through vector search, vault indexing, and file monitoring. It provides a standardized interface for searching and managing markdown-based personal knowledge management data within the Model Context Protocol.
      7,721 npm
      1
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI to manage Obsidian notes, including creation, reading, updating, deletion, full-text search, listing with filtering, sorting, and metadata extraction via the Model Context Protocol.
      8
      14 npm
      MIT