@louis030195/obsidian-mcp
v1.0.0
Published
MCP server for Obsidian - AI-powered vault search and interaction
Maintainers
Readme
obsidian-mcp
https://github.com/user-attachments/assets/99b16c89-24bf-4991-af65-68d21554b438
MCP server for Obsidian - Connect AI assistants to your Obsidian vault. One-line installation.
Quick Start
# Set your API key and run
export OBSIDIAN_API_KEY="your-api-key-here"
npx -y @louis030195/obsidian-mcpFeatures
Provides tools to interact with your Obsidian vault, allowing you to:
- Simple search - Search notes content across your vault
- Dataview search - Search notes using Dataview query language (DQL) for advanced queries
- Fuzzy search - Find notes with approximate matching when you're not sure of exact spelling
- Graph search - Analyze links and connections between notes, find orphaned notes
- Filesystem fallback - New search tools work even when Obsidian REST API is unavailable
Installation & Setup
Prerequisites
- Node.js and npm: Make sure you have Node.js (which includes npm) installed. You can download it from nodejs.org.
- Obsidian: You need the Obsidian app installed.
- Obsidian Local REST API Plugin:
- Open Obsidian.
- Go to
Settings->Community plugins. - Make sure
Restricted modeis off. - Click
Browseand search forLocal REST API. - Install and enable the plugin.
- Go to the plugin's settings (Obsidian Settings -> Local REST API).
- Copy the
API Keyshown there. You'll need it soon.
Setting up the Server
npx create-easy-obsidian-mcpFollow the instructions to setup the server.
Optional: Vault Path Configuration
If the Obsidian REST API is unavailable, the server can fall back to filesystem-based search. By default, it looks for your vault in ~/Documents/Obsidian. You can customize this by:
- Setting the
OBSIDIAN_VAULT_PATHenvironment variable - Using the
--vaultPathcommand line argument
Example Prompts
Try prompts like:
- "list the files in my obsidian vault"
- "search my obsidian notes for 'artificial intelligence'"
- "find my last 5 notes"
- "fuzzy search for 'artfcial inteligence'" (works with typos!)
- "show me the link graph starting from my index note"
- "find all orphaned notes with no connections"
Debugging
Use the MCP Inspector for easier debugging:
npx @modelcontextprotocol/inspector node ./dist/index.js --apiKey <your-api-key>