The Obsidian MCP server enables AI models to directly access and manipulate Obsidian knowledge bases through the Model Context Protocol, providing tools for reading, creating, updating, and deleting notes, as well as managing folder hierarchies and performing full-text searches across the vault. It offers advanced capabilities including precision editing through heading and block-level targeting, intelligent backlink generation, batch processing of multiple notes, and AI-powered analysis using the TRILEMMA-PRINCIPLES framework. The server solves the problem of integrating AI assistants with local knowledge management systems by providing both a reliable REST API interface and filesystem fallback mechanisms for maximum accessibility.
English | 中文
This project implements a Model Context Protocol (MCP) server for connecting AI models with Obsidian knowledge bases. Through this server, AI models can directly access and manipulate Obsidian notes, including reading, creating, updating, and deleting notes, as well as managing folder structures.
Created by huangyihe
The MCP server provides the following comprehensive tools:
list_notes: List notes in the Obsidian vault with optional folder filtering
recursive parameter: Control whether to list files recursively in subdirectories (default: true)recursive: false to list only files in the specified folder without subdirectoriesread_note: Read the content of a specific note in the Obsidian vaultread_multiple_notes: Read content from multiple notes simultaneously for batch processingcreate_note: Create a new note in the Obsidian vault with full contentdelete_note: Delete a note from the Obsidian vaultsearch_vault: Advanced search across all file types with filename and content matchingmove_note: Move or rename notes to new locations (supports all file types including PDFs)manage_folder: Complete folder CRUD operations (create/rename/move/delete)update_note: Enhanced Update content using text replacements OR precision insertion
^block-id supportauto_backlink_vault: 🔗 Auto Backlink Generation
[[note name]])notes_insight: 🧠 AI-Powered Strategic Analysis ⭐ NEW
Choose the most suitable installation method based on your technical level and usage needs:
| Method | Target Users | Advantages | Disadvantages |
|---|---|---|---|
| 🎯 One-Click Install (DXT) | General users | Simplest, GUI configuration | Requires DXT-enabled client |
| 📦 Remote Install (NPM) | Node.js users | Auto-updates, no installation | Requires network connection |
| 🔧 Local Deploy | Advanced users | Offline use, full control | Manual updates required |
Suitable for: General users who want the simplest installation experience
Download the pre-built extension package: obsidian-mcp.dxt
Double-click the downloaded .dxt file and the system will automatically install the extension. Then fill in the configuration interface:
/Users/username/Documents/MyVault)27123)Suitable for: Node.js developers who want automatic updates and version management
Simply add the following configuration to your MCP client config file:
Using npx (recommended, no pre-installation required):
{
"mcpServers": {
"obsidian-mcp": {
"command": "npx",
"args": [
"@huangyihe/obsidian-mcp"
],
"env": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/vault",
"OBSIDIAN_API_TOKEN": "your_api_token",
"OBSIDIAN_API_PORT": "27123"
}
}
}
}
Note: First run will automatically download the package, subsequent runs use cache, ensuring you always use the latest version.
Suitable for: Users who need customization, advanced control, or offline usage
Step 1: Global Install
npm install -g @huangyihe/obsidian-mcp
Step 2: MCP Client Configuration
{
"mcpServers": {
"obsidian-mcp": {
"command": "obsidian-mcp",
"env": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/vault",
"OBSIDIAN_API_TOKEN": "your_api_token",
"OBSIDIAN_API_PORT": "27123"
}
}
}
}
Step 1: Clone Repository
git clone https://github.com/newtype-01/obsidian-mcp.git
cd obsidian-mcp
Step 2: Install Dependencies
npm install
Step 3: Build Project
npm run build
Step 4: Configure Environment Variables
cp .env.example .env
# Edit .env file with your configuration
Step 5: Start Server
npm start
Using Docker Compose (Recommended)
# Configure environment variables
cp .env.example .env
# Edit .env file
# Start service
docker-compose up -d
Using Docker Command
# Build image
docker build -t obsidian-mcp .
# Run container
docker run -d \
--name obsidian-mcp \
--env-file .env \
--network host \
-v $(OBSIDIAN_VAULT_PATH):$(OBSIDIAN_VAULT_PATH) \
obsidian-mcp
All installation methods require the following configuration:
OBSIDIAN_VAULT_PATH: Path to your Obsidian vaultOBSIDIAN_API_TOKEN: API token for Obsidian Local REST API pluginOBSIDIAN_API_PORT: API port for Obsidian Local REST API (default: 27123)⚠️ Important: For remote NPM installation and global installation, you MUST use the OBSIDIAN_ prefix for environment variables. The variables VAULT_PATH, API_TOKEN without the prefix will not work correctly.
The project includes a test script to verify server functionality:
node test-mcp.js
npm run dev to run the server in development modesrc directoryMIT
Pull Requests and Issues are welcome!
csoai-org/pdf-document-mcp
xt765/mcp-document-converter
io.github.xjtlumedia/markdown-formatter
io.github.ai-aviate/better-notion
suekou/mcp-notion-server
meterlong/mcp-doc