- Install dependencies:
npm install- Build the project:
npm run buildCreate obsidian-mcp.json in the project root:
{
"vaults": [
{
"name": "my-vault",
"type": "local",
"path": "/absolute/path/to/your/obsidian/vault"
}
]
}export OBSIDIAN_VAULT_PATH="/path/to/your/vault"
export OBSIDIAN_VAULT_NAME="my-vault"npm startOr directly:
node dist/index.jsThe server will output initialization messages to stderr and wait for MCP protocol messages on stdin/stdout.
Add to your Claude Desktop MCP configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"obsidian": {
"command": "node",
"args": ["/absolute/path/to/obsidian-mcp/dist/index.js"],
"env": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/vault",
"OBSIDIAN_VAULT_NAME": "my-vault"
}
}
}
}Once connected, you can use these tools:
get_note- Get a specific notesearch_notes- Search notes by query, tags, or foldercreate_note- Create a new noteupdate_note- Update an existing notedelete_note- Delete a noteget_vault_stats- Get vault statisticslist_tags- List all tagslist_folders- List all foldersget_knowledge_graph- Get the complete knowledge graphget_related_notes- Find related notesanalyze_graph- Analyze graph structuresuggest_links- Suggest potential links
Once configured with Claude Desktop, you can ask:
- "Show me all notes tagged with #project"
- "Create a new note called 'Meeting Notes.md' with today's date"
- "Find notes related to 'Architecture Design'"
- "Analyze my knowledge graph and show me orphan notes"
- "Suggest potential links for my note about machine learning"
For remote vaults (requires Obsidian Local REST API plugin):
{
"vaults": [
{
"name": "remote-vault",
"type": "remote",
"url": "http://localhost:27124",
"apiKey": "your-api-key",
"syncInterval": 60000
}
]
}You can configure multiple vaults:
{
"vaults": [
{
"name": "personal",
"type": "local",
"path": "/path/to/personal/vault"
},
{
"name": "work",
"type": "local",
"path": "/path/to/work/vault"
}
]
}When using tools, specify which vault:
vault: "personal"orvault: "work"
- Check that your vault path exists and is accessible
- Verify Node.js version is 18 or higher
- Run
npm run buildto ensure compilation succeeded
- Verify the vault path is correct
- Ensure there are
.mdfiles in the vault - Check stderr output for error messages
- Ensure the vault directory has read/write permissions
- On Unix systems, check with
ls -la /path/to/vault
Watch mode for development:
npm run watchThis will automatically recompile when you make changes.
- See README.md for full documentation
- Check obsidian-mcp.example.json for configuration examples
- Explore the source code in
src/for customization