MCP server and CLI for Roam Research
Roam research mcp mcp server connects Roam Research MCP to AI assistants that speak the Model Context Protocol. MCP server and CLI for Roam Research.
I created this project to solve a personal problem: I wanted to manage my Roam Research graph directly from Claude Code (and other LLMs). As I built the Model Context Protocol (MCP) server to give AI agents access to my notes, I realized the underlying tools were powerful enough to stand on their own.
Once connected, the assistant can call these 14 tools directly:
roam_fetch_page_by_title — Fetch page content by titleroam_fetch_page_full_view — Fetch a page's content plus all linked references with breadcrumb context and childrenroam_fetch_block — Fetch a block by UID with optional children (depth) and/or ancestors (up to page root)roam_create_page — Create new pages, optionally with mixed text and table contentroam_update_page_markdown — Update a page using smart diff (preserves block UIDs)roam_get_subpages — List sub-pages under a namespace prefix (e.g. "Project/") with optional tag filterroam_search_by_text — Full-text search across the graph or within specific pages. Supports namespace prefix search for page titlesroam_search_block_refs — Find blocks that reference a page, tag, or block UIDroam_search_by_status — Find TODO or DONE itemsroam_search_for_tag — Find blocks containing specific tags (supports exclusion)roam_search_by_date — Find blocks/pages by creation or modification dateroam_find_pages_modified_today — List pages modified since midnightroam_add_todo — Add TODO items to today's daily pageroam_create_table — Create properly formatted Roam tablesThe server is distributed via npm as roam-research-mcp, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.
Before the server will start you need to supply 7 environment variables: ROAM_API_TOKEN, ROAM_GRAPH_NAME, ROAM_GRAPHS, ROAM_DEFAULT_GRAPH, ROAM_SYSTEM_WRITE_KEY, HTTP_STREAM_HOST, HTTP_AUTH_TOKEN. Keep credentials in your client's env block or a secrets manager rather than committing them.
Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Roam Research MCP sits in that group, and the shape of its toolset — roam_fetch_page_by_title, roam_fetch_page_full_view, roam_fetch_block among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.
| Tool | What it does |
|---|---|
| roam_fetch_page_by_title | Fetch page content by title. |
| roam_fetch_page_full_view | Fetch a page's content plus all linked references with breadcrumb context and children. |
| roam_fetch_block | Fetch a block by UID with optional children (depth) and/or ancestors (up to page root). |
| roam_create_page | Create new pages, optionally with mixed text and table content. |
| roam_update_page_markdown | Update a page using smart diff (preserves block UIDs). |
| roam_get_subpages | List sub-pages under a namespace prefix (e.g. "Project/") with optional tag filter. |
| roam_search_by_text | Full-text search across the graph or within specific pages. Supports namespace prefix search for page titles. |
| roam_search_block_refs | Find blocks that reference a page, tag, or block UID. |
| roam_search_by_status | Find TODO or DONE items. |
| roam_search_for_tag | Find blocks containing specific tags (supports exclusion). |
| roam_search_by_date | Find blocks/pages by creation or modification date. |
| roam_find_pages_modified_today | List pages modified since midnight. |
| roam_add_todo | Add TODO items to today's daily page. |
| roam_create_table | Create properly formatted Roam tables. |
{
"mcpServers": {
"roam-research": {
"command": "npx",
"args": ["-y", "roam-research-mcp"],
"env": {
"ROAM_API_TOKEN": "your-token",
"ROAM_GRAPH_NAME": "your-graph"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| ROAM_API_TOKEN | Credential the server authenticates with. | Yes |
| ROAM_GRAPH_NAME | Configuration value read at startup. | Optional |
| ROAM_GRAPHS | Configuration value read at startup. | Optional |
| ROAM_DEFAULT_GRAPH | Configuration value read at startup. | Optional |
| ROAM_SYSTEM_WRITE_KEY | Credential the server authenticates with. | Yes |
| HTTP_STREAM_HOST | Endpoint or connection string the server talks to. | Optional |
| HTTP_AUTH_TOKEN | Credential the server authenticates with. | Yes |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.