Repository avatar
Browser Automation
v1.7.0
active

smartclip-mcp

app.smartclip/smartclip-mcp

Read logged-in Chrome tabs as Markdown and clip to 16 note apps via Local Bridge Hub.

Documentation

SmartClip Agent & MCP Server

English | 简体中文 | Official Website | Install & Usage Guide

SmartClip MCP (smartclip-mcp) is a Chrome Extension–powered Model Context Protocol (MCP) server that lets AI coding agents—Claude Code, Cursor, Windsurf, Gemini CLI, and OpenCode—read logged-in webpages as clean Markdown and clip them to 16 note-taking apps.

Unlike headless scrapers or single-app connectors, smartclip-mcp connects directly to your real Chrome session via a Local Bridge Hub (127.0.0.1:18365), reusing your existing browser cookies, paywall/intranet sessions, Turndown conversion rules, and destination credentials—while allowing multiple AI clients to share one extension connection concurrently.


Why SmartClip MCP vs. Alternatives?

CapabilitySmartClip MCPFetch / Firecrawl MCPPlaywright / Browser MCPSingle-App MCP (Notion / Obsidian only)
Reads logged-in / paywalled / intranet pagesYes (uses your live Chrome session)No (anonymous HTTP/headless)Partial (requires separate profile/login)No
Bypasses anti-bot wallsYes (real user browser)Often blockedOften flaggedN/A
Clean HTML-to-Markdown extractionBuilt-in Turndown engine (read_page)VariesRaw DOM / accessibility treeN/A
Multi-platform note clipping16 destinations in one toolsetRead-onlyRead/Automate only1 destination
Concurrent multi-client sharingLocal Bridge Hub (stdio + Streamable HTTP)N/AOften single-browser lockVaries

Quick Start (3 Steps)

1. Enable MCP in the SmartClip Chrome Extension

  1. Install the SmartClip Chrome extension from smartclip.app and sign in (Pro subscription required for MCP service).
  2. Open SmartClip → Options → General Settings and enable Enable MCP Service.

2. Configure Your AI Client

npx smartclip-mcp setup

In interactive mode, setup detects installed client configs and lets you pick targets (pressing Enter writes the first item, .mcp.json; enter a or run npx smartclip-mcp setup --client all to write all 5 targets). It preserves other MCP servers while replacing any existing smartclip entry:

  • Project .mcp.json
  • Claude Code (~/.claude.json)
  • Cursor (~/.cursor/mcp.json)
  • Gemini CLI (~/.gemini/settings.json)
  • Windsurf (~/.codeium/windsurf/mcp_config.json)

For OpenCode or manual stdio configuration:

{
  "mcpServers": {
    "smartclip": {
      "command": "npx",
      "args": ["-y", "smartclip-mcp"]
    }
  }
}

Streamable HTTP (--transport http) requires starting the Local Hub first (npx -y smartclip-mcp daemon start). setup emits client-specific HTTP fields (type: "http" + url for Claude Code / .mcp.json, httpUrl for Gemini CLI, url for Cursor / Windsurf).

3. Restart Your Client & Verify Health

Restart your AI client so it loads the new MCP configuration (or start the Hub manually with npx -y smartclip-mcp daemon start), then run:

npx -y smartclip-mcp doctor

Local Bridge Hub Architecture

Claude Code (stdio) ──┐
Gemini CLI  (stdio) ──┼──▶ smartclip-mcp Local Hub (127.0.0.1:18365) ◀──WS(/)──▶ SmartClip Chrome Extension
Cursor / Windsurf  ───┘       ├─ /mcp    (Streamable HTTP)
                              └─ /health (sub-second health probe)
  • Multi-client concurrency: Run Claude Code, Cursor, and Gemini CLI at the same time sharing one extension connection; write/tab-switching actions are serialized automatically inside the Hub.
  • Persistent browser link: Restarting an AI session does not drop the Chrome extension WebSocket bridge.
  • Standalone fallback: Pass --no-daemon (or set SMARTCLIP_MCP_NO_DAEMON=1) to run in single-process mode inside restricted containers.

16 Supported Note-Taking Destinations

Defined in smartclip-bridge-protocol (destinationSchema):

CategoryDestinations
Local & Knowledge Basesobsidian (Obsidian), siyuan (SiYuan / 思源笔记), logseq (Logseq), joplin (Joplin), markdown (Markdown download)
Cloud Workspaces & Docsnotion (Notion), feishu (Feishu / 飞书), yuque (Yuque / 语雀), wolai (Wolai), flowus (FlowUs)
Quick Capture & Memosflomo (Flomo), memos (Memos), getbiji (GetBiji / Get笔记)
Object Storage Syncs3_doc (AWS S3), aliyun_oss_doc (Aliyun OSS / 阿里云 OSS), tencent_cos_doc (Tencent COS / 腾讯云 COS)

MCP Tools (9) & Native Prompts (4)

ToolPurposeRead-OnlyStructured Output
read_pageRead current tab, tabId, or URL as Markdown (full text returned in content[].text)Yes{ url, title, markdown, totalLength, truncated, warning, createdTabId }
clip_pageExtract a webpage and optionally save to a destinationNo{ url, title, markdown, saved, destination, taskId, warning, createdTabId, clip }
save_clipSave AI-synthesized Markdown/HTML summaries to a destinationNo{ saved, destination, taskId, warning }
list_tabsList open Chrome tabsYes{ tabs, count }
get_daily_tasksView SmartClip daily clipping task poolYes{ tasks, count, lastSyncAt }
clip_daily_taskProcess one daily taskNo{ taskId, title, url, saved, clipTaskId, warning, markdown }
clip_all_daily_tasksBatch-process all pending daily tasksNo{ summary, results }
get_vocabularyRead user vocabulary listYes{ words, count, enabled }
get_statusInspect MCP / extension health and Pro statusYes{ status }

Built-in MCP Prompts: read-webpage, clip-webpage, process-daily-tasks, research-and-save.


Security & Diagnostics

  • CSWSH Protection (Origin Check): WebSocket upgrades only accept browser extension origins (chrome-extension://, moz-extension://, safari-web-extension://) by default and reject webpage origins (403). Setting SMARTCLIP_MCP_ALLOWED_ORIGINS overrides (replaces) this default rule with an exact comma-separated allowlist—include every extension origin you use.
  • Strict Session Token Auth: Read from the environment of the process starting the Local Hub. When SMARTCLIP_MCP_SESSION_TOKEN is set, connections failing or timing out on the hello handshake are closed immediately without legacy fallback. Newer proxies auto-restart a running Hub on token/version mismatch; if removing a token or running daemon start, stop the old Hub first (daemon stop).
  • Internal Hub Isolation: /bridge/invoke and /hub/shutdown reject browser Origin headers and require the per-instance secret in ~/.smartclip/hub.json.

Environment Variables

VariableDefaultPurpose
SMARTCLIP_MCP_SESSION_TOKENunsetShared token required during extension hello handshake
SMARTCLIP_MCP_ALLOWED_ORIGINSextension protocolsComma-separated exact WebSocket Origin allowlist (overrides default)
SMARTCLIP_MCP_WS_BIND_HOST127.0.0.1Hub / WebSocket bind host (use 0.0.0.0 in Docker/WSL)
SMARTCLIP_MCP_PORT18365Hub / WebSocket listening port (same as --port)
SMARTCLIP_MCP_NO_DAEMON0Set to 1 to disable the shared Hub and connect inline
SMARTCLIP_HOME~/.smartclipState directory storing hub.json
npx -y smartclip-mcp doctor                 # Check client configs, Local Hub & extension health
npx -y smartclip-mcp --healthcheck --json   # Fast non-blocking health probe
npx -y smartclip-mcp daemon status          # Inspect background Hub status
npx -y smartclip-mcp daemon stop            # Stop Hub (required when clearing tokens or switching builds)

(If installed globally via npm install -g smartclip-mcp, you can omit npx -y.)


Optional: Agent Skills (smartclip-agent-extension)

smartclip-mcp already ships with MCP instructions and 4 native Prompts. If you also want SKILL.md workflow playbooks for Claude Code or Gemini CLI:

npm install -g smartclip-agent-extension
smartclip-agent-extension

Frequently Asked Questions (FAQ)

How do I let Claude Code or Cursor read logged-in, paywalled, or internal webpages?

Configure smartclip-mcp via npx smartclip-mcp setup, open the page in Chrome with the SmartClip extension enabled, and ask your agent to read it. It calls read_page, which extracts clean Markdown directly from your authenticated Chrome tab without running a separate headless browser.

Can multiple AI clients (e.g. Claude Code + Cursor) use SmartClip at the same time?

Yes. smartclip-mcp starts a shared Local Bridge Hub on 127.0.0.1:18365 supporting both stdio proxy clients and Streamable HTTP (http://127.0.0.1:18365/mcp). Concurrent tab-reading and clipping requests are safely coordinated inside the Hub.

What is the difference between read_page, clip_page, and save_clip?

Use read_page when you only want the AI to read or summarize a page without saving anything; use clip_page with destination to clip a webpage directly to a note app; use save_clip to save AI-synthesized notes, translations, or multi-tab research summaries.


Monorepo Packages & Development

PackagePathPurpose
smartclip-bridge-protocolpackages/smartclip-bridge-protocolShared bridge schemas, error codes, and action contracts
smartclip-mcppackages/smartclip-mcpLocal Bridge Hub, MCP Server (stdio & Streamable HTTP), unified CLI
smartclip-agent-extensionpackages/smartclip-agent-extensionOptional SKILL.md playbooks, hooks, and doctor CLI
pnpm install
pnpm build
pnpm test

License

MIT License © 2024 maike

NPM
smartclip-mcp
Install Command
npm install smartclip-mcp