Obsidian MCP Server
The Obsidian MCP Server enables AI agents to interact with an Obsidian Vault's Markdown documents, supporting search, retrieval, metadata management, semantic search via local LLMs, and file organization.
Search notes (
vault→search): Keyword-based search with configurable result limits and content excerptsRead specific notes (
vault→read): Retrieve full content of a markdown file by filenameList all documents (
vault→list_all): Get a complete list of all documents in the vaultGet vault stats (
vault→stats): Retrieve file count, initialization state, and vault pathCollect context (
vault→collect_context): Aggregate and synthesize content from multiple notesLoad memory (
vault→load_memory): Load previously saved memory/context from the vaultSemantic (RAG) search (
vault→search_vault_by_semantic): Vector-based semantic search using a local LLM embedding serverIndex vault to vector DB (
vault→index_vault_to_vectordb): Trigger full indexing into a LanceDB vector store, with automatic incremental indexing for file changesGenerate frontmatter properties (
generate_property): Analyze document content and suggest metadata (title, tags, summary, slug, date, aliases, etc.)Write frontmatter properties (
write_property): Add or update key-value properties in a document's frontmatterCreate document with properties (
create_document_with_properties): End-to-end workflow that reads a document, generates AI-based metadata, and writes it backOrganize attachments (
organize_attachments): Scan a markdown file for linked images/attachments, move them to a structured folder (e.g.,images/{Document Title}/), and update links in the document
Enables AI agents to explore and manage local Obsidian vault documents through tools for searching, reading, creating documents with auto-generated frontmatter properties, and organizing attachments by automatically moving linked files to appropriate folders.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Obsidian MCP Serversearch for notes about AI agents and knowledge bases"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Obsidian MCP Server
obsidian-mcp-server is an MCP server that allows AI agents to browse, search, and summarize Markdown documents in an Obsidian Vault.
Beyond simply reading documents, this project provides local hybrid search using transformers.js and includes an interactive CLI AI Agent UI that allows you to chat with your Vault directly from the terminal.
Key Features
🔍 Hybrid Search: Combines keyword search with semantic (vector) search, providing optimal results through RRF (Reciprocal Rank Fusion) and Reranking.
🚀 Zero-Dependency Local AI: Uses
@huggingface/transformersto run embedding and reranking models directly within the Node.js process (no external API server required).💬 Built-in CLI Agent: Provides a terminal-based UI that uses MCP tools to ask questions about Vault content and receive answers. View Details
📦 Token Optimization: Offers various compression modes and output limits to control the AI agent's token usage.
Related MCP server: Obsidian MCP
What You Can Do (MCP Tools)
Integrated Search (
vault,action="search"): Performs keyword and semantic-based searches simultaneously to find highly relevant documents.Read Document (
vault,action="read"): Retrieves the content and metadata of a specific note.List and Stats (
vault,action="list_all"|"stats"): Checks the overall status and file list of the Vault.Collect Context (
vault,action="collect_context"): Generates high-density knowledge packets related to a specific topic.Load Knowledge (
vault,action="load_memory"): Recalls saved memory snapshots.Frontmatter Management (
generate_property|write_property): Generates and applies AI-based metadata.Organize Attachments (
organize_attachments): Automatically moves images within documents to a dedicated folder and updates links.
Installation and Setup
1. Prerequisites
Node.js: v22.0.0 or higher
Obsidian Vault: You must know the absolute path.
2. Install Local AI Models (Required)
To enable semantic search and reranking features, you must download the necessary local models using the command below:
# 로컬 임베딩 및 리랭킹 모델 설치
npx @sunub/obsidian-mcp-server setupOr, if you have already installed the package:
obsidian-mcp-server setupThis command downloads the Xenova/paraphrase-multilingual-MiniLM-L12-v2 (embedding) and Xenova/bge-reranker-base (reranking) models and saves them to the local cache.
3. Environment Variable Setup
Environment Variable | Default | Role | Required |
| — | Absolute path to the Obsidian Vault | Required |
|
| Chat model API endpoint for CLI UI | Required for CLI |
|
| Model name to use for chat | Required for CLI |
|
| Log level ( | Optional |
MCP Client Configuration Example
In each client configuration, modify env.VAULT_DIR_PATH to your own Vault path.
Claude Desktop / Cursor / Copilot
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["-y", "@sunub/obsidian-mcp-server@latest"],
"env": {
"VAULT_DIR_PATH": "/Users/username/Documents/MyVault"
}
}
}
}How Hybrid Search Works
To capture semantic relationships that are difficult to find with traditional keyword search alone, it goes through the following pipeline:
Keyword Search: Extracts exact word matching results via the internal
Indexer.Vector Search: Searches for semantically similar chunks using LanceDB and
transformers.jsembeddings.RRF Fusion: Merges the rankings of both search results using the Reciprocal Rank Fusion algorithm.
Local Reranking: Re-evaluates the merged top results with the
BGE Rerankermodel to determine the final ranking.
If the models are not installed, it automatically operates in keyword-only mode and displays a message in the terminal recommending the execution of npx @sunub/obsidian-mcp-server setup.
Interactive CLI AI Agent UI
This project includes a terminal-based AI chat interface optimized for Obsidian Vault.
Features
RAG Integration: Automatically collects relevant context from the Vault when asked a question and passes it to the LLM.
Real-time Streaming: Renders the LLM's response and "thought process ()" in real-time.
Slash Commands: MCP tools such as
/search,/read, and/indexcan be called directly as commands from the CLI.Multi-MCP Management: Monitors the status and tool list of all connected MCP servers.
How to Run
Run Chat Model Server: Start a server like
llama.cpporOllamain OpenAI-compatible mode.Example:
llama-server -m models/gemma-2-9b-it.Q4_K_M.gguf --port 8080
Run CLI:
# 환경변수와 함께 실행 VAULT_DIR_PATH="/your/vault" LLM_API_URL="http://localhost:8080" npx @sunub/obsidian-mcp-server
Slash Command Help
/search <keyword>: Execute hybrid search/read "filename": Read a specific document/stats: Check Vault status/index: Force re-indexing of the vector DB/tools: View a list of all available MCP tools/help: View help
License
Apache-2.0
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
- Flicense-quality-maintenanceEnables AI assistants to read, write, search, and navigate Obsidian vault notes with support for CRUD operations, full-text search, graph navigation, daily notes, and frontmatter management.3,860
- Alicense-qualityDmaintenanceEnables AI agents to manage Obsidian vaults through full CRUD operations, wikilink management, and section-level manipulation. It supports frontmatter editing, tag-based searching, and automated link updates to maintain vault integrity.MIT
- AlicenseAqualityAmaintenanceMCP server for Obsidian vaults — search, memory, link graph, 23 tools, OAuth-protected. Runs locally via Docker or remotely with Obsidian Sync + OAuth 2.1.23093817MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to search, create, and manage notes in an Obsidian vault via 40+ local tools.5222MIT
Related MCP Connectors
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Appeared in Searches
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/sunub/obsidian-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server