Roam Research MCP Server
Enables retrieving content from Roam Research pages with nested blocks, finding page references, writing new blocks to existing pages, adding content to daily pages, and handling hierarchical block structures with proper markdown conversion.
Click on "Install 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., "@Roam Research MCP Serveradd 'Meeting notes from the project kickoff' to today's daily page"
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.
Roam Research MCP Server
A Model Context Protocol (MCP) server that provides tools to interact with Roam Research API, enabling Claude Desktop to read from and write to your Roam Research graph.
Features
Get Page Content: Retrieve content from any page with nested child blocks in markdown format
Get Page References: Find all references to a specific page with pagination support and time-based sorting
Write to Page: Add new blocks to existing pages
Write to Today: Add content to today's daily page (auto-creates if needed)
Markdown Conversion: Automatically converts Roam-style
[[links]]to markdown formatNested Block Support: Handles hierarchical block structures with proper indentation
Related MCP server: MCP Memory Server
Installation
Prerequisites
Python 3.11+
uv package manager
Roam Research API token and graph access
Setup
Clone the repository:
git clone <repository-url>
cd roam-research-mcpInstall dependencies:
uv syncSet up environment variables:
export ROAM_TOKEN="your_roam_research_api_token"
export ROAM_GRAPH_NAME="your_graph_name"Claude Desktop Integration
Add this configuration to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"roam-research": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/roam-research-mcp",
"run",
"python",
"main.py"
],
"env": {
"ROAM_TOKEN": "your_actual_roam_token",
"ROAM_GRAPH_NAME": "your_graph_name"
}
}
}
}Usage
Once configured with Claude Desktop, you can:
Ask Claude to read content from your Roam pages
Have Claude write notes and thoughts to your daily pages
Query page references and connections
Add structured content to specific pages
Development
See CLAUDE.md for development guidelines and git commit conventions.
API Requirements
Valid Roam Research API token
Graph name with API access enabled
Network access to
api.roamresearch.com
License
MIT License
Available Tools
4 toolsget_page_contentA
Get the complete content of a specific page in Roam Research with all nested child blocks.
Retrieves all blocks on the specified page with their hierarchical structure,
including nested children up to 5 levels deep. Returns content in markdown format
with proper indentation to reflect the block hierarchy.
Args:
page_name: Exact name of the page to retrieve (case-sensitive)
Returns:
JSON string containing:
- result: Array of blocks with content and timestamps
- Each block includes: content (markdown), timestamp (edit time)
Examples:
get_page_content("Daily Notes")
get_page_content("Project Planning")
get_page_content("信用卡")
| Name | Required | Description | Default |
|---|---|---|---|
| page_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: it's a read operation (implied by 'Get'), specifies depth limits ('up to 5 levels deep'), output format ('markdown format with proper indentation'), and includes examples. It lacks details on error handling or rate limits, but covers essential behavior for a retrieval tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and front-loaded with the core purpose, followed by details on behavior, parameters, returns, and examples. Each sentence adds value without redundancy, making it efficient and easy for an agent to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (1 parameter, no annotations, but with output schema), the description is complete. It covers purpose, usage context, behavioral traits, parameter semantics, and includes examples. The output schema handles return values, so the description appropriately focuses on other aspects without redundancy.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, so the description must fully compensate. It adds significant meaning beyond the schema by explaining the parameter 'page_name' as 'Exact name of the page to retrieve (case-sensitive)', providing clarity on format and constraints that the schema alone does not include.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Get the complete content'), resource ('a specific page in Roam Research'), and scope ('with all nested child blocks'). It distinguishes from siblings like 'get_page_references' (which likely gets references rather than content), 'write_to_page' (which modifies rather than retrieves), and 'write_to_today' (which writes to a specific page).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by specifying the tool retrieves content from a page, which contrasts with writing tools ('write_to_page', 'write_to_today') and a references tool ('get_page_references'). However, it does not explicitly state when to use this tool versus alternatives or provide exclusions, leaving some ambiguity for the agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_page_referencesA
Get all blocks that reference a specific page in Roam Research with pagination support.
Finds all blocks across your Roam database that contain links to the specified page.
Results are sorted by most recent edit time and include the full hierarchical context
of each referencing block.
Args:
page_name: Exact name of the page to find references for (case-sensitive)
limit: Maximum number of references to return per request (default: 10)
cursor: Timestamp cursor for pagination - use next_cursor from previous response
to get additional results
Returns:
JSON string containing:
- result: Array of referencing blocks with content and timestamps
- next_cursor: Timestamp for pagination (if more results available)
- total_matches: Number of references found in this batch
Examples:
get_page_references("GTD")
get_page_references("Project Alpha", limit=20)
get_page_references("Meeting Notes", limit=5, cursor=1640995200000)
| Name | Required | Description | Default |
|---|---|---|---|
| page_name | Yes | ||
| limit | No | ||
| cursor | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: pagination mechanism (cursor-based), sorting (by most recent edit time), inclusion of hierarchical context, and the JSON return structure. It doesn't mention rate limits, authentication needs, or error conditions, but covers the core operational behavior well.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and front-loaded with the core purpose. Every sentence adds value: explains what it finds, how results are sorted, parameter details, return format, and examples. No wasted words while maintaining clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (pagination, hierarchical context), no annotations, and the presence of an output schema, the description provides excellent completeness. It explains the pagination mechanism, sorting behavior, return structure, and includes practical examples. The output schema handles return value details, so the description appropriately focuses on operational context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 0%, so the description must fully compensate. It provides excellent parameter semantics: explains page_name is case-sensitive, limit is maximum per request with default, and cursor is for pagination with specific usage instructions. This adds substantial meaning beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Get all blocks that reference a specific page'), resource ('Roam Research'), and scope ('with pagination support'). It distinguishes this from siblings like get_page_content (which retrieves page content rather than references) and write tools by focusing on reference discovery.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context about when to use this tool (finding blocks that link to a specific page) and implies usage through examples. However, it doesn't explicitly state when NOT to use it or name specific alternatives among siblings, though the purpose differentiation is strong enough to guide selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_to_pageA
Write hierarchical markdown content to a specific page in Roam Research.
Creates a new block structure on the specified page with automatic indentation
detection. Supports nested bullet points and maintains proper parent-child
relationships between blocks. Content is appended to the end of the page.
Args:
page_name: Exact name of the target page (case-sensitive, must exist)
content: Hierarchical markdown content using '- ' prefix and indentation
Format: "- Main topic
- Subtopic
- Details"
Supports any indentation level with automatic detection
Returns:
JSON string containing:
- result: "success" if completed
- blocks_created: Total number of blocks created (including children)
- details: Array of individual block creation results
Examples:
write_to_page("Project Notes", "- New milestone
- Task 1
- Task 2")
write_to_page("信用卡", "- [[銀行/國泰]]
- 現金回饋 2%")
| Name | Required | Description | Default |
|---|---|---|---|
| page_name | Yes | ||
| content | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure and does so effectively. It explains that content is appended to the end of the page, describes automatic indentation detection, maintains parent-child relationships, and specifies that the page must already exist (case-sensitive). It also provides return format details, though an output schema exists.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (purpose, args, returns, examples) and front-loads the core functionality. While comprehensive, some sentences could be more concise, and the formatting example within the content parameter description is slightly verbose but still informative.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (hierarchical content creation), no annotations, and 0% schema coverage, the description provides complete context. It covers purpose, usage, parameters, return values (even with output schema), and includes practical examples. The description fully compensates for the lack of structured metadata.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description fully compensates by providing detailed parameter semantics. It explains that page_name must be exact and case-sensitive, that content uses hierarchical markdown with '- ' prefix and indentation, provides specific formatting examples, and describes automatic indentation detection. This adds substantial value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('write hierarchical markdown content'), target resource ('specific page in Roam Research'), and distinguishes from siblings by focusing on content creation rather than retrieval (get_page_content, get_page_references) or date-specific writing (write_to_today). It provides a complete verb+resource+scope statement in the first sentence.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context about when to use this tool (writing hierarchical content to existing pages) and implicitly distinguishes from siblings through its focus on content creation. However, it doesn't explicitly state when NOT to use it or name specific alternatives for different scenarios beyond the sibling tool names provided separately.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_to_todayA
Write hierarchical markdown content to today's daily page in Roam Research.
Automatically creates today's daily page if it doesn't exist, then adds the
provided content as a hierarchical block structure. Uses Roam's standard
date format (e.g., "July 28, 2025") and maintains proper block relationships.
Args:
content: Hierarchical markdown content using '- ' prefix and indentation
Format: "- Main topic
- Subtopic
- Details"
Supports any indentation level with automatic detection
Returns:
JSON string containing:
- result: "success" if completed
- blocks_created: Total number of blocks created (including children)
- details: Array of individual block creation results
Examples:
write_to_today("- Daily standup
- Completed: Bug fixes
- Next: Feature review")
write_to_today("- [[會議/週會]]
- 參與者: @John, @Mary
- 議題: Q4 規劃")
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it automatically creates the page if missing, uses Roam's standard date format, maintains block relationships, and describes the return structure. It doesn't mention error conditions, rate limits, or authentication requirements, but provides substantial operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (purpose, behavior, args, returns, examples) and every sentence adds value. It's appropriately sized for a tool with one parameter but complex behavior, with no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (automatic page creation, hierarchical content processing) and the presence of an output schema, the description provides excellent context. It explains the tool's behavior, parameter requirements, return structure, and includes practical examples, making it complete enough for effective use despite having no annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage for its single parameter, but the description comprehensively explains the 'content' parameter with format details, examples, and hierarchical structure requirements. It adds significant value beyond the bare schema by specifying the markdown format, indentation rules, and providing concrete examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('write hierarchical markdown content', 'automatically creates today's daily page') and identifies the target resource ('today's daily page in Roam Research'). It distinguishes from sibling tools like 'write_to_page' by specifying the date-specific nature of this operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context about when to use this tool (for writing to today's daily page in Roam Research) and implicitly distinguishes it from 'write_to_page' which likely writes to arbitrary pages. However, it doesn't explicitly state when NOT to use this tool or mention alternatives like 'get_page_content' for reading operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
- First observed
get_page_content - First observed
get_page_references - First observed
write_to_page - First observed
write_to_today
TDQS
Each tool has a clearly distinct purpose with no overlap: get_page_content retrieves page content, get_page_references finds references to pages, write_to_page writes to a specific page, and write_to_today writes to today's daily page. The separation between general page operations and the specialized daily page operation is well-defined, preventing confusion.
All tool names follow a consistent verb_noun pattern with snake_case: get_page_content, get_page_references, write_to_page, and write_to_today. The naming is predictable and readable, making it easy for agents to understand the action and target at a glance.
Four tools are reasonable for a Roam Research server, covering core read and write operations. However, the scope feels slightly thin as it lacks update or delete capabilities for existing blocks, which are common in note-taking workflows. The count is appropriate but could be more comprehensive.
The tools cover basic retrieval and creation for pages and daily notes, but there are notable gaps. Missing operations include updating or deleting existing blocks, searching across pages, and managing page metadata. This limits agents to read and append-only workflows, which may cause failures in more complex tasks.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
A Model Context Protocol server for Wix AI tools
Share context and questions between Claude instances — VS Code, claude.ai web, and mobile.
Related MCP Servers
- AlicenseAqualityAmaintenanceProvides comprehensive access to Roam Research's API functionality. This server enables AI assistants like Claude to interact with your Roam Research graph through a standardized interface.25119101MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server for Claude Desktop that provides structured memory management across chat sessions, allowing Claude to maintain context and build a knowledge base within project directories.226MIT
- AlicenseNot gradedqualityDmaintenanceA server that enables AI assistants like Claude to interact with Roam Research graphs through a standardized interface, providing comprehensive tools for content creation, search, retrieval, and optional memory management.8MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides comprehensive access to Obsidian vaults with Claude.ai remote integration, Tailscale support, and advanced query capabilities.5,78435Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mickm3n/roam-research-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server