Provides automatic backup functionality through Git, automatically committing changes to notes when they are modified.
Enables automatic synchronization of Obsidian vault contents to GitHub repositories as a backup solution.
Supports creating and editing content in Markdown format, including structured articles with frontmatter for metadata.
Runs on Node.js platform (version 18+) for executing the MCP server functionality.
Allows creation, reading, updating, and deletion of notes in Obsidian, with support for Daily Notes, structured content creation, and search capabilities through the Local REST API plugin.
Obsidian MCP Server
ObsidianをAIから操作するためのMCP (Model Context Protocol) サーバーです。 Obsidian Local REST APIを使用してノートの作成・更新・検索を行い、Git連携により自動的にバックアップを行います。
🚀 機能
- ノート管理
- 新規ノートの作成
- 既存ノートの読み取り・更新・削除
- フォルダ内のノート一覧取得
- Daily Note連携
- 今日のDaily Noteへの追記
- タイムスタンプ付き記録
- 検索機能
- キーワードによるノート検索
- 検索結果の件数制限
- Git自動同期
- 変更時の自動コミット
- GitHubへの自動プッシュ
- 構造化コンテンツ作成
- 記事作成(フロントマター付き)
- テンプレートからの作成
- カテゴリー・タグ管理
📋 前提条件
- Obsidian
- Local REST API プラグインがインストール・有効化されていること
- APIキーが生成されていること
- Git (自動同期を使用する場合)
- Vaultディレクトリがgitリポジトリとして初期化されていること
- リモートリポジトリが設定されていること
- Node.js
- バージョン18以上
🛠️ セットアップ
1. Obsidianの設定
- Obsidianを開き、設定 → コミュニティプラグイン → ブラウズ
- "Local REST API"を検索してインストール
- プラグインを有効化
- Local REST APIの設定を開き、"Copy API Key"でAPIキーをコピー
2. Vault のGit設定(オプション)
3. MCPサーバーのインストール
4. Claude Codeへの登録
Windows 11 + WSL2環境の場合
重要な設定ポイント:
OBSIDIAN_API_URL
: WSL2からWindows側のObsidianに接続するため、Windows側のIPアドレスを使用- IPアドレスは
ip route | grep default | awk '{print $3}'
で確認
- IPアドレスは
- Obsidianの設定で Binding Host を
0.0.0.0
に変更(デフォルトは127.0.0.1) - HTTPS自己署名証明書を使用しているため、MCPサーバーは証明書検証をスキップします
通常のLinux/Mac環境の場合
🔧 環境変数
変数名 | 説明 | デフォルト値 |
---|---|---|
OBSIDIAN_API_URL | Obsidian Local REST APIのURL | http://localhost:27123 |
OBSIDIAN_API_KEY | ObsidianのAPIキー | (必須) |
VAULT_PATH | ObsidianのVaultパス | (Git同期時は必須) |
GIT_AUTO_SYNC | Git自動同期の有効/無効 | false |
LOG_LEVEL | ログレベル | info |
📝 使用例
Claude Codeでの使用例
1. 新規ノート作成
2. Daily Noteへの追記
3. ノート検索
4. 週次レポート作成
5. 構造化記事の作成
🛡️ 利用可能なツール
createNote
新しいノートを作成します。
パラメータ:
title
(必須): ノートのタイトルcontent
(必須): ノートの内容(Markdown形式)folder
(オプション): 保存先フォルダ(デフォルト: "Notes")
appendToDaily
今日のDaily Noteに内容を追記します。
パラメータ:
content
(必須): 追記する内容timestamp
(オプション): タイムスタンプを付けるか(デフォルト: true)
searchNotes
ノートを検索します。
パラメータ:
query
(必須): 検索クエリlimit
(オプション): 最大結果数(デフォルト: 10)
readNote
ノートの内容を読み取ります。
パラメータ:
path
(必須): ノートのパス
updateNote
既存のノートを更新します。
パラメータ:
path
(必須): ノートのパスcontent
(必須): 新しい内容
deleteNote
ノートを削除します。
パラメータ:
path
(必須): ノートのパス
listNotes
フォルダ内のノート一覧を取得します。
パラメータ:
folder
(オプション): フォルダパス(デフォルト: "/")
createArticle
構造化された記事を作成します。
パラメータ:
title
(必須): 記事タイトルcategory
(必須): カテゴリーcontent
(必須): 記事内容tags
(オプション): タグの配列draft
(オプション): 下書きフラグ(デフォルト: true)
createFromTemplate
テンプレートからノートを作成します。
パラメータ:
templateType
(必須): テンプレートタイプ(article, weeklyReport, projectDoc)title
(必須): タイトルcategory
(オプション): カテゴリー(記事の場合)
🧪 開発
📄 ライセンス
MIT
🤝 貢献
プルリクエストを歓迎します!大きな変更の場合は、まずissueを作成して変更内容について議論してください。
This server cannot be installed
Allows AI models to interact with Obsidian notes through the Local REST API, enabling creation, reading, updating, searching of notes, and Git-based automatic backups.
Related MCP Servers
- -securityAlicense-qualityAllows the AI to read from your local Apple Notes database (macOS only)Last updated -56PythonMIT License
- -securityAlicense-qualityEnables AI assistants to interact with Obsidian vaults, providing tools for reading, creating, editing and managing notes and tags.Last updated -598149TypeScriptMIT License
- -securityAlicense-qualityProvides a standardized interface for AI assistants to interact with Obsidian vaults through a local REST API, enabling reading, writing, searching, and managing notes.Last updated -37TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables AI assistants to read, write, and manipulate notes in your Obsidian vault through a standardized interface.Last updated -598TypeScriptISC License