home / mcp / enhanced obsidian mcp server
Provides Obsidian MCP server with 25 AI-powered tools for note management, analysis, and knowledge graph generation.
Configuration
View docs{
"mcpServers": {
"jianruidutong-obsidian-mcp": {
"command": "npx",
"args": [
"-y",
"@jianruidutong/obsidian-mcp"
],
"env": {
"OBSIDIAN_API_PORT": "27123",
"OBSIDIAN_API_TOKEN": "your_api_token",
"OBSIDIAN_VAULT_PATH": "/path/to/your/vault"
}
}
}
}You operate the Enhanced Obsidian MCP Server, a bridge between AI models and your Obsidian knowledge base. It exposes 25 powerful tools for managing notes, organizing folders, analyzing content, and building intelligent links and knowledge graphs, all through a flexible MCP interface you can integrate with your preferred client.
You connect to the MCP server from an MCP client and issue operations that span reading, creating, updating, and organizing notes, extracting keywords, generating summaries, linking related notes, and visualizing your knowledge graph. Use the client to perform batch operations, search across your vault, and let the AI tools suggest tags, templates, and connections to accelerate your workflow.
Prerequisites you need before starting are Node.js (v16 or higher) and Obsidian with the Local REST API plugin enabled.
Then choose one of these installation methods and follow the steps exactly as shown.
# Option 1: NPM Installation (Recommended)
# Install globally
npm install -g @jianruidutong/obsidian-mcp
# Or run with npx without installation
npx @jianruidutong/obsidian-mcp
# Option 2: From Source
git clone https://github.com/jianruidutong/obsidian-mcp.git
cd obsidian-mcp
npm install
npm run build
npm start
# Option 3: Docker Installation
git clone https://github.com/jianruidutong/obsidian-mcp.git
cd obsidian-mcp
cp .env.example .env
# Edit .env with your vault settings
docker-compose up -dConfigure the MCP client according to how you started the server. If you run via npx, you will typically define an mcpServers entry that points to the Obsidian MCP package and supplies vault paths and API tokens as environment variables.
{
"mcpServers": {
"obsidian-mcp": {
"command": "npx",
"args": ["-y", "@jianruidutong/obsidian-mcp"],
"env": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/vault",
"OBSIDIAN_API_TOKEN": "your_api_token",
"OBSIDIAN_API_PORT": "27123"
}
}
}
}Keep your API token secret. Use a strong, unique token for each instance and restrict access to trusted clients. If you rotate tokens, restart the MCP client to apply changes.
If you encounter connection issues, verify that the Obsidian Local REST API plugin is enabled, the API token is correct, and the plugin port matches the one configured in your MCP client. Check vault permissions and ensure Obsidian is running. If environment variables arenβt recognized, restart the MCP client after making changes.
The server container and client configuration support both HTTP-based remote execution and local, inline execution (stdio). Follow the exact command and environment variable settings shown in the installation sections to ensure proper startup and operation.
List all notes in vault with optional folder filtering and metadata such as size and dates.
Read the content and metadata for a single note.
Batch read multiple notes for efficient content analysis.
Create a new markdown note with specified content and automatic directory creation.
Edit notes with precise placement, including text replacement and section edits.
Remove notes from the vault with safe handling to preserve vault integrity.
Move or rename notes and update links accordingly.
Create, rename, move, or delete folders with full hierarchy support.
Perform full-text searches across all content with optional regex and relevance scoring.
Automatically detect note names in content and convert to wikilinks.
Add tags to notes, supporting nested tag structures.
Show all tags with usage statistics and hierarchy insights.
Query notes using AND/OR tag logic for complex filtering.
Create reusable templates with variables for consistent note creation.
Browse saved templates and their variable information.
Generate new notes from templates with variable substitution.
Remove unused templates from the library.
Identify key terms using TF-IDF with configurable result limits.
Create concise, adaptable summaries of content.
AI-driven tag recommendations based on content analysis.
Find notes with content similarity using cosine similarity.
Map connections between notes and identify knowledge clusters.
Export graph data for visualization tools in JSON or Cytoscape formats.
Identify notes without links to improve vault connectivity.
AI-powered recommendations for potential new links.