aatuk/obsidian-mcp
3.1
If you are the rightful owner of obsidian-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Obsidian-MCP is a plugin that transforms an Obsidian vault into a graph database accessible via an MCP server.
Obsidian HTTP MCP Plugin
An Obsidian plugin that implements an HTTP-based Model Context Protocol (MCP) server, allowing AI assistants like Claude to directly interact with your Obsidian vault.
Features
- HTTP MCP Server: Runs on port 27125 (configurable)
- API Key Authentication: Secure access with X-API-Key header
- Rate Limiting: Configurable requests per minute limit
- Full Vault Access: Read, write, search, and manage files
- Dataview Integration: Execute Dataview queries via API
Available MCP Tools
list_files_in_vault
- List all files in the vaultlist_files_in_dir
- List files in a specific directoryget_file_contents
- Read file contentsappend_content
- Append content to filessimple_search
- Search for text across the vaultpatch_content
- Modify specific sections (headings, blocks, frontmatter)delete_file
- Delete files (with confirmation)dataview_query
- Execute Dataview DQL queries
Installation
-
Build the plugin:
npm install npm run build
-
Copy
main.js
andmanifest.json
to your vault's.obsidian/plugins/obsidian-http-mcp/
directory -
Enable the plugin in Obsidian settings
-
Configure the API key in plugin settings
Development
# Install dependencies
npm install
# Build the plugin
npm run build
# Deploy to Obsidian (update path in script)
./update-plugin
# Test the API
./test-api.sh
MCP Client Configuration
Claude Desktop/Code
claude mcp add --transport http obsidian-vault http://localhost:27125/rpc \
--header "X-API-Key: your-api-key"
Direct API Testing
curl -X POST http://localhost:27125/rpc \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":1}'
Security
- API key required for all requests
- Rate limiting to prevent abuse
- Optional external access control
- Dataview queries can be disabled
Protocol
The server implements JSON-RPC 2.0 protocol with MCP extensions:
initialize
- Protocol handshaketools/list
- List available toolstools/call
- Execute a tool
License
MIT