obsidian
A MCP Server backend for Obsidian
claude mcp add --transport stdio minhao-zhang-obsidian-mcp-server node path/to/server.js \ --env PORT="8080" \ --env API_KEY="<embedding-provider-api-key-if-needed>" \ --env VAULT_PATH="<path-to-your-vault-or-obsidian-vault>" \ --env EMBEDDING_PROVIDER_URL="<embedding-provider-endpoint-if-needed>"
How to use
This Obsidian MCP Server runs a local SSE-based MCP server that exposes your Obsidian vault to external clients such as AI assistants or scripts. Once started, external tools can connect to the server endpoint (for example, http://localhost:8080/sse) and invoke MCP tools to perform tasks like semantic search, reading or editing files, or navigating your vault. The server indexes your notes into an Orama vector store and uses your configured embedding provider to generate embeddings, enabling powerful semantic queries across your notes. Tools exposed include simple_vector_search for semantic lookup, read_file and list_files for file access, and create/edit/delete operations for basic vault manipulation. The server can be configured to auto-start, and you can tune chunking, exclusions, and embedding provider settings from the Obsidian settings panel. To connect, point your MCP client to the SSE endpoint and issue tool requests (for example, simple_vector_search with a natural language query).
Usage flow:
- Configure: In Obsidian, set the embedding provider details (URL, model, API key), chunking parameters, and file exclusion patterns. Ensure the server port matches your client’s expectations.
- Index Vault: Run Re-index Vault (MCP Server) to populate the vector store. This can take time depending on vault size. A notification will indicate completion.
- Start Server: Start the MCP Server from Obsidian or let auto-start be enabled. The server serves via SSE at the configured port (e.g., http://localhost:8080/sse).
- Connect Client: Point your MCP client to the SSE endpoint and begin issuing tool calls such as simple_vector_search, list_files, read_file, and more. Tools can be enabled/disabled in settings, and a restart is required for changes to take effect.
- Use Tools: The available tools include simple_vector_search for semantic note search, count_entries to verify indexing, list_files to browse your vault, read_file/create_file/edit_file/delete_file for content manipulation, and create_folder/delete_folder for structure management.
How to install
Prerequisites:
- Node.js and npm installed on your system where Obsidian runs.
- Obsidian installed with the Obsidian MCP Server plugin (this repository).
- Optional: a compatible embedding provider (OpenAI, Ollama, or others) configured via the plugin settings.
Installation steps:
- Clone this repository or install via your preferred package manager.
- Install dependencies (run inside the project directory):
- npm install
- Build/prepare the plugin for Obsidian (if applicable):
- npm run build
- Copy or move built plugin assets into your Obsidian vault:
- Copy main.js, manifest.json, and styles.css into your vault's .obsidian/plugins/mcp-server/ directory.
- Open Obsidian, go to Settings > Community Plugins, enable MCP Server, and configure settings (port, embedding provider, exclusions, etc.).
- Start the MCP Server from the Obsidian UI or enable Auto Start if desired. Test the SSE endpoint at http://localhost:8080/sse.
Notes:
- If you are indexing a large vault, indexing may take a while. Ensure you have sufficient resources for the Orama index.
- If you modify tools or capabilities, restart the server to apply changes.
Additional notes
Tips and notes:
- Default endpoint is http://localhost:8080/sse. Change PORT in the environment if needed.
- Exclusion patterns can be copied from your vault’s .gitignore to avoid indexing unwanted files.
- The embedded provider configuration (URL, model, API key) should be kept secure. Do not expose API keys in client-side code.
- If you encounter indexing issues due to 512MB limits in orama.json, reduce the number of notes or chunk size to fit memory constraints.
- After changing MCP Tools in settings, you must restart the server for changes to take effect.
- The server supports multiple languages in the UI based on Obsidian’s language settings (English/Chinese).
- Monitor for security considerations since the server exposes a local endpoint that can be accessed by clients on your machine.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud