obsidian
A TypeScript MCP server for Obsidian supporting vault operations, graph analytics, advanced search, and semantic tools.
claude mcp add --transport stdio connorbritain-obsidian-mcp-server npx -y @connorbritain/obsidian-mcp-server \ --env OBSIDIAN_HOST="127.0.0.1" \ --env OBSIDIAN_PORT="27124" \ --env GRAPH_CACHE_TTL="300" \ --env OBSIDIAN_API_KEY="your-api-key-here" \ --env OBSIDIAN_PROTOCOL="https" \ --env OBSIDIAN_VAULT_PATH="/path/to/your/vault" \ --env OBSIDIAN_VAULTS_FILE="path/to/vaults.json" \ --env OBSIDIAN_VAULTS_JSON="JSON string describing vaults" \ --env OBSIDIAN_DEFAULT_VAULT="default-vault-id" \ --env SMART_CONNECTIONS_PORT="your-port-if-used"
How to use
The Obsidian MCP Server provides a TypeScript-based interface to interact with your Obsidian vaults through a collection of tools. It enables core file operations (read, write, append, delete, and listing), access to periodic notes (daily/weekly/monthly) and recent changes, advanced filtering via JsonLogic, graph analytics (orphan detection, centrality, clustering, path finding), and semantic search integration through Smart Connections. You can target multiple vaults by specifying a vaultId with each tool call; if omitted, the server uses the default vault configured via OBSIDIAN_DEFAULT_VAULT or the first vault described in your vaults config. The MCP server exposes a suite of tools such as list_files_in_vault, get_file_contents, put_content, append_content, and delete_file, along with graph and semantic search capabilities, making it suitable for automation, vault analytics, and complex querying across vault data.
How to install
Prerequisites:
- Node.js 18+ installed on your system
- Access to an Obsidian vault with the Local REST API plugin enabled
- Optional: Dataview, Periodic Notes, or Smart Connections plugins depending on features you need
Installation steps:
-
Install the MCP server globally via npm: npm install -g @connorbritain/obsidian-mcp-server
-
Verify installation: ensure the mcp server command is available (e.g., mcp obsidian) or follow the npm package docs for usage.
-
Prepare vault configuration. Create an environment configuration (see mcp_config example) providing API keys, vault path, and any vaults JSON/file if using multi-vault mode.
-
Run the MCP server using your preferred runner (e.g., npx or local build as described in the README): npx -y @connorbritain/obsidian-mcp-server
-
If developing from source, clone the repo and build: git clone https://github.com/ConnorBritain/obsidian-mcp-server.git cd obsidian-mcp-server npm install npm run build
Then run the built server as configured in mcp_config
Additional notes
Tips and notes:
- Multi-vault support requires careful port management. Each vault’s Local REST API must listen on a unique port; update OBSIDIAN_VAULTS_JSON or OBSIDIAN_VAULTS_FILE accordingly.
- The OBSIDIAN_API_KEY, OBSIDIAN_HOST, OBSIDIAN_PORT, and OBSIDIAN_VAULT_PATH variables drive connectivity to the Obsidian Local REST API; use OBSIDIAN_VAULTS_JSON or OBSIDIAN_VAULTS_FILE to manage multiple vaults.
- If you encounter 401 Unauthorized during vault tests, verify the API key in your vault configuration matches what the Local REST API plugin expects.
- The patch_content tool is currently disabled due to an API issue; use append_content or put_content for modifications.
- When using the MCP client in npx mode, you can provide a JSON config with env vars to tailor per-vault behavior.
Related MCP Servers
obsidian
Obsidian Knowledge-Management MCP (Model Context Protocol) server that enables AI agents and development tools to interact with an Obsidian vault. It provides a comprehensive suite of tools for reading, writing, searching, and managing notes, tags, and frontmatter, acting as a bridge to the Obsidian Local REST API plugin.
zettelkasten
A Model Context Protocol (MCP) server that implements the Zettelkasten knowledge management methodology, allowing you to create, link, explore and synthesize atomic notes through Claude and other MCP-compatible clients.
mcp-memory-libsql
🧠 High-performance persistent memory system for Model Context Protocol (MCP) powered by libSQL. Features vector search, semantic knowledge storage, and efficient relationship management - perfect for AI agents and knowledge graph applications.
mcp-dock
A cross-platform MCP Server manager for Cursor, Claude, Windsurf, Zed & TRAE. Features one-click installation, multi-client sync, and a curated registry of Official & Smithery servers.
mcp-obsidian
simple mcp server for interacting with local obsidian notes
obsidian
MCP server for Obsidian vault management - enables Claude and other AI assistants to read, write, search, and organize your notes