A Model Context Protocol (MCP) server that connects Claude and other AI assistants to your Roam Research graph.
Configuration
View docs{
"mcpServers": {
"philosolares-roam-mcp": {
"command": "uvx",
"args": [
"git+https://github.com/PhiloSolares/roam-mcp.git"
],
"env": {
"MEMORIES_TAG": "#[[Claude/Memories]]",
"ROAM_API_TOKEN": "your_roam_api_token",
"ROAM_GRAPH_NAME": "my_graph"
}
}
}
}This MCP server acts as a bridge between Claude and your Roam Research graph, enabling natural language interactions to create, search, and manage content in Roam. After you set it up, you can simply chat with Claude to work with your Roam data without writing code.
You connect Claude to your Roam graph through MCP configuration, then start Claude and your Roam MCP server. Once running, you can ask Claude to create pages, add blocks, search by title or tag, retrieve lists of TODOs, and even extract content from external sources and add it to Roam. Use plain language to describe what you want, and Claude will translate your request into Roam actions.
Examples of practical uses include creating a new Roam page with a structured outline, adding nested blocks under a page, importing markdown into Roam with proper nesting, tagging memories for later recall, and querying Roam content by date, tag, or hierarchy. You can also use the memory system to store reminders or decisions and retrieve them later with filtering.
Prerequisites: you need a working environment with Docker installed and access to Claude Desktop. You should also have a Roam Research graph and an API token for that graph.
Step 1: Install Claude Desktop on your computer by downloading it from the official Claude site.
Step 2: Create or edit your Claude Desktop configuration to add an MCP server entry. You will configure a local Roam MCP server using uvx and point it to your Roam graph.
Step 3: Define the Roam MCP server in your Claude configuration. The following snippet shows a complete configuration for a local MCP server that connects to Roam via an API token and Graph name.
{
"mcpServers": {
"roam_helper": {
"command": "uvx",
"args": ["git+https://github.com/PhiloSolares/roam-mcp.git"],
"env": {
"ROAM_API_TOKEN": "<your_roam_api_token>",
"ROAM_GRAPH_NAME": "<your_roam_graph_name>"
}
}
}
}You can run the Roam MCP server inside a Docker container. This approach isolates the server from your local environment and makes it easy to manage.
Start the container with the required tokens and graph name, then configure Claude Desktop to connect to the containerized server.
Example commands to run locally and to configure Claude Desktop to use the container are shown below.
# Build the image (if you have a Dockerfile)
docker build -t roam-mcp .
# Run the container with your Roam API token and graph name
docker run -p 3000:3000 \
-e ROAM_API_TOKEN="your_token" \
-e ROAM_GRAPH_NAME="your_graph" \
roam-mcp
```
```json
{
"mcpServers": {
"roam_helper_docker": {
"command": "docker",
"args": ["run", "--rm", "-p", "3000:3000", "-e", "ROAM_API_TOKEN=your_token", "-e", "ROAM_GRAPH_NAME=your_graph", "roam-mcp"]
}
}
}Create a new Roam page with a specified title and optional nested content and headings.
Add content blocks to a page, maintaining proper hierarchy and nesting.
Generate structured outlines with customizable nesting within Roam pages.
Import Markdown content and preserve nesting relationships inside Roam.
Create to-do items with automatic TODO status and hierarchical placement.
Update existing content either individually or in batches.
Transform block content with pattern-based changes.
Search for pages by title within the Roam graph.
Search for blocks containing specific text across the graph.
Locate blocks or pages by tag names or tags in content.
Filter and retrieve TODO/DONE items with various criteria.
Identify content that has been recently modified.
Explore block references and navigate block hierarchies.
Navigate parent-child relationships among blocks.
Search by creation or modification dates.
Execute custom Datalog queries for advanced data retrieval.
Store information for Claude to remember across conversations.
Recall stored memories with filtering and sorting options.
Tag memories with custom categories for organization.
Access memories from both recent and older entries.
Extract content from webpages and import into Roam.
Parse and extract text from PDF documents into Roam.
Retrieve YouTube video transcripts and add to Roam.
Detect and process content types to apply appropriate parsing.