obsidian-mcp-server
obsidian-mcp-server
Obsidian自体の中でMCP(Model Context Protocol)サーバーを実行するミニマルなObsidianプラグインで、Streamable HTTPトランスポートを使用します。4つのツールを公開します:list_notes、read_note、write_note、search_notes。
完全にあなたのマシン上で動作します(127.0.0.1にバインド)— リモートクライアントをそこに向けない限り、データがあなたのPCから出ることはありません(向けるべきではありません)。
このアプローチの理由
ObsidianのデスクトップアプリはElectronベースで、プラグインはNode統合を利用できるため、プラグインは実際のhttp.Serverを開いてMCPと直接通信できます — 外部プロセスも、常時起動しておく別のnpxサーバーも不要です。
Related MCP server: obsidian-mcp
ビルド(Windows)
# 1. Put this folder inside your vault's plugin directory, e.g.:
# <vault>\.obsidian\plugins\obsidian-mcp-server\
cd <vault>\.obsidian\plugins\obsidian-mcp-server
npm install
npm run buildこれによりmanifest.jsonの隣にmain.jsが生成されます。次にObsidianで:設定 → コミュニティプラグイン → 「MCP Server」をオンに切り替えます。MCP server listening on http://127.0.0.1:8123/mcpという通知が表示されるはずです。
ポートを変更したりベアラートークンを設定したりするには、プラグインの設定を開きます。
Claude Desktopへの接続
Claude DesktopのローカルmcpServers設定は、生のURLではなくstdioコマンドを想定しているため、mcp-remoteでHTTPエンドポイントにブリッジします(オンデマンドでnpxインストール、Node.jsが必要):
%APPDATA%\Claude\claude_desktop_config.jsonを編集します:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://127.0.0.1:8123/mcp"]
}
}
}プラグイン設定でベアラートークンを設定した場合は、ヘッダーとして渡します:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": [
"-y", "mcp-remote", "http://127.0.0.1:8123/mcp",
"--header", "Authorization:Bearer YOUR_TOKEN"
]
}
}
}トレイアイコンからClaude Desktopを終了し、起動し直します。4つのObsidianツールを示すツールアイコンが表示されるはずです。
デバッグ
Claude Desktopを使わずに、MCP Inspectorでサーバーを直接テストします:
npx @modelcontextprotocol/inspectorを実行し、http://127.0.0.1:8123/mcpに接続します。Obsidianの開発者コンソール(Ctrl+Shift+I)には、リクエストエラーを含むプラグインからの
console.error出力が表示されます。
拡張
main.tsのbuildMcpServer()にツールを追加します — 例:frontmatter/タグのクエリ用にapp.metadataCacheをラップする、または現在どのノートが開いているかを知るためにapp.workspaceをラップする。各ツールは、名前、zod入力スキーマ、{ content: [...] }を返す非同期ハンドラーだけです。
注記 / 注意点
マニフェスト内の
isDesktopOnly: true— Obsidianモバイルには生のhttpモジュールがないためです。ここでのステートレスなトランスポートモード(リクエストごとに新しい
StreamableHTTPServerTransportを生成)は最も単純なオプションであり、単一のローカルクライアントには十分です。適切なセッション継続性を持つ複数の同時クライアントが必要な場合は、Mcp-Session-Idをキーとするトランスポートマップを追加することになるでしょう — MCP TypeScript SDKの「with session management」の例を参照してください。ベアラートークンは、共有シークレットによる基本的なチェックであり、実際の認証ではありません。サーバーは127.0.0.1にのみバインドするため、主な脅威モデルは「マシン上の他のローカルプロセス」であり、トークンはそれに対処します。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server that exposes Obsidian vault operations over HTTP via the Obsidian CLI, enabling note management, search, and daily note operations.1
- AlicenseAqualityCmaintenanceEnables MCP-compatible AI hosts to read, search, link, and write notes in a local Obsidian vault with sandboxed file access.11MIT
- FlicenseNot gradedqualityBmaintenanceMCP server that exposes an Obsidian vault (search, read, create, and update notes) via Streamable HTTP.
- AlicenseNot gradedqualityCmaintenanceMCP server for interacting with Obsidian via the Local REST API, enabling file operations, search, and content editing in your vault.MIT
Related MCP Connectors
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BartK1990/obsidian-mcp-and-rest'
If you have feedback or need assistance with the MCP directory API, please join our Discord server