Obsidian の MCP サーバー
ローカル REST API コミュニティ プラグインを介して Obsidian と対話するための MCP サーバー。
コンポーネント
ツール
サーバーは Obsidian と対話するための複数のツールを実装しています。
- list_files_in_vault: Obsidian の金庫のルートディレクトリにあるすべてのファイルとディレクトリを一覧表示します
- list_files_in_dir: 特定のObsidianディレクトリ内のすべてのファイルとディレクトリを一覧表示します
- get_file_contents: ボールト内の 1 つのファイルの内容を返します。
- 検索: 指定されたテキストクエリに一致する文書を保管庫内のすべてのファイルから検索します。
- patch_content: 見出し、ブロック参照、または frontmatter フィールドを基準にして、既存のノートにコンテンツを挿入します。
- append_content: ボールト内の新規ファイルまたは既存のファイルにコンテンツを追加します。
- delete_file: 保管庫からファイルまたはディレクトリを削除します。
プロンプトの例
まずクロードにObsidianを使うように指示すると良いでしょう。そうすれば、常にそのツールが呼び出されます。
使用プロンプトは次のようになります:
- 最後のアーキテクチャコールノートの内容を取得して要約する
- Azure CosmosDb が言及されているすべてのファイルを検索し、それが言及されているコンテキストを簡単に説明してください
- 前回の会議の議事録を要約し、「summary meeting.md」という新しいメモを作成してください。メールで送れるように、紹介文を追加してください。
構成
Obsidian REST API キー
Obsidian REST API キーを使用して環境を構成する方法は 2 つあります。
- サーバー設定に追加(推奨)
- 次の必須変数を含む
.env
ファイルを作業ディレクトリに作成します。
注: キーは Obsidian プラグイン設定で見つかります。
クイックスタート
インストール
オブシディアン REST API
Obsidian REST API コミュニティ プラグインを実行する必要があります: https://github.com/coddingtonbear/obsidian-local-rest-api
設定でインストールして有効にし、API キーをコピーします。
クロードデスクトップ
MacOSの場合: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows の場合: %APPDATA%/Claude/claude_desktop_config.json
発達
建物
配布用のパッケージを準備するには:
- 依存関係を同期し、ロックファイルを更新します。
デバッグ
MCPサーバーはstdio経由で実行されるため、デバッグが困難になる場合があります。最適なデバッグ環境を実現するには、 MCP Inspectorの使用を強くお勧めします。
次のコマンドを使用して、 npm
経由で MCP Inspector を起動できます。
起動すると、ブラウザでアクセスしてデバッグを開始できる URL がインスペクタに表示されます。
次のコマンドでサーバー ログを監視することもできます。
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
ローカル REST API コミュニティ プラグインを介して Obsidian と対話するための MCP サーバー。
Related MCP Servers
- -securityAlicense-qualityThis MCP server allows you to connect MCP clients with Toolhouse's tools.Last updated -8PythonMIT License
- -securityAlicense-qualityA local MCP server that enables AI applications like Claude Desktop to securely access and work with Obsidian vaults, providing capabilities for reading notes, executing templates, and performing semantic searches.Last updated -60TypeScriptMIT License
- AsecurityAlicenseAqualityAn MCP server that enables posting messages to Discord webhooks, allowing customization of content, username, and avatar URL.Last updated -10JavaScriptMIT License
- -securityAlicense-qualityA framework to use with AI to easily create a server for any service. Just drop the API Documentation in it and ask to create the MCP.Last updated -4TypeScriptMIT License