LO

leonezz/obsidian-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

5 stars 4 forks 品質 74 トレンド 27MIT

This plugin runs a local server inside Obsidian. It allows external AI tools (like Claude Desktop, Cursor, or CLI agents) to connect to Obsidian, read your active context, and perform actions...

概要

This plugin runs a local server inside Obsidian. It allows external AI tools (like Claude Desktop, Cursor, or CLI agents) to connect to Obsidian, read your active context, and perform actions directly within the app. * get_active_file lets the agent see exactly what you are working on. * read_note, get_note_metadata, get_backlinks, and describe_vault provide full vault visibility. * create_note, edit_note, append_note, patch_note, rename_note, and delete_note allow agents to manage your notes. * read_attachment returns images as MCP ImageContent (AI can see them); add_attachment saves binary files to the vault. * search_notes filters by date/tags/frontmatter; search_content does full-text or regex search with line-number snippets and optional metadata. * append_daily_note works with your Daily Notes settings (creates/appends correctly). * list_folder (with sorting, filtering, recursion), list_all_tags, list_recent_notes, and create_folder help agents explore and organize the vault.

README

以下は原文 README の抜粋です。原文を見る。

Obsidian MCP Server

Give your AI Agents a seat at the table.

This plugin runs a local Model Context Protocol (MCP) server inside Obsidian. It allows external AI tools (like Claude Desktop, Cursor, or CLI agents) to connect to Obsidian, read your active context, and perform actions directly within the app.

⚠️ Status: Beta (Production Ready Logic).

Features

  • Context Awareness: get_active_file lets the agent see exactly what you are working on.
  • Vault Access: read_note, get_note_metadata, get_backlinks, and describe_vault provide full vault visibility.
  • Note Management: create_note, edit_note, append_note, patch_note, rename_note, and delete_note allow agents to manage your notes.
  • Attachment Handling: read_attachment returns images as MCP ImageContent (AI can see them); add_attachment saves binary files to the vault.
  • Search: search_notes filters by date/tags/frontmatter; search_content does full-text or regex search with line-number snippets and optional metadata.
  • Quick Capture: append_daily_note works with your Daily Notes settings (creates/appends correctly).
  • Discovery: list_folder (with sorting, filtering, recursion), list_all_tags, list_recent_notes, and create_folder help agents explore and organize the vault.
  • Session Tracking: list_sessions shows active connections with client name/version and per-session tool usage stats.
  • Usage Statistics: Track tool call counts (total/successful/failed) in Settings, with persistent storage.
  • Secure: Uses a local Auth Token with timing-safe comparison. Authentication can be disabled for local development.
  • Access Control: Blacklist paths and tags to keep sensitive notes private.

Architecture

  • Transport: Streamable HTTP.
  • Endpoint: http://localhost:/mcp
  • Security: Bearer Token Authentication (enabled by default, can be disabled in settings).

Available Tools

Tool Description
get_active_file Get the content and metadata of the currently active note
read_note Read a note by vault-relative path
create_note Create a new note at a given path (auto-creates parent folders, prevents overwriting)
edit_note Replace entire content of an existing note
append_note Append or prepend text to an existing note
patch_note Find-and-replace edit on a note (no full rewrite needed)
rename_note Rename or move a note (Obsidian auto-updates wikilinks)
delete_note Delete a note by path
read_attachment Read a binary attachment — images returned as ImageContent (AI can see them)
add_attachment Save a base64-encoded file to the vault (respects Obsidian’s attachment folder setting)
get_note_metadata Get frontmatter, tags, headings, links without full content
get_backlinks Get incoming links (backlinks) to a note
GitHub で README 全文を見る

インストール

npx mcp-remote http://localhost:27123/mcp --header Authorization: Bearer YOUR_TOKEN
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "obsidian": { "type": "http", "url": "http://localhost:27123/mcp", "headers": { "Authorization": "Bearer YOUR_TOKEN" } } } }