org-roam-mcp
Provides access to an org-roam knowledge graph, enabling AI agents to search nodes, read node files, find backlinks, explore graph neighborhoods and shortest paths, compute centralities and communities, suggest links, detect orphans, and sync the org-roam database via Emacs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@org-roam-mcpfind my notes on zettelkasten and show what links back to them"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
org-roam MCP server
An MCP server that gives AI agents access to an org-roam knowledge graph.
Reads query the org-roam SQLite database directly, so they work without
Emacs. org_roam_sync and emacs_eval go through emacsclient and need a
running Emacs server (M-x server-start).
AI client → MCP server (Python, stdio) → sqlite3 (reads)
→ emacsclient --eval (sync, Elisp)Tools
Tool | Parameters | Purpose |
|
| Find nodes by title substring |
|
| Read the full file of a node |
|
| All nodes that link to a node |
|
| Breadth-first neighbourhood of a node |
|
| Shortest paths between two nodes (max depth 8) |
|
| Neighbours two nodes share |
|
| Most connected nodes by degree |
| Nodes without links | |
| Run | |
|
| Evaluate any Elisp through |
Graph algorithms (networkx; only id: links count):
Tool | Parameters | Purpose |
|
| Node importance by PageRank |
|
| Topic clusters by Louvain community detection |
|
| Bridge nodes between clusters |
|
| Distance-based centrality |
|
| Local density of a node or the whole graph |
| Density, diameter, components, average degree | |
|
| Unlinked nodes with many shared neighbours |
| Weakly connected subgraphs |
Worked examples: docs/examples.md.
Related MCP server: ai-brain
Install
Needs Python 3.10+ and uv. The repo is public, so cloning needs no GitHub credentials.
git clone https://github.com/ChristianGeng/org-roam-mcp.git ~/work/myfiles/org-roam-mcp
uv sync --no-config --directory ~/work/myfiles/org-roam-mcpRegister with Claude Code
claude mcp add --scope user org-roam -- \
uv run --no-config --directory ~/work/myfiles/org-roam-mcp org-roam-mcp--no-config ignores custom package indexes from a surrounding uv config,
which may be unreachable (for example off VPN). After the first uv sync
the server starts offline.
Without a clone, uv can also fetch and run it. This needs network on first use:
claude mcp add --scope user org-roam -- \
uvx --no-config --from git+https://github.com/ChristianGeng/org-roam-mcp org-roam-mcpUpdate
git -C ~/work/myfiles/org-roam-mcp pull
uv sync --no-config --directory ~/work/myfiles/org-roam-mcpThen restart the client (in Claude Code, /mcp and reconnect). With uvx,
add --refresh once to fetch the new version.
Check with claude mcp list; then in a session ask for
org_roam_find("some title").
Other clients
VS Code (.vscode/mcp.json), Windsurf (~/.codeium/windsurf/mcp_config.json)
and other clients take the same command:
{
"servers": {
"org-roam": {
"command": "uv",
"args": ["run", "--no-config", "--directory",
"/path/to/org-roam-mcp", "org-roam-mcp"]
}
}
}(Windsurf and Claude's JSON config call the key mcpServers.)
Finding the database
The server uses the first of:
org-roam-db-locationfrom the running Emacs (emacsclient);the
ORG_ROAM_DBenvironment variable;~/doom-emacs/.local/cache/org-roam.db,~/emacs-conf/org-roam.db,~/.emacs.d/org-roam.db,~/.emacs.d/.local/cache/org-roam.db,~/.config/emacs/org-roam.db,~/.local/share/emacs/org-roam.db.
Each candidate must have org-roam's files and nodes tables.
Development
uv run pytest
uvx ruff check .Moved out of cgeng-ai-skills (mcps/org_roam) with its history.
Licence
MIT, see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory, hybrid search and a goal graph for AI agents, over stdio or remote HTTP.
Shared memory for AI agents, as a graph in your own Postgres. Writes never call an LLM.
Personal wiki and memory layer for AI assistants. Persistent, structured memory across sessions.
- GoMindOAuthcom.gominddb
Persistent knowledge graph for AI agents. Remember, recall, and forget facts.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables indexing and retrieving notes with full-text search using SQLite, plus building knowledge graphs to find relationships between concepts. Supports natural language note management, tagging, and semantic connections.16-
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants like Claude and Codex to read, write, search, and traverse Markdown notes stored in a self-hosted knowledge base.5 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to query and interact with a graph database of markdown notes, extracting entities like wikilinks, mentions, and hashtags.MIT
- FlicenseNot gradedqualityCmaintenanceEnables MCP-capable agents to search, create, and link notes in an Org-roam knowledge base using a headless Emacs daemon, with graph diagnostics and backlink traversal.-