概要
What is OBSIDIAN-MCP-SERVER?
OBSIDIAN-MCP-SERVER is a Model Context Protocol (MCP) Stdio server that allows LLM agents to interact with Obsidian. It provides Python‑based functions for managing Obsidian vaults and files.
How to use OBSIDIAN-MCP-SERVER?
Clone the repository, create a Python virtual environment, install dependencies from requirements.txt, set the OBSIDIAN_VAULT_PATH environment variable to your Obsidian vault path, and run python main.py. You can then invoke JSON‑RPC methods (e.g., create_vault, list_vaults, write_vault_file) via stdio. For Cursor, add a configuration entry with the command pointing to your virtual environment’s Python and the script’s file path.
Key features of OBSIDIAN-MCP-SERVER
- Create, delete, list, and inspect Obsidian vaults
- Change vault settings
- List, write, and delete files inside a vault
Use cases of OBSIDIAN-MCP-SERVER
- An LLM agent automatically creates and populates new Obsidian vaults.
- An agent reads or updates notes in an existing vault.
- An agent organizes vault files by listing and deleting them.
FAQ from OBSIDIAN-MCP-SERVER
What environment variable must I set?
You must set OBSIDIAN_VAULT_PATH to the path of your Obsidian vault.
What transport does the server use?
It uses the stdio transport.
What error codes are defined?
Common error codes include:
-32000 (general error), -32001 (vault not found), -32002 (vault already exists), -32003 (file not found), -32004 (path not found), -32005 (config file not found), -32006 (invalid config), -32007 (file operation error), -32008 (invalid request), -32009 (environment variable error), -32010 (Obsidian directory error).
Can I set a custom path when creating a vault?
Yes, the create_vault method accepts an optional path parameter.