
stevenstavrakis/obsidian-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Obsidian用のシンプルなMCPサーバー
概要
MCP(モデルコンテキストプロトコル)サーバーで、AIアシスタントがObsidianのボールトとやり取りできるようにし、ノートやタグの読み込み、作成、編集、管理のためのツールを提供します。 このMCPは読み書き権限を持っています(許可すれば)。お願いします。obsidian-mcpでノートを管理する前に、必ずObsidianのVaultをバックアップしてください。gitの使用をおすすめしますが、どんなバックアップ方法でも問題ありません。これらのツールはテスト済みですが十分ではなく、現在開発中です。 - ボールト内のノートの閲覧と検索 - 新しいノートとディレクトリの作成 - 既存ノートの編集 - ノートの移動と削除 - タグの管理(追加、削除、名前変更) - ボールトの内容検索 - Node.js 20以上(低くしても動くかもしれませんが、試していません) - オブシディアン・ヴォールト Claude Desktopの設定に追加: - macOS: ~/ライブラリ/アプリケーションサポート/Claude/claude_desktop_config.json- Windows: %APPDATA%\Claude claude_desktop_config.json /path/to/your/vaultをObsidian Vaultへの絶対パスに置き換えてください。
概要(AI 翻訳)
MCP互換アシスタントが明示的に設定されたObsidianボールトを安全に読み書き・修正できるローカルのModel Context Protocolサーバーです。
バージョン2はデフォルトでMCP 2026-07-28および2025年当時のクライアントをサポートし、Node.js 22以降が必要です。Markdownファイルと直接連携するため、Obsidianは開いている必要はありません。レガシープロトコルおよびv1の位置パス互換性は非推奨となり、stderrへの正確な移行命令を印刷します。
[!重要] MCPクライアントは破壊的なツールを呼び出すことができます。重要なボールトのバックアップ、クライアントの許可プロンプトのレビュー、同時編集ノートの改訂前提条件の使用などが可能です。
クイックスタート
Node.js 22年以降が必要です:
パッケージをグローバルにインストールせずにnpxで実行してください。メジャーバージョンをピン留めることで、将来のメジャーバージョンと自動的に交差することなく、互換性のある2.xアップデートを受け取ります:
MCPクライアントを設定して、同じコマンドをstdio経由で起動させます:
あるいは、パッケージをグローバルにインストールし、"command": "obsidian-mcp"を"serve"から始まる同じ引数で使用する方法もあります:
各ボールトはすでに.obsidianディレクトリを含んでおり、絶対パスで設定する必要があります。
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Obsidian MCP
A local Model Context Protocol server that lets MCP-compatible assistants safely read and modify explicitly configured Obsidian vaults.
Version 2 supports both MCP 2026-07-28 and 2025-era clients by default, and requires Node.js 22 or newer. It works directly with Markdown files, so Obsidian does not need to be open. Legacy protocol and v1 positional-path compatibility are deprecated and print exact migration instructions to stderr.
[!IMPORTANT] MCP clients can invoke destructive tools. Back up important vaults, review client permission prompts, and use revision preconditions for concurrently edited notes.
Quick start
Node.js 22 or newer is required:
node --version # v22 or newer
Run with npx without installing the package globally. Pinning the major version receives compatible 2.x updates without automatically crossing a future major version:
npx -y obsidian-mcp@2 serve --vault notes=/absolute/path/to/vault
Configure an MCP client to launch the same command over stdio:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["-y", "obsidian-mcp@2", "serve", "--vault", "notes=/absolute/path/to/vault"]
}
}
}
Alternatively, install the package globally and use "command": "obsidian-mcp" with the same arguments beginning at "serve":
npm install -g obsidian-mcp@2
Each vault must already contain an .obsidian directory and must be configured using an absolute path.
Both protocol eras are served from the same tool definitions. After confirming that your MCP client negotiates 2026-07-28, you may opt into modern-only mode by adding "--legacy", "reject" to args.
Vault ids use lowercase letters, digits, _, and -, must begin with a letter, and are the values assistants pass to tools. Up to ten vaults may be configured. Repeat --vault to expose more than one vault:
obsidian-mcp serve \
--vault work=/Users/me/Documents/WorkVault \
--vault personal=/Users/me/Documents/PersonalVault
Network, removable, hidden, and synced locations are allowed because an explicit --vault is treated as authorization; the same containment protections apply to every location.
Design principles
- Vault access is explicitly allowlisted at process startup.
- Every tool path is vault-relative, segment-checked, and blocked from symlinks and reserved state.
- File mutations are journaled, conflict-checked, atomically replaced, and rolled back as one transaction.
- The server never listens on a network interface or sends telemetry.
- stdout is reserved exclusively for MCP messages; structured diagnostics go to stderr.
- Results are bounded, paginated where appropriate, and available as both text and structured content.
Tools
| Tool | Purpose |
インストール
npx -y obsidian-mcp@2 serve --vault notes=/absolute/path/to/vault設定
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["-y", "obsidian-mcp@2", "serve", "--vault", "notes=/absolute/path/to/vault"]
}
}
}