home / mcp / obsidian mcp server
Obsidian MCP (Model Context Protocol) Server
Configuration
View docs{
"mcpServers": {
"newtype-01-obsidian-mcp": {
"url": "https://mcp.obsidian.local/mcp",
"headers": {
"OBSIDIAN_API_PORT": "27123",
"OBSIDIAN_API_TOKEN": "your_api_token",
"OBSIDIAN_VAULT_PATH": "<path-to-vault>"
}
}
}
}You can connect AI models to your Obsidian vault using the Obsidian MCP Server. It lets you read, create, update, and organize notes and folders, search across your vault, and gain AI-powered insights while keeping full control over your data.
Install and run the MCP server alongside Obsidian. Once running, configure your MCP client to point to the local server port you set up. You can then use the available MCP endpoints to list notes, read content, create or update notes with precise text operations, manage folders, and perform smart searches. The server also supports auto backlink generation and AI-assisted analyses to help you derive strategic insights from your notes.
Prerequisites: You need Node.js (v16 or higher) and the Obsidian desktop app with the Obsidian Local REST API plugin installed. You will also need to enable and configure the API token and port in the Obsidian plugin.
Choose an installation method that fits your workflow.
{
"mcpServers": {
"obsidian-mcp": {
"command": "obsidian-mcp",
"env": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/vault",
"OBSIDIAN_API_TOKEN": "your_api_token",
"OBSIDIAN_API_PORT": "27123"
}
}
}
}Use the client configuration to run the MCP server via NPX so you donβt have to install globally.
{
"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"
}
}
}
}Choose a local deployment method if you want offline use or full control. You can install globally or run from source, then point your MCP client to the running server.
npm install -g @huangyihe/obsidian-mcp
```
```json
{
"mcpServers": {
"obsidian-mcp": {
"command": "obsidian-mcp",
"env": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/vault",
"OBSIDIAN_API_TOKEN": "your_api_token",
"OBSIDIAN_API_PORT": "27123"
}
}
}
}Clone the project, install dependencies, build, and start the server. Then configure your client to connect to the local port.
git clone https://github.com/newtype-01/obsidian-mcp.git
cd obsidian-mcp
npm install
npm run build
cp .env.example .env
# edit .env with your configuration
npm start
```
```json
{
"mcpServers": {
"obsidian-mcp": {
"command": "npm",
"args": ["start"],
"env": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/vault",
"OBSIDIAN_API_TOKEN": "your_api_token",
"OBSIDIAN_API_PORT": "27123"
}
}
}
}Use Docker Compose or a Docker run command to deploy the MCP server in a container, with environment variables configured for your vault and API access.
# Configure environment variables in a .env file, then start with Docker Compose
cp .env.example .env
docker-compose up -d
```
```bash
# Or build and run directly
docker build -t obsidian-mcp .
docker run -d \
--name obsidian-mcp \
--env-file .env \
--network host \
-v /path/to/your/vault:/path/to/your/vault \
obsidian-mcpConfigure the vault path, API token, and port in your environment. Keep your API token secure and do not expose it in insecure locations. When using remote installation or shared environments, restrict access to the Obsidian vault and rotate tokens periodically.
The server provides comprehensive note and folder management, full-text search, and AI-assisted analysis features. Use the available endpoints to list, read, create, update, delete notes, manage folders, and perform batch operations with progress tracking. Take advantage of intelligent search, precision editing, and backlinking to keep your vault well-organized.
List notes in the Obsidian vault with optional folder filtering. Includes recursive option to traverse subdirectories.
Read the content of a specific note in the vault.
Read content from several notes in a single operation for batch processing.
Create a new note in the vault with full content.
Delete a note from the vault.
Perform an advanced search across file types with filename and content matching.
Move or rename notes, including non-text files like PDFs.
Create, rename, move, or delete folders with full hierarchy support.
Apply text replacements or perform precision insertions (heading-based, block-based) with PATCH-style updates.
Automatically detect note mentions and convert them to wikilinks with dry-run and batch support.
AI-assisted strategic analysis using structured frameworks, topic discovery, and summarization.