Files
roam/azosorg-roam.org
T
2026-07-25 14:39:02 +03:00

1.6 KiB

azos/org-roam

Setup

  • Directory: ~/roam/
  • Database: ~/.emacs.d/org-roam.db (sqlite-builtin connector)
  • MCP server: org-roam-mcp registered in ~/.claude.json via home-manager activation
  • org-agenda includes ~/roam/ so TODOs in roam files appear in agenda

Gotchas

  • org-roam-mcp is forked at anerisgreat/org-roam-mcp (not upstream aserranoni/org-roam-mcp); fork fixes: create_node writes directly to SQLite so new nodes are immediately searchable (no emacsclient needed), and cli_main is defined natively (no postPatch needed)
  • emacsql stores all Emacs strings in SQLite with surrounding "..." — the Python DB layer strips these with _clean_path=/_clean_string
  • org-roam timestamps in SQLite are Emacs (HIGH LOW USEC PSEC) tuples: HIGH = secs >> 16, LOW = secs & 0xFFFF
  • MCP unavailable in projects with Python dev shells: if a project uses use flake with a python3.withPackages dev shell (e.g. roll/impl), direnv sets PYTHONPATH to that shell's Python site-packages. org-roam-mcp uses Python 3.13; the inherited PYTHONPATH points to a different Python version, causing import failures (symptom: ImportError: cannot import name 'Sentinel' from 'typing_extensions'). Fix: PYTHONPATH: "" in the MCP server env block of ~/.claude.json (already set in azos-core/features/claude-memory/default.nix as of the fix). If mcp__org-roam__ tools are missing in a session, check whether the project's direnv is polluting PYTHONPATH.