obsidian-mcp-server
by: marcelmarais
obsidian mcp server
📌Overview
Purpose: To provide a lightweight server enabling AI assistants to interact with an Obsidian vault for reading and writing notes.
Overview: The Obsidian MCP Server implements the Model Context Protocol (MCP), allowing AI tools like Cursor and Claude to seamlessly access and manipulate content within an Obsidian vault. It facilitates interactions such as creating notes, checking project ideas, and managing todos, enhancing productivity without requiring the Obsidian application to be active.
Key Features:
-
getAllFilenames: Retrieves a list of all filenames in the vault, enabling users to discover available files easily.
-
readMultipleFiles: Accesses the contents of specified files from the vault with customizable matching, ensuring clear identification of each file's content.
-
getOpenTodos: Gathers all open TODO items from markdown files, providing a straightforward way to track pending tasks.
-
updateFileContent: Allows for updating or creating files with new markdown content, simplifying note management.
Obsidian MCP Server
A lightweight Model Context Protocol (MCP) server that enables AI assistants like Cursor & Claude to read from and write to your Obsidian vault.
Example Interactions
- Create a new note for standup tomorrow describing the code changes you've made today (should also use Git)
- Check notes about project ideas
- Check open todos related to refactoring
Tools
Read
-
getAllFilenames
- Gets a list of all filenames in the Obsidian vault
- Useful for discovering what files are available
-
readMultipleFiles
- Retrieves the contents of specified files from the Obsidian vault
- Supports exact filenames, partial filenames, or case-insensitive matches
- Each file's content is prefixed with '# File: filename' for clear identification
-
getOpenTodos
- Retrieves all open TODO items from markdown files in the Obsidian vault
- Finds unchecked checkbox items (lines containing '- [ ] ')
- Returns them with their file locations
Write
-
updateFileContent
- Updates the content of a specified file in the Obsidian vault with new markdown content
- If the file doesn't exist, it will be created
- Automatically creates any necessary directories
Install & Build
npm install obsidian-mcp-server
npm run build
Integrating with Claude Desktop and Cursor
To use your MCP server with Claude Desktop, add it to your Claude configuration:
{
"mcpServers": {
"obsidian": {
"command": "node",
"args": [
"obsidian-mcp-server/build/index.js",
"/path/to/your/vault"
]
}
}
}
For Cursor, go to the MCP tab in Cursor Settings (command + shift + J) and add a server with this command:
node obsidian-mcp-server/build/index.js /path/to/your/vault
Comparison with Other Solutions
This standalone server offers direct filesystem access without needing the Obsidian application to be running.
Other solutions like jacksteamdev/obsidian-mcp-tools offer a more feature-rich approach as an Obsidian plugin.