This is a GitHub repository hosted in https://github.com/szaffarano/org-mcp-server/
MCP server for org-mode/roam knowledge base management in Rust. Multi-crate workspace with:
org-core— Business logic and org-mode functionalityorg-mcp-server— MCP protocol implementationorg-cli— CLI tool for testing and direct usage
Goal: Provide search, content creation, and note linking with media references for org-mode files.
cargo build— Build all cratescargo test— Run all testscargo test <test_name>— Run specific testcargo test -p <crate_name>— Test specific cratecargo clippy— Run lintercargo fmt— Format codecargo run --example <name>— Run playground examplescargo run --bin org-cli— Run CLI toolcargo run --bin org-mcp-server— Run MCP server
Development tasks are managed with just (available in nix devShell).
Common commands:
just— Show all available commandsjust build— Build all cratesjust test— Run all testsjust dev— Development workflow (format, lint, test, coverage)just coverage-html— Generate HTML coverage reportjust lint— Run clippy linterjust fmt— Format code
Coverage targets:
just coverage— Generate all coverage formatsjust coverage-html— HTML report incoverage/html/just coverage-summary— Terminal summaryjust coverage-ci— LCOV for CIjust coverage-json— JSON format
Quality checks:
just check— Run all quality checks (format check, lint, test, coverage)just fmt-check— Check code formatting without modifying
Run just to see all available commands with descriptions.
- Formatting: Always use
just fmtorcargo fmtbefore commits - Error handling: Prefer explicit
Result<T, E>over panics - String formatting: Use
"string {var}"over"string {}", var - Imports: Standard library before external crates
- Testing: Use
assert_eq!overassert!, add#[cfg(test)]modules - Functions: Keep focused and well-documented
- Rust 2024 edition with async-first design using
tokio - Examples in
org-core/examples/for dependency experimentation - Test fixtures in
tests/fixtures/for org/roam files - Key deps:
orgize(parsing),walkdir(file traversal),clap(CLI)
- Multi-crate changes: Update workspace dependencies in root Cargo.toml
- New functionality: Add to
org-core, expose viaorg-mcp-serverandorg-cli - Error handling: Use custom error types, implement proper chaining
- File operations: Validate paths at construction, not runtime
- Testing: Create fixtures for complex org-mode files
- Concise responses: Be direct, avoid unnecessary explanations
- File creation: NEVER create files unless absolutely necessary
- Commits: Always sign with -S, never include Claude Code references
- Code quality: Run clippy and fmt before suggesting changes
- Documentation: Only create when explicitly requested
- ✅ Basic file listing with recursive directory traversal
- ✅ Error handling with custom types and proper chaining
- ✅ CLI tool with
listandinitcommands - ✅ MCP server with JSON-RPC protocol
- 🚧 Org-mode parsing and content extraction (planned)
- 🚧 Search functionality with metadata caching (planned)