New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

remnote-bridge

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remnote-bridge

RemNote 自动化桥接工具集:CLI + MCP Server + Plugin

latest
npmnpm
Version
0.1.18
Version published
Maintainers
1
Created
Source

remnote-bridge

中文文档

Bridge toolkit that exposes your RemNote knowledge base to AI agents. Single package — CLI, MCP Server, and Plugin all in one.

Install

npm install -g remnote-bridge

Super Quick Start (with AI)

One step to connect, then let AI guide you through the rest.

Option A: Install Skill (works with Claude Code, Cursor, Windsurf, and 40+ tools)

npx skills add baobao700508/unofficial-remnote-bridge-cli -s remnote-bridge

Option B: Configure MCP Server (for any MCP-compatible AI client)

Add the following to your AI client's MCP settings:

{
  "mcpServers": {
    "remnote-bridge": {
      "command": "remnote-bridge",
      "args": ["mcp"]
    }
  }
}

Tip: Install both for best results. MCP documentation is kept concise (loaded all at once), while Skill documentation is detailed (loaded on demand). Together they complement each other. That said, either one works independently — you don't need both.

Once connected, the AI will guide you through connecting to RemNote, loading the plugin, and everything else.

Quick Start

Recommended for daily use — you control when to load and unload the plugin.

# 1. Start the daemon (launches WS server + plugin server)
remnote-bridge connect

# 2. Load the plugin in RemNote
#    Open RemNote → Plugins → Develop Your Plugin
#    Enter: http://localhost:8080

# 3. Check system status
remnote-bridge health

# 4. Explore your knowledge base
remnote-bridge read-globe                    # Global document overview
remnote-bridge read-context                  # Current page context in RemNote
remnote-bridge search "machine learning"     # Full-text search
remnote-bridge read-tree <remId>             # Expand a subtree
remnote-bridge read-rem <remId>              # Read Rem properties

# 5. Edit content
remnote-bridge edit-rem <remId> --changes '{"text":["new text"]}'
remnote-bridge edit-tree <remId> --old-str '  old line <!--id-->' --new-str '  new line\n  old line <!--id-->'

# 6. Stop the daemon
remnote-bridge disconnect

Headless Mode (fully automated)

Zero human intervention after initial setup — use only for fully automated workflows.

# 1. One-time: login to RemNote in Chrome (saves credentials)
remnote-bridge setup

# 2. Auto-connect with headless Chrome (no browser window needed)
remnote-bridge connect --headless

# 3. Verify all layers are ready
remnote-bridge health

# 4. Use any command — done!
remnote-bridge search "machine learning"

Commands

Infrastructure

CommandDescription
setupLaunch Chrome for RemNote login, save credentials for headless mode
connectStart the daemon (--headless for auto Chrome, default requires manual plugin load)
healthCheck daemon/Plugin/SDK status (--diagnose for screenshots, --reload to restart Chrome)
disconnectStop the daemon and release resources
cleanRemove all residual files (.pid / .log / .json / skill dirs)

Read

CommandDescriptionCaches
read-globeGlobal document-level overviewNo
read-contextCurrent page/focus context viewNo
read-tree <remId>Subtree as Markdown outlineYes
read-rem <remId>Single Rem's full JSON propertiesYes
read-rem-in-tree <remId>Subtree outline + all Rem objects in one callYes
search <query>Full-text searchNo

Write

CommandDescriptionPrerequisite
edit-rem <remId>Directly modify Rem fields (text, backText, type, etc.)read-rem first
edit-tree <remId>Edit tree structure via str_replaceread-tree first

Utilities

CommandDescription
mcpStart the MCP Server (stdio transport)
install skillInstall AI agent skill (via Vercel Skills)
addon list|install|uninstallManage addon projects (e.g. remnote-rag)

MCP Server

Use remnote-bridge mcp as an MCP server for AI clients:

{
  "mcpServers": {
    "remnote-bridge": {
      "command": "remnote-bridge",
      "args": ["mcp"]
    }
  }
}

The MCP server exposes all CLI commands as tools. Documentation is inlined into tool descriptions and server instructions (no separate resources).

AI Agent Skill

The Skill provides detailed instructions (SKILL.md + 11 command docs) that teach AI agents how to use remnote-bridge — including command selection, workflows, safety rules, and flashcard operations.

Powered by the Vercel Skills ecosystem. Supports 40+ AI coding tools including Claude Code, Cursor, Windsurf, GitHub Copilot, Cline, and more.

# Direct — interactive agent selection
npx skills add baobao700508/unofficial-remnote-bridge-cli -s remnote-bridge

# Or through the built-in wrapper (same interactive experience)
remnote-bridge install skill

The interactive installer will detect your installed AI tools and let you choose which ones to install the skill for.

Fallback: Claude Code only

If npx is not available, or you prefer manual installation:

remnote-bridge install skill --copy

This copies the skill files directly to ~/.claude/skills/remnote-bridge/.

What gets installed

<agent-skills-dir>/remnote-bridge/
├── SKILL.md              # Core skill — command decisions, workflows, safety rules
└── instructions/         # Detailed per-command documentation
    ├── overall.md        # Global overview
    ├── connect.md        # connect command
    ├── read-tree.md      # read-tree command
    ├── edit-tree.md      # edit-tree command
    └── ...               # 8 more command docs

JSON Mode

All commands support --json for programmatic usage. In JSON mode, both input and output are JSON:

# Input: all parameters packed in a JSON string
remnote-bridge --json read-rem '{"remId":"abc123","fields":["text","type"]}'

# Output: single-line JSON
# {"ok":true,"command":"read-rem","timestamp":"...","data":{...}}

Multi-Instance

Run multiple daemon instances in parallel (e.g. different knowledge bases):

# Named instances
remnote-bridge --instance work connect
remnote-bridge --instance personal connect

# Headless shorthand
remnote-bridge --headless connect    # equivalent to --instance headless

# Commands auto-route to the right instance
remnote-bridge --instance work search "project notes"

Instances are managed via a global registry at ~/.remnote-bridge/. Each instance gets its own port allocation, PID file, and log file.

Architecture

AI Agent (Claude Code / MCP Client)
    ↕  CLI commands (stateless short processes)
remnote-bridge CLI
    ↕  WebSocket IPC
Daemon (long-lived process: WS server + handlers + cache)
    ↕  WebSocket
remnote-plugin (runs inside RemNote browser or headless Chrome)
    ↕
RemNote SDK → Knowledge Base
  • CLI commands are stateless — each invocation is an independent OS process
  • Daemon holds state: cache, WS connections, timeout timer
  • Plugin runs in the browser (or headless Chrome), calls RemNote SDK on behalf of the daemon
  • Multi-instance — multiple daemons can run simultaneously, each plugin can connect to multiple daemons with twin priority
  • Headless mode launches Chrome automatically using saved credentials — no browser window needed
  • Three safety guards protect edits: cache existence check, optimistic concurrency detection, str_replace exact match (for edit-tree)

Configuration

Optional config file: .remnote-bridge.json in project root.

{
  "wsPort": 3002,
  "devServerPort": 8080,
  "configPort": 3003,
  "daemonTimeoutMinutes": 30,
  "defaults": {
    "maxNodes": 200,
    "maxSiblings": 20,
    "readTreeDepth": 3
  }
}

All values have sensible defaults — the config file is not required.

Acknowledgements

This project was inspired by and learned from:

  • remnote-mcp-bridge by @quentintou — The original MCP bridge connecting RemNote to AI assistants. Pioneered the idea of bridging RemNote SDK to external tools via MCP.
  • remnote-mcp-bridge (fork) by @robert7 — Extended the original with a generic, extensible WebSocket bridge architecture. Its Plugin ↔ WebSocket ↔ CLI layered design gave us valuable architectural insights.

Addons

Addon projects extend remnote-bridge with additional capabilities:

AddonDescription
remnote-ragSemantic search via ChromaDB + DashScope embeddings
remnote-chatChat interface for RemNote knowledge base
# List available addons
remnote-bridge addon list

# Install an addon
remnote-bridge addon install remnote-rag

# Uninstall (--purge to remove data)
remnote-bridge addon uninstall remnote-rag --purge

Roadmap

  • RAG-powered search — Semantic retrieval via local SQLite + ChromaDB, complementing SDK full-text search
  • Multi-language support — Internationalization for broader accessibility

Changelog

0.1.17 (2026-03-19)

  • Defense-2 three-layer field classificationedit_rem concurrency detection now classifies field differences into three tiers: semantic fields (text/type/tags etc.) → hard reject; parent → pass with ⚠️ parent has changed warning; metadata (position/timestamps etc.) → pass with ℹ️ Metadata fields changed warning. This eliminates false positives after edit_tree move/reorder operations
  • Documentation sync — Updated defense-2 descriptions across all 5 doc surfaces (SKILL.md, edit-rem.md, overall.md, MCP tool description, SERVER_INSTRUCTIONS) with three-layer classification, warning text examples, and revised judgment tree

0.1.16 (2026-03-19)

  • Ordered list prefix toleranceedit-tree now accepts 2.~9. prefixes for ordered lists, auto-normalizes to isListItem=true, and returns templateWarnings to remind agents to use 1. (Lazy Numbering). 10. and above are not matched (kept as plain text)
  • templateWarnings passthrough fix — CLI edit-tree command now correctly includes templateWarnings in JSON output (was silently dropped)
  • Lazy Numbering documentation — Added prominent warnings in MCP tool description, SERVER_INSTRUCTIONS, and Skill docs explaining RemNote's auto-numbering convention

0.1.15 (2026-03-18)

  • Defense-2 false positive fix — Removed .sort() from ID arrays in RemObject serialization that caused spurious concurrency conflicts in edit-rem
  • Documentation overhaul — Strengthened headless mode warnings, added anti-hallucination guardrails for Plugin loading instructions, restructured edit-tree template/fallback dual-mode docs
  • Skill ↔ MCP doc sync — Aligned connect, edit-tree, overall instructions across Skill and MCP layers

0.1.14 (2026-03-18)

  • read-rem-in-tree — New command: fetch subtree outline + all Rem objects in one call (batch read for bulk edits)
  • Token Slimmingread-rem omits default-value fields by default, reducing token usage; use --full for complete output
  • rem-field-filter — Extracted reusable field filtering logic from read-handler
  • Headless policy — Added headless prohibition to CLAUDE.md for testing scenarios
  • health improvements — Refactored diagnostics with better status reporting

0.1.13 (2026-03-15)

  • edit-rem rewrite — Replaced str_replace with direct field modification (--changes flag)
  • MCP resources removed — All documentation inlined into tool descriptions and server instructions
  • MCP return format standardized — Frontmatter+Body for outline tools, Data JSON for action tools

0.1.12 (2026-03-15)

  • Multi-instance support--instance <name> flag, global registry at ~/.remnote-bridge/, parallel daemons
  • Multi-connection Plugin — Single Plugin connects to multiple daemons with twin priority mechanism
  • Addon systemaddon list|install|uninstall commands for managing extension projects (remnote-rag, remnote-chat)
  • read-context focusRemId — Optional parameter to specify focus target without changing RemNote UI
  • Output refinementschildren moved from default to full mode (read-rem --full)

0.1.9 (2026-03-09)

  • Recommend standard mode for daily use; headless only for full automation

0.1.8 (2026-03-09)

  • Headless Chromesetup + connect --headless + health --diagnose/--reload for zero-intervention workflows
  • Static plugin server — Lightweight production server replacing webpack-dev-server in non-dev mode

0.1.7 (2026-03-08)

  • Portal support — Read/edit Portal Rem with dual-path resolution (portal ↔ source)
  • Tree operations — Create and delete Rem via edit-tree

0.1.6 (2026-03-07)

  • Connect timeout extended from 10s to 60s

0.1.5 (2026-03-07)

  • Dev-server crash self-healing (clean reinstall + retry)

0.1.4 (2026-03-07)

  • Windows compatibility fixes
  • clean command for removing residual files
  • read-context prompt enhancements

0.1.3 (2026-03-07)

  • RichText documentation overhaul

0.1.2 (2026-03-07)

  • Vercel Skills ecosystem integration (npx skills add ...)
  • connect user guidance improvements

0.1.1 (2026-03-07)

  • Slim npm package (precise files whitelist)

0.1.0 (2026-03-07)

  • Initial release — CLI + MCP Server + Plugin as single remnote-bridge package
  • Commands: connect, disconnect, health, read-rem, edit-rem, read-tree, edit-tree, read-globe, read-context, search
  • Three-layer architecture: Plugin (RemNote SDK) → CLI (commands) → MCP/Skill (AI agents)
  • Session-based LRU cache with optimistic concurrency control
  • Powerup noise filtering, ancestor breadcrumbs, ellipsis for large trees

License

MIT

FAQs

Package last updated on 22 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts