Roam Research MCP Server

MCP server and CLI for Roam Research

Local serverstdioTypeScript

What is the Roam Research MCP MCP server?

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.

What Roam Research MCP does

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.

Tools it exposes

Once connected, the assistant can call these 14 tools directly:

  • 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

Installing the roam research mcp mcp server

The 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.

Configuration

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.

Where it fits

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.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • With 14 tools exposed, expect a noticeable bump in prompt size — disable it in projects that never use Roam Research MCP.
  • Maintained by 2b3pro, written in TypeScript.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the roam research mcp mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
roam_fetch_page_by_titleFetch page content by title.
roam_fetch_page_full_viewFetch a page's content plus all linked references with breadcrumb context and children.
roam_fetch_blockFetch a block by UID with optional children (depth) and/or ancestors (up to page root).
roam_create_pageCreate new pages, optionally with mixed text and table content.
roam_update_page_markdownUpdate a page using smart diff (preserves block UIDs).
roam_get_subpagesList sub-pages under a namespace prefix (e.g. "Project/") with optional tag filter.
roam_search_by_textFull-text search across the graph or within specific pages. Supports namespace prefix search for page titles.
roam_search_block_refsFind blocks that reference a page, tag, or block UID.
roam_search_by_statusFind TODO or DONE items.
roam_search_for_tagFind blocks containing specific tags (supports exclusion).
roam_search_by_dateFind blocks/pages by creation or modification date.
roam_find_pages_modified_todayList pages modified since midnight.
roam_add_todoAdd TODO items to today's daily page.
roam_create_tableCreate properly formatted Roam tables.

How to install the Roam Research MCP MCP server

{
  "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.

Configuration

VariableDescriptionRequired
ROAM_API_TOKENCredential the server authenticates with.Yes
ROAM_GRAPH_NAMEConfiguration value read at startup.Optional
ROAM_GRAPHSConfiguration value read at startup.Optional
ROAM_DEFAULT_GRAPHConfiguration value read at startup.Optional
ROAM_SYSTEM_WRITE_KEYCredential the server authenticates with.Yes
HTTP_STREAM_HOSTEndpoint or connection string the server talks to.Optional
HTTP_AUTH_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Roam Research MCP to roam fetch page by title.
  • Use Roam Research MCP to roam fetch page full view.
  • Use Roam Research MCP to roam fetch block.

Frequently asked questions

It connects Roam Research MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (roam_fetch_page_by_title, roam_fetch_page_full_view, roam_fetch_block, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Roam Research MCP directly.