Skip to main content
Glama

palace-mcp

Local REST API プラグインを介して Obsidian ボールトを AI アシスタントに公開する MCP サーバーです。

FastMCP で構築されています。エージェントはノートの一覧表示、読み取り、書き込み、検索、削除ができ、さらに Obsidian で現在開いているノートを読み取ることができます。

前提条件

  • Obsidian に Local REST API プラグインがインストールされ、実行されていること

  • Python 3.12 以降

  • uv (推奨) または pip

続行する前に、Obsidian のプラグイン設定から API キーをコピーしてください。

Related MCP server: obsidian-local-mcp

インストール

git clone <repo-url> palace-mcp
cd palace-mcp
uv sync

設定

変数

必須

デフォルト

説明

OBSIDIAN_API_KEY

はい

—

Local REST API プラグインのベアラートークン

OBSIDIAN_HOST

いいえ

127.0.0.1

Obsidian の REST API が待ち受けるホスト

OBSIDIAN_PORT

いいえ

27123

REST API のポート

OBSIDIAN_PROTOCOL

いいえ

http

http または https

PALACE_APPEND_DENY

いいえ

/Context/,/System/,Index.md

append_note がブロックされるカンマ区切りのパス

プラグインの自己署名証明書を使って HTTPS を使用する場合、証明書の検証は自動的にスキップされます。

実行

stdio でサーバーを起動します (MCP クライアントのデフォルトトランスポート):

export OBSIDIAN_API_KEY="your-api-key"
uv run python server.py

または FastMCP 経由:

uv run fastmcp run server.py

Cursor のセットアップ

MCP 設定 (例: ~/.cursor/mcp.json) に追加します:

{
  "mcpServers": {
    "obsidian-palace": {
      "command": "uv",
      "args": ["run", "python", "server.py"],
      "cwd": "/path/to/palace-mcp",
      "env": {
        "OBSIDIAN_API_KEY": "your-api-key-here"
      }
    }
  }
}

保存後、Cursor を再起動するか、MCP サーバーを再読み込みしてください。

ツール

ツール

説明

list_notes

ファイルとフォルダを一覧表示します。サブディレクトリのパスを渡すか、空のままでボールトのルートを指定します。

read_note

ボールト相対パス (例: People/Alice.md) でノートの全内容を読み取ります。

write_note

新しいノートを作成するか、既存のノートを上書きします。

append_note

ノートの末尾にテキストを追加します。存在しない場合はノートを作成します。

search_notes

全文検索を実行し、関連性でランク付けされた一致するファイル名を返します。

active_note

Obsidian で現在開いているノートの内容を返します。

delete_note

ノートを完全に削除します。元に戻せません。注意して使用してください。

追記保護

一部のボールトパスは上書き専用として扱われます。追記すると、1 つのノート内に重複したコンテンツが静かに積み重なり、後から検出しにくくなることがあります。

デフォルトでは、append_note は次のパスに一致する場合に拒否されます:

  • /Context/ (Context フォルダ配下の任意のノート)

  • /System/ (System フォルダ配下の任意のノート)

  • Index.md (Index.md という名前の任意のファイル)

これらのノートを置き換えるには、代わりに write_note を使用してください。PALACE_APPEND_DENY 環境変数で拒否リストを上書きできます。

ライセンス

MIT

Available Tools

7 tools
active_noteA

Return the contents of the note currently open in Obsidian.

Inputs: no named parameters. Returns: result

append_noteA

Append text to the end of a note (creates the note if it doesn't exist).

Inputs: path (required), content (required). Returns: result

delete_noteA

Permanently delete a note. Use with care — this is irreversible.

Inputs: path (required). Returns: result

list_notesA

List files and folders. Pass a subdirectory path, or leave empty for the vault root.

Inputs: directory. Returns: result

read_noteA

Read a note's full contents by vault-relative path, e.g. 'People/Alice.md'.

Inputs: path (required). Returns: result

search_notesA

Full-text search the vault; returns matching filenames ranked by relevance.

Inputs: query (required). Returns: result

write_noteA

Create a new note or OVERWRITE an existing one at the given vault-relative path.

Inputs: path (required), content (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool maps to a distinct file operation: listing, reading, writing, appending, searching, accessing the active note, and deleting. There is no meaningful overlap between tool purposes.

    Naming Consistency4/5

    Most tools follow a clear verb_note pattern: read_note, write_note, append_note, delete_note, and search_notes. The deviations are minor: list_notes uses plural and active_note is adjective_noun, but the overall convention is still predictable.

    Tool Count5/5

    Seven tools is a well-scoped set for an Obsidian vault server. Each tool covers a necessary note operation without unnecessary bloat.

    Completeness4/5

    The core note lifecycle is covered: list, read, write, append, search, and delete. Missing operations like rename, move, or folder management are minor gaps that agents can usually work around by writing to a new path.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides an MCP server that allows AI assistants to interact with Obsidian vaults, enabling reading/writing notes, managing metadata, searching content, and working with daily notes.
      37
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A local MCP server that wraps the Obsidian CLI to give AI assistants direct access to read, edit, and manage notes within an Obsidian vault. It enables advanced operations such as frontmatter property management, context-aware searching, and the execution of internal Obsidian commands.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A lightweight MCP server that enables AI assistants to securely read, create, and modify notes in an Obsidian vault, with support for semantic search and web scraping.
      MIT