Skip to main content
Glama
obsidian-mcp

obsidian-mcp

by yanxue06

obsidian-mcp

Claude(およびあらゆるMCPクライアント)に、Obsidianボルトへの真のエージェントアクセス権(グラフ探索、Dataviewクエリ、デイリーノートの認識など)を提供します。

npm version License: MIT MCP GitHub stars

インストール · ツール · 試すべきプロンプト · 比較 · FAQ


ほとんどのObsidian MCPサーバーは read_file と write_file を提供するだけで終わっています。このサーバーはあなたのボルトをナレッジグラフとして扱います。LLMは、バックリンク、フォワードリンク、Dataviewクエリ、デイリーノート、そしてマルチホップのグラフ探索を単一の呼び出しで実行できます。

なぜこれが必要か

Claude Desktopを開き、ノート内のつながりを見つけるよう依頼すると、read_file を使ってボルト内のノートを1つずつ読み込んでいく様子を目にしたことがあるでしょう。しかし、Obsidianユーザーはノートをそのようには考えていません。グラフこそが価値であり、バックリンク、推移的なつながり、タグ、Dataviewで型付けされたメタデータが重要です。このサーバーは、それらすべてをファーストクラスのツールとして提供します。

Related MCP server: obsidian-mcp-server

インストール

Obsidianで Local REST API プラグインが必要です。コミュニティプラグインからインストールして有効にし、設定からAPIキーをコピーしてください。

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) または %APPDATA%\Claude\claude_desktop_config.json (Windows) に以下を追加します:

{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": ["-y", "obsidian-mcp"],
      "env": {
        "OBSIDIAN_API_KEY": "paste-your-key-here"
      }
    }
  }
}

Claude Desktopを再起動してください。これで完了です。

Claude Code

claude mcp add obsidian -e OBSIDIAN_API_KEY=paste-your-key-here -- npx -y obsidian-mcp

Cursor / Cline / Continue / Zed

MCP互換クライアントであればどれでも動作します。環境変数に OBSIDIAN_API_KEY を設定し、npx -y obsidian-mcp を指定してください。

ソースからインストール

git clone https://github.com/yanxue06/obsidian-mcp.git
cd obsidian-mcp
npm install
npm run build
OBSIDIAN_API_KEY=... node dist/index.js

試すべきプロンプト

サーバーを接続した状態で、Claude Desktopに以下のプロンプトを試してみてください:

分散システムについて書いたすべての内容のコンテンツマップ(MOC)を作成してください。「Distributed systems.md」から traverse_graph を深さ2で使用し、近傍のノートをテーマごとにグループ化して、MOCs/Distributed systems MOC.md に書き出してください。

#project タグが付いており、status != "done" で、期限が今週であるすべてのノートを見つけてください。query_dataview を使用してください。

今日のデイリーノートには何が書かれていますか?昨日のノートからフォローアップし忘れていることはありますか?

Inbox/ 内の孤立したノート(orphan notes)をすべて見つけてください。それぞれの内容と既存のタグに基づいて、どこに分類すべきか提案してください。

「Atomic notes.md」を「Evergreen notes.md」にリネームします。リンクしているすべてのノートを見つけて、更新が必要なものを教えてください。

「Working memory.md」からグラフを2ホップ分探索し、注意(attention)に関する私の考えの中心となっているノートを教えてください。

ツール

合計15個のツールがあります。差別化されたツールは太字で示しています。

読み取り

ツール

説明

get_note

ノートの内容とグラフのコンテキスト(バックリンク、フォワードリンク、タグ、フロントマター)を1回の呼び出しで取得します。

get_active_note

Obsidianで現在フォーカスされているノートを取得します。

get_daily_note

今日のデイリー/ウィークリー/マンスリー/クォータリー/イヤーリーノートを取得します。

list_vault

すべてのファイル(または特定のフォルダ内のファイル)をリストアップします(デフォルトはマークダウンのみ)。

検索とグラフ

ツール

説明

search_vault

全文検索または #tag 検索を行い、スニペットを表示します。

query_dataview

Dataview DQLクエリを実行します。Dataviewプラグインが必要です。

traverse_graph

ノートからNホップ分(前方、後方、または両方)探索します。ノードとエッジを返します。

find_orphans

リンクが1つも存在しないノート(忘れ去られたアイデアや整理候補)を見つけます。

find_broken_links

解決できないWikiリンクを見つけます。一括リネームの前に実行してください。

書き込み

ツール

説明

create_note

新しいノートを作成します。オプションでフロントマターや、[[wiki-links]] の自動生成された ## Related セクションを追加できます。

update_note

ノートの全内容を置き換えます。

append_to_note

ノートの末尾にマークダウンを追記します。

append_to_daily_note

エージェントが今日行ったことをデイリーノートに記録する一般的なパターンです。

patch_note

特定の見出し、ブロック、またはフロントマターフィールドの下に内容を挿入します(他の部分を書き換える必要はありません)。

delete_note

破壊的な操作です。明示的に要求された場合にのみ使用してください。

比較

obsidian-mcp

他のObsidian MCPサーバー

Obsidian Copilot (プラグイン)

1回の呼び出しでバックリンク取得

はい

いいえ

はい

マルチホップグラフ探索

はい

いいえ

いいえ

Dataview DQLの実行

はい

いいえ

部分的

デイリー/定期ノート

はい

いいえ

いいえ

見出し/ブロックへのパッチ

はい

いいえ

いいえ

孤立/リンク切れの検索

はい

いいえ

いいえ

あらゆるMCPクライアントで動作

はい

はい

いいえ (Obsidian専用)

Obsidianプラグインのインストールが必要

Local REST APIのみ

Local REST APIのみ

はい

設定

すべての設定は環境変数経由で行います。MCPクライアントの設定で指定してください。

変数

必須

デフォルト

メモ

OBSIDIAN_API_KEY

はい

—

Local REST APIプラグインの設定から取得。

OBSIDIAN_HOST

いいえ

127.0.0.1

OBSIDIAN_PORT

いいえ

27124 (https) / 27123 (http)

OBSIDIAN_PROTOCOL

いいえ

https

プラグインは自己署名証明書でHTTPSをデフォルトとします。

OBSIDIAN_VERIFY_TLS

いいえ

false

自己署名証明書を置き換えた場合は true に設定してください。

OBSIDIAN_TIMEOUT_MS

いいえ

15000

リクエストごとのタイムアウト時間。

仕組み

┌──────────────┐     stdio (MCP)      ┌──────────────┐    HTTPS     ┌──────────────────┐
│ Claude / IDE │ ───────────────────► │ obsidian-mcp │ ───────────► │  Local REST API  │ ──► Vault
└──────────────┘                      └──────────────┘              │ (Obsidian plugin)│
                                                                    └──────────────────┘

obsidian-mcp は Local REST APIプラグイン 上の薄いレイヤーです。このプラグインはObsidian内でHTTPSサーバーを動かし、ボルトへのフルアクセスを提供します。このサーバーは、そのインターフェースをMCPプロトコルに適応させ、ObsidianのREST APIが直接提供していないグラフ認識ツール(バックリンク、マルチホップ探索、孤立ノート検出など)を追加します。

すべてローカルで完結します。MCPクライアントがモデルプロバイダーに対して行うリクエスト以外、データがマシンから外部へ送信されることはありません。その制御はあなたが行います。

FAQ

Obsidianプラグインをインストールする必要がありますか? はい、Local REST APIプラグインが必要です。外部から実行中のボルトと通信するための唯一の現実的な方法です。インストール後、obsidian-mcp 自体はMCPクライアントによって起動される別のNodeプロセスとして動作するため、Obsidianに追加のプラグインをインストールする必要はありません。

Obsidianが閉じていると動作しませんか? はい。Local REST APIはObsidianの「内部」で動作するため、アプリを開いておく必要があります。

複数のボルトをサポートしていますか? 1つのサーバーインスタンスは、1つの実行中のObsidianインスタンスを指します。頻繁にボルトを切り替える場合は、複数のMCPサーバーエントリ(異なる名前とポート)を実行してください。

なぜ OBSIDIAN_VERIFY_TLS=false でHTTPSがデフォルトなのですか? プラグインには自己署名証明書が同梱されています。通信はループバック(127.0.0.1)のみであるため、検証を行ってもセキュリティ上の実質的なメリットはなく、手間が増えるだけだからです。証明書を置き換えた場合は、フラグを有効にしてください。

これは安全ですか? MCPサーバーは、APIキーが許可する範囲のアクセス権をモデルに与えます。モデルが削除しようとすれば、何でも削除可能です。ファイル書き込み権限を持つ他のエージェントと同様に扱い、特に一括操作の前には、実行しようとしている内容を確認してください。

ロードマップ

  • [ ] 埋め込みベースのセマンティック検索(現在はプラグイン経由のキーワード検索のみ)

  • [ ] ワークスペース切り替え / マルチボルトルーティング

  • [ ] 読み取り専用セーフモード(書き込みツールを登録しない)

  • [ ] リソースサブスクリプション(ノート変更時のプッシュ更新)

  • [ ] Smithery / mcp-get レジストリへの登録

プルリクエストを歓迎します。CONTRIBUTING.md を参照してください。

謝辞

ライセンス

MIT — LICENSE を参照してください。

Available Tools

25 tools
append_to_daily_noteAppend to daily noteB

Append markdown to the current daily (or weekly/etc.) note. Common pattern: agent logs what it just did at the end of the day.

Inputs: content (required), period.

append_to_noteAppend to a noteA

Append markdown to the end of an existing note. Creates the note if it doesn't exist.

Inputs: path (required), content (required).

create_noteCreate a noteA

Create a new note (fails if it already exists unless overwrite is true). Frontmatter is rendered as YAML. Use links to append a wiki-link section at the end. For creating many notes in one call, use create_notes. For idempotent create-or-update writes, use upsert_note.

Inputs: path (required), content, frontmatter, links, +1 more.

create_notesCreate multiple notes in one callA

Create many notes in a single tool call. Designed for bootstrapping a knowledge graph (MOC + topical notes) without paying N round-trips. Each entry follows the same schema as create_note. Per-note errors are reported individually; pass stop_on_error: true to abort on the first failure. Within a batch, later entries also fail if they target a path already created earlier in the same call.

Inputs: notes (required), stop_on_error.

delete_noteDelete a noteA

Delete a note from the vault. Destructive — only call when the user has explicitly asked to remove a file.

Inputs: path (required).

find_orphansFind orphan notesB

Find notes with no incoming links anywhere in the vault. Use to surface forgotten ideas or candidates for cleanup.

Inputs: folder, limit, sample_size.

get_active_noteGet currently open noteA

Return the note the user currently has focused in Obsidian. Useful for 'what am I looking at' style prompts.

Inputs: no named parameters.

get_daily_noteGet daily / periodic noteA

Fetch the user's current daily (or weekly/monthly/etc.) note. Returns content + frontmatter + tags. Requires the Periodic Notes or Daily Notes plugin in the vault.

Inputs: period.

get_noteGet note with graph contextA

Get a note's content plus its graph context: backlinks (who links to it), forward links (who it links to), tags, and frontmatter. Use the include array to control which context is fetched — backlinks are O(vault size) so omit them when unneeded.

Inputs: path (required), include, backlinks_limit.

get_outlineGet a note's heading outlineA

Return the heading structure of a note (level + text + line number). Use this instead of get_note when you only need to navigate to a section of a long note — it's much smaller in tokens.

Inputs: path (required).

get_vault_statsGet vault statisticsA

Get high-level stats about the vault: total notes, total words (sampled), top folders, file extensions. Useful for 'how big is my vault?' / 'where do I write the most?' prompts.

Inputs: sample_size, top_folders.

list_commandsList Obsidian commandsA

List every registered Obsidian command (built-in + plugin) with its id and human name. Use this before run_command to discover what's available — vaults differ based on installed plugins.

Inputs: filter, limit.

list_tagsList all tags in the vaultA

Return every tag used in the vault, with usage counts and a sample of notes per tag. Useful for 'what topics do I write about most?' or as a starting point for organizing.

Inputs: sample_size, min_count, sample_notes_per_tag.

list_vaultList vault filesB

List all files in the Obsidian vault. Use folder to scope to a subdirectory and markdown_only to filter to notes. Prefer this over guessing paths.

Inputs: folder, markdown_only, limit.

move_noteMove or rename a note (with backlink updates)A

Move a note from one path to another, optionally rewriting wiki-links so backlinks keep working. This is the safe way to rename notes — agents should not naively delete + create because that breaks the graph.

Inputs: from (required), to (required), update_backlinks, overwrite.

open_noteOpen a note in Obsidian's UIA

Surface a note in Obsidian's workspace (focuses an existing tab or opens a new one). Great for ending an agent task with 'and here's the result for you to review'.

Inputs: path (required), new_leaf.

patch_noteInsert content at a heading or blockA

Insert content relative to a heading, block reference, or frontmatter field — without rewriting the whole note. Example: append a bullet under '## Tasks' without touching the rest of the page.

Inputs: path (required), content (required), operation (required), target_type (required), +1 more.

query_dataviewRun a Dataview DQL queryA

Run a Dataview DQL query (LIST / TABLE / TASK) against the vault. Requires the Dataview plugin installed in the vault. Powerful for structured questions like 'all notes tagged #project where status != done sorted by due date'.

Inputs: dql (required).

run_commandRun an Obsidian commandA

Execute an Obsidian command by id (e.g. 'editor:toggle-bold', 'app:reload', 'graph:open'). Discover ids with list_commands. This is powerful — it lets the agent trigger any plugin action — so use only commands the user has approved.

Inputs: id (required).

search_vaultSearch the vaultA

Full-text search across all notes. Supports two modes: keyword (fast plain-text) and tag (find notes tagged with #X). For structured queries, use query_dataview.

Inputs: query (required), mode, context_length, limit.

traverse_graphTraverse the vault graphA

Walk the link graph starting from a note. Returns nodes (notes) and edges (links) up to depth hops away. Use direction=both for a neighborhood, forward for what a note depends on, backward for what depends on it. Cap with max_nodes on large vaults.

Inputs: start (required), depth, direction, max_nodes, +1 more.

update_noteReplace a note's contentA

Overwrite a note's full content. Prefer append_to_note or patch_note when only adding to a note — replacing wholesale is destructive.

Inputs: path (required), content (required).

upsert_noteCreate or update a noteA

Create a note if missing, replace it if it exists. Body is always fully replaced. Frontmatter is replaced by default; pass merge_frontmatter: true to keep existing frontmatter keys not specified in this call. Use this when you want an idempotent write — neither create_note (errors on existence) nor update_note (errors when missing) handle that on their own.

Inputs: path (required), content, frontmatter, links, +1 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 25 tools

    Disambiguation4/5

    Most tools target distinct actions, but there is slight overlap between get_note and get_backlinks (backlinks are also in get_note context) and between create_note, update_note, and upsert_note. However, clear descriptions mitigate confusion.

    Naming Consistency5/5

    All tool names follow a consistent snake_case pattern with verb_noun structure (e.g., append_to_note, find_broken_links, list_tags). No mixed conventions or vague verbs.

    Tool Count4/5

    25 tools is at the upper bound but justified for a comprehensive Obsidian MCP server covering notes, vault management, graph navigation, and plugin integration. Each tool earns its place.

    Completeness4/5

    Covers CRUD for notes, batch operations, vault statistics, search, graph analysis, and plugin commands. Minor gap: no dedicated tool to create a daily note (append assumes existing) or manage folders.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      Standalone MCP server for Obsidian vaults - hybrid search (FTS5 + vector + reranking), files in agent-readable form (images, PDFs, canvases, HTML, scripts, data files), Kanban-aware tasks (Tasks-plugin + Dataview formats), structured memory with topic recall, fine-grained read/write tools, and link graph support. Run locally, self-host, or one-click deploy for remote access. OAuth 2.1.
      16
      35
      39
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Connects Claude.ai to your local Obsidian vault for full CRUD access, search, and daily note creation via the Model Context Protocol.
      14
      MIT
    • F
      license
      D
      quality
      D
      maintenance
      Enables Claude Desktop to securely search and retrieve knowledge from an Obsidian vault through a stateless MCP interface, with progressive disclosure and gated write capabilities.
      13
      -