Skip to main content
Glama
obsidian-mcp

obsidian-mcp

by yanxue06

obsidian-mcp

Предоставьте Claude (и любому MCP-клиенту) полноценный агентский доступ к вашему хранилищу Obsidian — обход графа, запросы Dataview, работа с ежедневными заметками и многое другое.

npm version License: MIT MCP GitHub stars

Установка · Инструменты · Примеры промптов · Сравнение · ЧаВо


Большинство MCP-серверов для Obsidian предоставляют только read_file и write_file, на этом их возможности заканчиваются. Этот сервер рассматривает ваше хранилище как граф знаний — ваша LLM получает доступ к обратным ссылкам, прямым ссылкам, запросам Dataview, ежедневным заметкам и многошаговому обходу графа в рамках одного вызова.

Зачем это нужно

Вы открывали Claude Desktop, просили его найти связи в заметках и наблюдали, как он по очереди «читает» файлы в вашем хранилище. Но пользователи Obsidian думают о своих заметках иначе. Граф и есть ценность — обратные ссылки, транзитивные связи, теги, метаданные Dataview. Этот сервер предоставляет всё это как инструменты первого класса.

Related MCP server: obsidian-mcp-server

Установка

Вам понадобится плагин Local REST API в Obsidian. Установите его из Community Plugins, включите и скопируйте 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-совместимый клиент. Укажите его на npx -y obsidian-mcp с переменной окружения OBSIDIAN_API_KEY.

Из исходного кода

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) для всего, что я написал о распределенных системах. Используй traverse_graph для "Distributed systems.md" с глубиной 2, затем сгруппируй соседей по темам и запиши MOC в файл MOCs/Distributed systems MOC.md.

Найди все заметки с тегом #project, где status != "done" и срок выполнения — на этой неделе. Используй query_dataview.

Что у меня в сегодняшней ежедневной заметке? Есть ли что-то, что я забыл сделать из вчерашней заметки?

Найди все мои «сиротские» заметки в папке Inbox/. Для каждой предложи место, куда её лучше поместить, основываясь на содержании и существующих тегах.

Я переименовываю "Atomic notes.md" в "Evergreen notes.md". Найди все заметки, которые ссылаются на него, и скажи, какие из них мне нужно обновить.

Пройди по графу на 2 шага от "Working memory.md" и скажи, какие заметки наиболее важны для моих размышлений о внимании.

Инструменты

Всего 15 инструментов. Уникальные выделены жирным.

Чтение

Инструмент

Что делает

get_note

Содержимое заметки плюс контекст графа — обратные ссылки, прямые ссылки, теги, frontmatter — в одном вызове.

get_active_note

Заметка, открытая в данный момент в Obsidian.

get_daily_note

Сегодняшняя ежедневная / еженедельная / ежемесячная / ежеквартальная / ежегодная заметка.

list_vault

Все файлы (или файлы в папке), по умолчанию только markdown.

Поиск и граф

Инструмент

Что делает

search_vault

Полнотекстовый поиск или поиск по #тегу со сниппетами.

query_dataview

Выполнение запроса Dataview DQL. Требует установленного плагина Dataview.

traverse_graph

Обход графа на N шагов от заметки (вперед, назад или в обе стороны). Возвращает узлы + ребра.

find_orphans

Заметки без входящих ссылок — забытые идеи, кандидаты на очистку.

find_broken_links

Вики-ссылки, которые не разрешаются. Запускайте перед массовым переименованием.

Запись

Инструмент

Что делает

create_note

Новая заметка, с опциональным frontmatter и автоматически сгенерированным разделом ## Related с [[вики-ссылками]].

update_note

Полная перезапись содержимого заметки.

append_to_note

Добавление markdown в конец заметки.

append_to_daily_note

Популярный сценарий: агент записывает свои действия в сегодняшнюю ежедневную заметку.

patch_note

Вставка контента под конкретный заголовок, блок или поле frontmatter — без перезаписи остального текста.

delete_note

Деструктивное действие — используется только при явном запросе.

Сравнение

obsidian-mcp

Другие MCP-серверы для Obsidian

Obsidian Copilot (плагин)

Обратные ссылки в одном вызове

да

нет

да

Многошаговый обход графа

да

нет

нет

Выполнение 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. Плагин запускает HTTPS-сервер внутри Obsidian с полным доступом к хранилищу; этот сервер адаптирует интерфейс к протоколу MCP и добавляет инструменты, учитывающие структуру графа, которые REST API Obsidian не предоставляет напрямую (обратные ссылки, многошаговый обход, поиск сирот).

Всё работает локально. Никакие данные не покидают ваш компьютер, кроме запросов, которые ваш MCP-клиент отправляет провайдеру модели — и вы это контролируете.

ЧаВо

Нужно ли устанавливать плагин для Obsidian? Да — плагин Local REST API. Это единственный разумный способ взаимодействия с запущенным хранилищем извне. После установки сам obsidian-mcp работает как отдельный процесс Node, запущенный вашим MCP-клиентом; вам не нужно устанавливать дополнительные плагины в Obsidian для этого.

Работает ли это, если Obsidian закрыт? Нет. Local REST API работает внутри Obsidian, поэтому приложение должно быть открыто.

Поддерживаются ли несколько хранилищ? Один экземпляр сервера указывает на один запущенный экземпляр Obsidian. Запустите несколько записей MCP-сервера (разные имена + разные порты), если часто переключаетесь между хранилищами.

Почему HTTPS по умолчанию с OBSIDIAN_VERIFY_TLS=false? Плагин поставляется с самоподписанным сертификатом. Трафик идет только через loopback (127.0.0.1), поэтому проверка сертификата создает лишние сложности без реального выигрыша в безопасности. Если вы заменили сертификат, установите флаг в true.

Это безопасно? MCP-сервер предоставляет модели тот же уровень доступа, который дает API-ключ. Всё, что модель готова удалить, она может удалить. Относитесь к этому как к любому агенту с доступом к записи файлов — проверяйте, что он собирается сделать, особенно перед массовыми операциями.

Дорожная карта

  • [ ] Семантический поиск на основе эмбеддингов (сейчас только поиск по ключевым словам через плагин)

  • [ ] Переключение рабочих областей / маршрутизация между хранилищами

  • [ ] Безопасный режим «только чтение» (инструменты записи не регистрируются)

  • [ ] Подписки на ресурсы (push-обновления при изменении заметок)

  • [ ] Регистрация в Smithery / mcp-get

PR приветствуются. См. 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
      34
      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
      -