roam-research -setup-guide
Supplementary Windows setup guide for 2b3pro/roam-research-mcp integration with Claude Desktop. Fixes JSON parsing errors and environment variable issues with wrapper scripts and stable configuration.
claude mcp add --transport stdio keides2-roam-research-mcp-setup-guide node C:\Users\<USERNAME>\mcp-servers\roam-research-mcp\roam-mcp-wrapper.js \ --env ROAM_API_TOKEN="YOUR_ROAM_API_TOKEN" \ --env ROAM_GRAPH_NAME="YOUR_ROAM_GRAPH_NAME"
How to use
This MCP server provides a Roam Research interface tailored for Claude Desktop integration on Windows. To stabilize communication, a wrapper script named roam-mcp-wrapper.js filters out non-JSON debug output so Claude Desktop only receives the JSON-RPC messages it expects. The server is configured in Claude Desktop to launch this wrapper, which in turn starts the underlying Roam MCP logic. Ensure you supply your Roam API token and the target Roam graph name via environment variables so Claude Desktop can authenticate and operate against the correct graph.
Once running, you can use Claude Desktop to send prompts and queries to Roam through the MCP server. The wrapper ensures clean JSON-RPC communication, mitigating issues where Roam’s internal debug messages would otherwise break the protocol. If you encounter missing environment variables or JSON parse errors, verify that the env vars are correctly defined in the MCP configuration (env) and that the wrapper script path is correctly referenced in the Node command.
How to install
Prerequisites:
- Windows 11
- Node.js v18.0.0 or newer
- Access to Roam Research API and a valid API token
Installation steps:
- Create a dedicated directory outside the project for MCP servers (for example: C:\Users<USERNAME>\mcp-servers\roam-research-mcp).
- Place or create the wrapper script roam-mcp-wrapper.js inside that directory. This wrapper should filter RoamServer: logs and only emit valid JSON-RPC messages to stdout.
- Create the MCP configuration in Claude Desktop (or your MCP runner) pointing to the wrapper script. Example command and environment variables are shown in mcp_config below.
- Install Node.js if not already installed. Ensure npm or other tooling is not required for this wrapper setup.
- Start the MCP server via Claude Desktop or your MCP runner using the provided configuration.
Note: If you plan to add more MCP servers later, consider using a dedicated directory structure such as C:\Users<USERNAME>\mcp-servers and keep each server isolated to avoid issues with package.json type settings.
Additional notes
Tips and common issues:
- JSON Parse Errors: Ensure the wrapper filters any non-JSON debug output (RoamServer: ...) so Claude Desktop only sees valid JSON-RPC messages.
- Environment Variables: Directly specify required environment variables in the MCP config under env to avoid .env loading issues when launching from Claude Desktop.
- Path Management: Use absolute paths to the wrapper script to prevent working directory problems on Windows.
- Future scale: This setup uses a dedicated directory outside the project to avoid ES module constraints, making it easier to manage multiple MCP servers (Notion, Obsidian, etc.).
Related MCP Servers
mcp-guardian
Manage / Proxy / Secure your MCP Servers
Gitingest
mcp server for gitingest
mcp-dock
A cross-platform MCP Server manager for Cursor, Claude, Windsurf, Zed & TRAE. Features one-click installation, multi-client sync, and a curated registry of Official & Smithery servers.
python-notebook
Lightweight Python Notebook MCP - Enable AI assistants to create, edit, and view Jupyter notebooks via Model Context Protocol
mcp-coroot
MCP server for Coroot observability platform - integrate monitoring, troubleshooting, and configuration tools with AI agents
obsidian-ai-curator
Smart note consolidation for Obsidian using Claude AI. Automatically identifies and merges scattered fragments into structured knowledge via MCP. Like Tetris for your thoughts - pieces fall into place.