rm-brain MCP server
Enables searching and exploring handwritten reMarkable notebooks through a natural conversation with Claude Desktop, with full-text search, classification, and source citations.
README
<div align="center">
🧠 rm-brain
A local-first "second brain" for your handwritten reMarkable notebooks — searched through a normal Claude Desktop conversation.
Built by Gabriel Anhaia · ☕ Buy me a coffee
</div>
rm-brain quietly syncs the notebooks you drop into a Brain folder on your reMarkable, transcribes and classifies the handwriting with the Claude API, and stores everything in a local SQLite database. You then search and explore your notes as an ordinary conversation in Claude Desktop — no separate app, no hosted service, using your existing Claude subscription.
You: "What did I decide about the Ordio pricing model?" Claude: Pulls it from your notes and answers with receipts — notebook name, page number, date, and the scanned page.
It's designed to feel less like a search box and more like a system that quietly organizes itself and surfaces things you forgot about.
Why it's different
- Your handwriting, actually understood. Claude vision transcribes messy handwriting and diagrams far better than built-in OCR, and classifies each page (journal / meeting / idea / decision / …), extracts people & projects, and flags open loops.
- The interface is a conversation, not a dashboard. Search happens inside Claude Desktop via MCP — you get a world-class chat UI for free.
- Local-first and private by design. The database, page images, and manifest never leave your machine. See Privacy.
- Answers with receipts. Every answer cites the notebook, page number, and date, and can show you the scanned page — so you verify, not trust blindly.
How it works
flowchart TD
A["☁️ reMarkable Cloud"] -->|"rmapi: list Brain folder · stat · get"| B["📦 .rmdoc archive<br/>(.rm v6 vector files)"]
B -->|rmc| C["🖼️ per-page SVG"]
C -->|rsvg-convert| D["🏞️ page PNGs"]
D -->|"Claude vision · 1 call/page"| E["✍️ Extraction<br/>text · type · entities · open loops"]
E --> F[("🗄️ SQLite + FTS5<br/>~/.rm-brain")]
CLI["⌨️ CLI<br/>sync · search · backup"] --> F
F <--> G["🔌 MCP server"]
G <--> H["💬 Claude Desktop"]
classDef cloud fill:#e8f0fe,stroke:#4285f4,color:#1a1a1a;
classDef local fill:#e9f7ef,stroke:#27ae60,color:#1a1a1a;
classDef ai fill:#f3e8fd,stroke:#8e44ad,color:#1a1a1a;
class A cloud;
class B,C,D,F,CLI local;
class E,G,H ai;
reMarkable notebooks are stored as proprietary .rm v6 vector files (not PDFs), so pages are
rendered with rmc + rsvg-convert. See
ARCHITECTURE.md for the full design.
🔒 Privacy & safety
- Local-first, always.
db.sqlite, page images, and the manifest live in one folder (~/.rm-brainby default) and never leave your machine as a whole. - The only things that ever go over the network are (a) individual page images sent to the
Claude API during
sync, and (b) individual queries + retrieved snippets sent through MCP while you search in Claude Desktop. - Opt-in by folder. Nothing is indexed unless you put the notebook in your Brain folder.
- The folder is the source of truth. Remove a notebook from it and the next
syncprunes it from your local index — pages and images included. - Hard exclusion always wins. A notebook whose name matches
/^\./,/private/i, or/noindex/iis skipped entirely, even inside the Brain folder. - Read-only cloud access. rm-brain only ever reads from reMarkable (
list/stat/get); it never uploads or modifies anything. - No telemetry. rm-brain phones home to nobody. See SECURITY.md.
Prerequisites
✅ No jailbreak, rooting, developer mode, or SSH hacks — ever. rm-brain works entirely through reMarkable's official cloud sync (via
rmapi). Your tablet stays completely stock, stock firmware, and under warranty. Nothing is installed on or modified on the device.
| Tool | Why | Install |
|---|---|---|
| Node.js 20+ | runtime | nodejs.org |
rmapi (ddvk sync15 build) |
reMarkable Cloud CLI | ddvk/rmapi releases — reMarkable's newer sync protocol returns HTTP 410 with older builds |
| rmc | renders .rm v6 pages |
pipx install rmc |
librsvg (rsvg-convert) |
SVG → PNG | brew install librsvg |
| Anthropic API key | handwriting extraction (used only during sync) |
console.anthropic.com |
Quickstart
# 1. Install
git clone https://github.com/gabrielanhaia/remarkable-brain.git
cd remarkable-brain
npm install && npm run build
npm link # puts `rm-brain` on your PATH
# 2. Guided setup (pairs rmapi, saves your API key, wires Claude Desktop)
rm-brain setup
# 3. On the tablet: create a "Brain" folder, move a notebook in, let it sync
rm-brain sync
# 4. Fully quit & reopen Claude Desktop, then just ask it about your notes
The setup wizard checks your tools, pairs rmapi, prompts for your API key once and saves
it (to ~/.rm-brain/config.json, chmod 600 — no re-export needed), helps you pick the
Brain folder, offers to run the first sync, and can write your Claude Desktop config
automatically. Re-run it anytime — it's idempotent.
Usage
Once a notebook is indexed and Claude Desktop is connected, just talk to Claude:
- "What are my open loops?" / "What did I forget to follow up on?"
- "Search my notes for the Falcon pricing decision."
- "How has my thinking on the onboarding flow evolved?" (entity timeline)
- "Show me the page where I sketched the architecture."
CLI reference
| Command | What it does |
|---|---|
rm-brain setup |
Interactive setup wizard (start here) |
rm-brain sync |
Pull Brain-folder notebooks, render, extract, index |
rm-brain reindex |
Re-extract all indexed pages (after a prompt/model change) |
rm-brain search "<query>" |
Full-text search from the terminal |
rm-brain list |
Show indexed notebooks and page counts |
rm-brain info |
Where the data lives + stats |
rm-brain backup [dest] |
Write a portable .tar.gz of the whole index |
rm-brain exclude "<name>" / include "<name>" |
Exclude (purges) / re-include a notebook |
rm-brain purge |
Delete the entire local index |
rm-brain doctor |
Check dependencies |
rm-brain mcp |
Start the MCP server (Claude Desktop runs this) |
Configuration
All config is via environment variables (env wins) or the saved store (~/.rm-brain/config.json).
| Env var | Default | Purpose |
|---|---|---|
RM_BRAIN_HOME |
~/.rm-brain |
Where all local data lives |
RM_BRAIN_FOLDER |
/Brain |
reMarkable folder whose notebooks get indexed (case-insensitive) |
RMAPI_BIN |
rmapi |
Path/name of the rmapi binary (ddvk sync15 build) |
RMC_BIN |
rmc |
Path/name of the rmc renderer |
RSVG_BIN |
rsvg-convert |
Path/name of rsvg-convert |
ANTHROPIC_API_KEY |
— | Required only for sync (extraction) |
ANTHROPIC_MODEL |
claude-sonnet-5 |
Vision model for extraction |
Portability & backup
The whole index is one self-contained folder, so:
- Back up:
rm-brain backup [dest.tar.gz], or just copy~/.rm-brain. - Roam / auto-backup: point
RM_BRAIN_HOMEat a Dropbox/iCloud/Syncthing folder. - Restore: extract the archive anywhere and point
RM_BRAIN_HOMEat it.
Troubleshooting
<details> <summary><b>rmapi says "failed to build documents tree … status 410"</b></summary>
Your reMarkable account is on the newer sync protocol. Use the
ddvk sync15 build of rmapi (a release binary is
easiest), not the original juruen/rmapi. Then re-run rm-brain doctor.
</details>
<details> <summary><b>Claude Desktop gives empty results even though the note exists</b></summary>
Claude Desktop launches the MCP server once at startup and keeps it running. After any
rm-brain update, fully quit Claude Desktop (⌘Q, not just close the window) and reopen it
so it reloads the server.
</details>
<details> <summary><b>Claude answers from the calendar/memory instead of my notes</b></summary>
Add a one-line personal instruction in Claude Desktop → Settings → Profile / Custom Instructions: "I keep my handwritten notes in rm-brain. For anything about my tasks, plans, or notes, use the rm-brain tools first." The server also ships proactive instructions, but a personal instruction is the most reliable nudge. </details>
<details> <summary><b>My notebook isn't being indexed</b></summary>
Make sure it's inside the Brain folder (case-insensitive) and that the tablet has synced
to the cloud (Wi-Fi on). Then run rm-brain sync. Notebooks named private/noindex/dotted
are skipped by design.
</details>
<details> <summary><b>I changed the extraction prompt / model — old pages didn't update</b></summary>
A normal sync skips pages whose image is unchanged. Run rm-brain reindex to re-extract
everything.
</details>
Roadmap / not in v1 (on purpose)
No vector search / embeddings (FTS5 keyword search only), no notifications or daily digests, no summary dashboard, no web UI. This stays a tool you reach for, not one that reaches for you. Ideas and PRs welcome — see CONTRIBUTING.md.
Contributing
Contributions are very welcome! Please read CONTRIBUTING.md to get set up, and CODE_OF_CONDUCT.md. Security issues: SECURITY.md.
💛 Support
If rm-brain is useful to you, consider supporting development — it genuinely helps and keeps the project going:
<p align="center"> <a href="https://buymeacoffee.com/anhaia"> <img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-☕%20support-FFDD00?style=for-the-badge&logo=buymeacoffee&logoColor=black" alt="Buy Me a Coffee"> </a> <a href="https://xgabriel.com"> <img src="https://img.shields.io/badge/Visit-xgabriel.com-6E56CF?style=for-the-badge&logo=safari&logoColor=white" alt="xgabriel.com"> </a> </p>
You can also ⭐ star the repo — it helps others discover it.
License
<div align="center"> <sub>Built by <a href="https://xgabriel.com">Gabriel Anhaia</a> · ☕ <a href="https://buymeacoffee.com/anhaia">Buy me a coffee</a></sub> </div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。