Supports org-roam directories stored in Dropbox with automatic detection of ~/Dropbox/org-roam/ locations.
Enables interaction with org-roam knowledge bases, providing tools for searching nodes, creating and updating notes, managing links between nodes, and exploring backlinks and relationships within the org-roam system.
Leverages org-roam's SQLite database for efficient querying and searching of nodes, with automatic database synchronization after file operations.
Org-roam MCP Server
A Model Context Protocol (MCP) server that enables Claude Code and other MCP clients to interact with your org-roam knowledge base.
Features
Read Operations: Search and retrieve org-roam nodes, explore backlinks and relationships
Write Operations: Create new notes, update existing content, add links between nodes
Full Integration: Respects org-roam's file structure, UUID system, and conventions
Auto-Detection: Automatically finds your org-roam database and directory
Fast Search: Leverages org-roam's SQLite database for efficient queries
Robust Error Handling: Comprehensive input validation and descriptive error messages
Path Normalization: Handles quoted/unquoted file paths and node IDs consistently
Database Synchronization: Automatic refresh after file operations for immediate updates
Recent Improvements
v0.2.0 - Enhanced Reliability (Latest)
π§ Fixed File Path Handling: Resolved issues with quoted file paths from the org-roam database
π Improved Node ID Support: Now handles both quoted and unquoted node ID formats seamlessly
π Enhanced Search Synchronization: Database automatically refreshes after create/update operations
β Better Error Handling: Added comprehensive input validation with clear error messages
π§Ή Path Cleaning: Automatic normalization of file paths with quote removal
π Improved Logging: Better error reporting and debugging information
Installation
Configuration
Auto-Detection
The server automatically detects your org-roam setup by looking for:
Database locations:
~/.emacs.d/org-roam.db~/org-roam.db~/.config/emacs/org-roam.db~/Documents/org-roam/org-roam.db
Directory locations:
~/org-roam/~/Documents/org-roam/~/Dropbox/org-roam/~/Notes/
Manual Configuration
Override auto-detection with environment variables:
Usage with Claude Code
Add to your Claude Code MCP configuration (~/.claude_code/mcp.json):
Or for local development:
Available Tools
Search and Discovery
search_nodes: Search for nodes by title, tags, or aliasesget_node: Get detailed information about a specific nodeget_backlinks: Find all nodes that link to a specific nodelist_files: List all org files in your org-roam directory
Content Creation and Modification
create_node: Create a new org-roam node with title, content, and tagsupdate_node: Update the content of an existing nodeadd_link: Create a link from one node to another
Resources
The server provides these resources for read-only access:
org-roam://nodes: List of all nodes in your databaseorg-roam://stats: Database statistics (node count, file count, etc.)org-roam://node/{id}: Detailed information about a specific node
Examples
Creating a New Note
Searching Your Knowledge Base
Exploring Connections
Development
Running from Source
Clone the repository:
Create virtual environment and install:
Run tests:
Run the server:
Project Structure
File Format Compatibility
The server creates org-roam files with the standard structure:
Requirements
Python 3.8+
Existing org-roam setup with SQLite database
Read/write access to your org-roam directory
Troubleshooting
Database Not Found
If you get a "Database not found" error:
Check that org-roam is set up and has created a database
Run
M-x org-roam-db-syncin Emacs to ensure the database existsSet
ORG_ROAM_DB_PATHenvironment variable to the correct path
Permission Issues
Ensure the MCP server has read/write access to:
Your org-roam database file
Your org-roam directory and all subdirectories
Integration Issues
Restart Claude Code after adding the MCP server configuration
Check Claude Code logs for any connection errors
Verify the server starts correctly by running it manually
Contributing
Fork the repository
Create a feature branch
Add tests for new functionality
Ensure all tests pass
Submit a pull request
License
MIT License - see LICENSE file for details