🚧 Work in Progress: This project is under active development.
A Model Context Protocol (MCP) server for org-mode knowledge management. Provides search, content access, and note linking capabilities for your org-mode files through the MCP protocol.
org://— List all org-mode files in configured directoriesorg://{file}— Access raw content of{file}org-outline://{file}— Get hierarchical structure of{file}as JSONorg-heading://{file}#{heading}— Access specific headings by pathorg-id://{id}— Find content by org-mode ID propertiesorg-agenda://— List all agenda items and tasksorg-agenda://today— Today's scheduled agenda itemsorg-agenda://week— This week's scheduled agenda items
org-file-list— List all org files in configured directoriesorg-search— Search for text content across all org files using fuzzy matchingorg-agenda— Query agenda items with filtering by dates, states, tags, and priorities
org-cli config init— Create default configuration fileorg-cli config show— Display current configurationorg-cli config path— Show configuration file locationorg-cli list— List all .org files in configured directoryorg-cli init— Initialize or validate an org directoryorg-cli read— Read the contents of an org fileorg-cli outline— Get the outline (headings) of an org fileorg-cli heading— Extract content from a specific heading in an org fileorg-cli element-by-id— Extract content from an element by ID across all org filesorg-cli search— Search for text content across all org files using fuzzy matchingorg-cli agenda list— List all tasks (TODO/DONE items)org-cli agenda today— Show today's scheduled tasksorg-cli agenda week— Show this week's scheduled tasksorg-cli agenda range— Show tasks in custom date range
The project uses a TOML configuration file located at
~/.config/org-mcp-server.toml (or $XDG_CONFIG_HOME/org-mcp-server.toml).
Configuration is resolved in the following order (highest priority first):
- CLI flags — Command-line arguments override everything
- Environment variables —
ORG_*prefixed variables - Configuration file — TOML file in config directory
- Default values — Built-in fallbacks
[org]
# Root directory containing org-mode files
root_directory = "~/org/"
# Default notes file for new notes
default_notes_file = "notes.org"
# Agenda files to include
agenda_files = ["agenda.org", "projects.org"]
# Extra files for text search beyond regular org files
agenda_text_search_extra_files = ["archive.org"]
[logging]
# Log level: trace, debug, info, warn, error
level = "info"
# Log file location (MCP server only, CLI logs to stderr)
file = "~/.local/share/org-mcp-server/logs/server.log"
[cli]
# Default output format for CLI commands
default_format = "plain" # plain | jsonORG_ORG__ORG_DIRECTORY— Root directory for org filesORG_ORG__ORG_DEFAULT_NOTES_FILE— Default notes file nameORG_ORG__ORG_AGENDA_FILES— Comma-separated list of agenda filesORG_ORG__ORG_AGENDA_TEXT_SEARCH_EXTRA_FILES— Comma-separated extra search files
ORG_LOGGING__LEVEL— Log level (debug, info, warn, error, trace)ORG_LOGGING__FILE— Log file location
ORG_SERVER__MAX_CONNECTIONS— Maximum number of concurrent connections (default: 10)
ORG_CLI__DEFAULT_FORMAT— Default output format for CLI commands (plain, json)
# Create default configuration file
org config init
# Show current resolved configuration
org config show
# Show configuration file path
org config path# List all org files using configuration
org list
# List with JSON output
org list --format json
# Search across all configured org files
org search "project planning"
# Search with custom parameters
org search "TODO" --limit 5 --format json --snippet-size 75
# Override root directory for a single command
org --root-directory ~/documents/org search "meeting notes"# List all tasks (TODO/DONE items)
org agenda list
# List tasks with specific TODO states
org agenda list --states TODO,IN_PROGRESS
# Filter tasks by priority
org agenda list --priority A
# Filter by tags
org agenda list --tags work,urgent
# Show today's scheduled tasks
org agenda today
# Show this week's tasks
org agenda week
# Show tasks in custom date range
org agenda range --start 2025-10-20 --end 2025-10-27
# JSON output for agenda
org agenda list --format json --limit 10Multi-crate Rust workspace:
- org-core — Business logic and org-mode parsing
- org-mcp-server — MCP protocol implementation
- org-cli — CLI interface for testing and direct usage
Built with:
- orgize for org-mode parsing
- rmcp for MCP protocol
- tokio for async runtime
- nucleo-matcher for fuzzy text search
Download the latest pre-built binaries from GitHub Releases:
# Download org-cli
curl -LO https://github.com/szaffarano/org-mcp-server/releases/latest/download/org-cli-x86_64-unknown-linux-gnu.tar.gz
tar xzf org-cli-x86_64-unknown-linux-gnu.tar.gz
sudo mv org-cli /usr/local/bin/
# Download org-mcp-server
curl -LO https://github.com/szaffarano/org-mcp-server/releases/latest/download/org-mcp-server-x86_64-unknown-linux-gnu.tar.gz
tar xzf org-mcp-server-x86_64-unknown-linux-gnu.tar.gz
sudo mv org-mcp-server /usr/local/bin/Pre-built binaries are available for multiple platforms. Check the releases page for all available downloads.
Install from crates.io using Cargo:
# Install CLI tool
cargo install org-cli --locked
# Install MCP server
cargo install org-mcp-server --locked# Run directly with nix
nix run github:szaffarano/org-mcp-server
# Install to profile
nix profile install github:szaffarano/org-mcp-server
# Development environment
nix develop github:szaffarano/org-mcp-server# Clone and build
git clone https://github.com/szaffarano/org-mcp-server
cd org-mcp-server
cargo build --release
# Run MCP server
cargo run --bin org-mcp-server
# Test with CLI
cargo run --bin org-cli -- listAdd the following to your agent configuration (e.g.,
~/.config/opencode/opencode.json, ~/.claude.json, etc.):
{
"mcpServers": {
"org-mode": {
"command": "/path/to/org-mcp-server",
"args": [],
"env": {}
}
}
}Or if installed via Nix:
{
"mcpServers": {
"org-mode": {
"command": "nix",
"args": ["run", "github:szaffarano/org-mcp-server"],
"env": {}
}
}
}You can configure the MCP server through environment variables in your agent configuration:
{
"mcpServers": {
"org-mode": {
"command": "/path/to/org-mcp-server",
"args": [],
"env": {
"ORG_ORG__ORG_DIRECTORY": "/path/to/your/org/files",
"ORG_LOGGING__LEVEL": "info",
"ORG_SERVER__MAX_CONNECTIONS": "20"
}
}
}
}# Run all tests
cargo test
# Run specific crate tests
cargo test -p org-core
# Format and lint
cargo fmt
cargo clippy
# Run examples
cargo run --example <name>- File discovery and listing
- Basic content access via MCP resources
- Org-mode parsing with orgize
- ID-based element lookup
- CLI tool for testing
- Full-text search across org files
- Configuration file support with TOML format
- Environment variable configuration
- Unified CLI interface with global configuration
- Tag-based filtering and querying
- Agenda-related Functionality
- Link following and backlink discovery (org-roam support)
- Metadata caching for performance
- Content creation and modification tools
- Media file reference handling
- Integration with org-roam databases
- Real-time file watching and updates
- Advanced query language
MIT License - see LICENSE file for details.