palmifer-mcp
Drives a signed-in Brave browser over CDP as a supported Chromium-based browser, exposing tab control, navigation, DOM/text extraction, screenshots, and interaction tools.
Drives the user's real logged-in Chrome or a throwaway headless Chrome over CDP, enabling tab/window management, navigation, DOM/text extraction, screenshots, network capture, and page interactions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@palmifer-mcp Open github.com/trending and extract the top 5 repositories and their languages."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
palmifer-mcp
Zero-dependency Model Context Protocol (MCP) server wrapping palmifer to drive your real, logged-in Chrome (or a throwaway headless Chrome) over CDP — built for sandboxed desktop AI apps (Gemini App, Claude Desktop, Cursor, Antigravity) where agent shell commands cannot read Chrome's DevToolsActivePort or bind 127.0.0.1.
它是什么:把 palmifer 封装为宿主机侧的 stdio MCP Server(纯 Node.js ≥ 22,228 KB 零第三方 npm 依赖)。像 Gemini App 这类沙箱较严的桌面客户端,Agent 自己跑 shell 会遇到 EPERM / 无法连本地端口 / 无法启动子进程,通过 palmifer-mcp 就能直接把 25 个强类型浏览器工具暴露给 Agent。
核心优势(v0.4.1 实测):
直连你已登录的真实 Chrome:在
chrome://inspect/#remote-debugging勾一次开关、弹窗点一次 Allow,后台 daemon 持久复用连接;支持new_window: true独立窗口隔离,不弄乱你的主窗口标签页,也不会因为你切 tab 变成hidden。毫秒级直连快路径:MCP Server 对已运行的本地 daemon 直接走
127.0.0.1loopback HTTP,跳过每次拉起 Node 子进程的 ~150 ms 开销(实测browser_tabsp50 0.97 ms vs 子进程模式 156.3 ms);private_start冷启动 823 ms,首次整套启动→打开公网页面 1,874 ms(快于@playwright/mcp3,389 ms 与chrome-devtools-mcp2,808 ms)。省 Token 15x–24x 的免弹窗只读读取:
browser_dom(fields=...)用纯 DOM 选择器一次抽取出干净 JSON 数组(穿透 Shadow DOM、自动把相对链接解析为绝对https://...、跳过空骨架行、支持dedupe_by去重),无需触发高风险的browser_eval弹窗;browser_text(main_only=true)自动剔除nav/header/footer/aside噪音。7 个真实公网站点只读总计 5,291 tokens(对比chrome-devtools-mcp79,690 tokens、@playwright/mcp125,847 tokens;即使使用有界 AX 树browser_snapshot(limit=220)也仅 10,289 tokens)。权限分级与防越权:
readOnlyHint(7 个)、destructiveHint: false(10 个)、destructiveHint: true(8 个);browser_batch严格禁止内部夹带破坏性工具(browser_eval/browser_click等),并直接内嵌原生 JSONdata减少回传体积;--参数分隔符与沙箱路径校验防止命令行/路径注入。自带排障与托管 CLI:
palmifer-mcp doctor一眼看清当前 MCP 入口、daemon PID、运行中脚本路径和代码是否过期(mcpStale/daemon.stale);palmifer-mcp daemon install可把 daemon 装为 macOS LaunchAgent 跑在宿主桌面会话中,彻底解决 Gemini App 沙箱内无法启动无头 Chrome(Mach IPCbootstrap_check_in被拒)的问题。
Architecture
MCP Host (Gemini App / Claude Desktop / Cursor / Antigravity)
│ stdio JSON-RPC 2.0
▼
palmifer-mcp (0.4.1, Node >= 22, 228 KB, zero deps)
├── fast-path: direct 127.0.0.1:8798 HTTP /run (~0.97 ms p50)
└── fallback: spawn vendor/palmifer/palmifer.mjs (starts daemon on first call)
│
▼
palmifer daemon (127.0.0.1:8798, token-auth)
├── real mode ──CDP──▶ Your Chrome (existing logins, 1x Allow)
├── anon context ──CDP──▶ Cookie-less window inside current Chrome
└── private mode ──CDP──▶ Throwaway headless Chrome (~823 ms cold start)Related MCP server: TraeBridge MCP Server
Measured Benchmark (v0.4.1 vs Competitors)
Head-to-head benchmark across 9 real websites (Authenticated: X.com, Bilibili.com; Public: simonwillison.net, lobste.rs, ithome.com, sspai.com, bbc.com/news, en.wikipedia.org, github.com/trending) plus Shadow DOM / iframe fixtures. Full methodology and per-site tables live in bench/RESULTS.md.
KPI |
|
|
|
Install size / deps | 228 KB (0 deps) | 19,176 KB | 12,508 KB |
Schema prompt tax ( | 4,516 tokens | 5,300 tokens | 8,303 tokens |
Cold start → first page ready | 1,874 ms | 3,389 ms | 2,808 ms |
7-site read-only | 5,291 tokens (AX snap: 10,289) | 125,847 tokens (23.8x) | 79,690 tokens (15.1x) |
Structured Top-5 extract | 2.9–5.3 ms ( | 506–1,823 ms ( | 101–106 ms ( |
Multi-step browse ( | 2 rounds / 466.4 ms / 441 tok | 4 rounds / 2,053.0 ms / 779 tok | 4 rounds / 799.3 ms / 533 tok |
Shadow DOM + Iframe read-only | 6.32 ms / 44 tokens | 3.37 ms / 84 tokens | 3.63 ms / 78 tokens |
Authenticated | Real logged-in feed (both) | Hit X login wall / guest view | Hit X login wall / guest view |
Requirements
Node.js >= 22 (zero
npm installneeded)Google Chrome / Chromium / Edge / Brave
To drive your own signed-in Chrome:
Open
chrome://inspect/#remote-debuggingin ChromeTick "Allow remote debugging for this browser instance"
Click Allow once when Chrome prompts on first connection
Install & Configure
Keep a stable local path under ~/.mcp/servers/ so MCP clients never point at temporary folders:
mkdir -p ~/.mcp/servers
git clone https://github.com/kjx-talesofai/palmifer-mcp.git ~/.mcp/servers/palmifer-mcp
node ~/.mcp/servers/palmifer-mcp/bin/palmifer-mcp.mjs config --stableAdd to your MCP host (Gemini App, Claude Desktop, Cursor, Antigravity):
{
"mcpServers": {
"palmifer": {
"command": "/opt/homebrew/bin/node",
"args": [
"/Users/<you>/.mcp/servers/palmifer-mcp/bin/palmifer-mcp.mjs"
],
"env": {
"PALMIFER_MCP_KEEP_DAEMON": "1"
}
}
}
}Tip: Replace
/opt/homebrew/bin/nodewith the output ofwhich nodeso GUI apps (which don't inherit shellPATH) can always launch Node >= 22. SettingPALMIFER_MCP_KEEP_DAEMON=1keeps your Chrome Allow approval alive across MCP reconnects; set"0"if you want the daemon stopped on MCP exit.
Optional LaunchAgent (Recommended for Sandboxed Hosts like Gemini App)
Sandboxed macOS desktop apps (such as Gemini App's Seatbelt sandbox) block child processes from using Chrome's Mach IPC (bootstrap_check_in: Permission denied), which makes headless private_start fail inside the sandbox. Running the palmifer daemon in your normal user LaunchAgent session solves both headless private_start and persistent Chrome Allow across app restarts:
node ~/.mcp/servers/palmifer-mcp/bin/palmifer-mcp.mjs daemon installManage or inspect anytime:
node ~/.mcp/servers/palmifer-mcp/bin/palmifer-mcp.mjs doctor # inspect PID, script paths, stale code
node ~/.mcp/servers/palmifer-mcp/bin/palmifer-mcp.mjs restart # stop running daemon so new disk code loads
node ~/.mcp/servers/palmifer-mcp/bin/palmifer-mcp.mjs daemon status # check LaunchAgent status
node ~/.mcp/servers/palmifer-mcp/bin/palmifer-mcp.mjs daemon uninstallEnvironment Variables
Variable | Description | Default |
| Override path to |
|
| Daemon state directory (for multi-client isolation) |
|
| Daemon loopback HTTP port |
|
| Keep daemon alive on MCP exit ( |
|
| Set |
|
| Per-tool execution timeout (ms) |
|
| Set |
|
| Extra Chrome flags for | Inherits |
Tools (25)
Tools carry MCP ToolAnnotations so hosts can auto-approve read-only & low-risk calls while prompting on destructive actions:
Read-Only (readOnlyHint: true, destructiveHint: false)
browser_status— Daemon, CDP mode/tabs, plusmcpdiagnostics (version,pid,entry,mcpStale,daemon.stale)browser_tabs— List open tabs with index,targetId,mine,anon, title, URLbrowser_frames— List#fNiframes in a tabbrowser_snapshot— Accessibility tree with@eNrefs (actionable_only,filter,limit)browser_text— VisibleinnerText, withmain_only=true(stripsnav/header/footer/asideclutter) orselectorbrowser_dom— Shadow-DOM-piercing query & read-only structured JSON extractor viafields(".","@attr","<css>","<css>@<attr>", trailing"[]"), with automaticresolve_urls,skip_empty, anddedupe_bybrowser_wait— Wait for CSS selector or visible text
Non-Destructive Navigation & Capture (readOnlyHint: false, destructiveHint: false, openWorldHint where noted)
browser_mode—private_start(http(s)|about:blankURL only,openWorldHint: true),private_status,use_private,use_real,anon_on,anon_statusbrowser_open— Open URL in new tab or isolated window (new_window=true,background=true)browser_goto— Navigate current/specified tab (reuses isolated window)browser_use_tab— Select active tab by index string,targetId, or substringbrowser_front— Bring hidden tab to front (preferfront=truedirectly on actions)browser_scroll— RealmouseWheelscrolling (down/up/bottom/top)browser_screenshot— PNG/JPEG/WebP capture (full,scale,max_width,annotate,include_image)browser_pdf— Render tab to PDF on diskbrowser_network— Capture & inspect XHR/fetch traffic (start,list,detail,stop)browser_batch— Run multiple read-only / non-destructive steps in one call with native JSONdata(rejectsdestructiveHint=truetools)
Destructive / State-Changing (destructiveHint: true)
browser_click— Trusted click by@eN, CSS, text, or(x, y)(front,fast,verify)browser_fill— Trusted focus + clear + type into input (front,fast,verify)browser_press— Trusted key press (Enter,Tab,Escape,Meta+A, etc.)browser_upload— Attach local files to<input type="file">browser_eval— Evaluate arbitrary JS in page/iframebrowser_close_tab— Close specific tab,mine=true, orall=truebrowser_session— Teardown & lifecycle:browser_close,anon_off,cancel,stop,restart_daemonbrowser_cdp— Raw CDPDomain.methodescape hatch
Tests & Benchmark
npm run check # syntax check all .mjs files
npm test # 14 unit, schema, security-hardening, batch-guard, stale-detection, and Mach sandbox fast-fail tests
npm run test:e2e # full headless Chrome E2E suite (private_start, dom fields, text main_only, trusted events, upload, iframe, pdf, network, batch, anon, public web, HTTP vs spawn benchmark)Author
Built by Jiaxin Kou · GitHub
License
MIT — see LICENSE.
Available Tools
25 toolsbrowser_batchAIdempotent
Run multiple read-only/non-destructive steps in one MCP call to cut round-trips. Destructive tools (click/fill/press/eval/upload/close_tab/session/cdp) are rejected and must be called directly.
Inputs: steps (required), stop_on_error.
browser_cdpCDestructive
Send raw CDP Domain.method command.
Inputs: method (required), tab, params, browser_level.
browser_clickADestructive
Send trusted click to @eN, CSS, text, or (x, y). Pass front=true if tab may be hidden, fast=true to skip pacing, verify='' to assert.
Inputs: x, y, nth, tab, +9 more.
browser_close_tabBDestructive
Close a tab, tabs opened by palmifer (mine=true), or all tabs.
Inputs: all, tab, mine, force.
browser_domARead-onlyIdempotent
Read-only DOM probe & structured JSON extractor (pierces shadow roots, zero eval). Pass 'fields' with 'selector' (e.g. { author: '.user', text: '.body', link: 'a@href', tags: '.tag[]', id: '@data-id' }); '.'=text, '@attr'=attr, '[]'=array. Resolves relative URLs & skips empty rows by default. Use within='' to scope.
Inputs: all, tab, text, exact, +9 more.
browser_evalADestructive
Evaluate JS in page/iframe. Prefer read-only browser_dom(fields) or browser_text(main_only=true) for extraction; avoid fetch().
Inputs: tab, code, file, frame, +1 more.
browser_fillADestructive
Focus @eN, CSS, or (x, y) and type text (replaces unless append=true). Pass front=true if hidden and fast=true for instant trusted insert.
Inputs: value (required), x, y, tab, +7 more.
browser_framesBRead-onlyIdempotent
List iframes (#fN) inside a tab.
Inputs: tab.
browser_frontAIdempotent
Raise a tab to foreground. Prefer passing front=true directly on click/fill/press/scroll.
Inputs: tab.
browser_gotoB
Navigate current/specified tab to URL (prefer reusing an isolated window tab).
Inputs: url (required), tab, fast, no_wait.
browser_modeC
Low-risk mode switcher: private_start (headless, prefer when logins aren't needed), private_status, use_private, use_real, anon_on (fallback cookie-less context if sandbox blocks headless), anon_status.
Inputs: action (required), url, headed, dry_run, +1 more.
browser_networkAIdempotent
Capture & inspect page network requests (start, list, detail, stop).
Inputs: action (required), tab, limit, filter, +1 more.
browser_openA
Open URL in a new tab (or new_window=true dedicated window). In real Chrome mode, prefer new_window=true so user tab switches won't hide agent tabs.
Inputs: url (required), fast, no_wait, background, +1 more.
browser_pdfBIdempotent
Render tab to a PDF file inside cwd or temp dir.
Inputs: tab, path.
browser_pressADestructive
Send trusted key press (Enter, Tab, Escape, Meta+A). Pass front=true if hidden.
Inputs: key (required), tab, fast, front, +1 more.
browser_screenshotBIdempotent
Capture screenshot to temp/cwd path (PNG/JPEG/WebP). Set include_image=true to return base64 inline.
Inputs: tab, full, path, scale, +4 more.
browser_scrollAIdempotent
Scroll via real mouseWheel events (down/up/bottom/top). Pass front=true if hidden and fast=true for quick paging.
Inputs: max, tab, fast, front, +3 more.
browser_sessionADestructive
Destructive lifecycle ops: browser_close, anon_off, cancel, stop, restart_daemon. For starting/switching modes use browser_mode.
Inputs: action (required).
browser_snapshotARead-onlyIdempotent
Capture accessibility tree with @eN refs. Use actionable_only=true for compact interactive views.
Inputs: tab, frame, limit, filter, +1 more.
browser_statusARead-onlyIdempotent
Check daemon, CDP connection, mode (real vs private), tab count, and MCP/daemon stale diagnostics.
Inputs: port.
browser_tabsARead-onlyIdempotent
List open Chrome tabs with index, id, title, and URL.
Inputs: no named parameters.
browser_textBRead-onlyIdempotent
Read visible innerText. Pass main_only=true (strips nav/header/footer/aside) or selector='' to avoid clutter.
Inputs: max, tab, frame, selector, +1 more.
browser_uploadCDestructive
Attach local files to a element.
Inputs: files (required), selector (required), tab, frame.
browser_use_tabCIdempotent
Select active tab by index string ('0'), targetId, or URL/title substring.
Inputs: tab (required).
browser_waitARead-onlyIdempotent
Wait for a CSS selector or visible text (read-only; for JS predicates use browser_eval).
Inputs: tab, text, frame, timeout, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 25 tools
Most tools have clearly distinct purposes, and descriptions actively steer between overlapping extraction modes (text vs dom vs snapshot) and lifecycle controls (mode vs session). Minor ambiguity remains around status variants, tab closing vs browser closing, and front vs use_tab.
All tools consistently use the browser_ prefix with snake_case suffixes, making the namespace predictable. However, many names are noun-oriented (browser_tabs, browser_status, browser_pdf) rather than strict verb_noun action names.
25 tools sits at the heavy end for a single MCP server. Browser automation justifies many primitives, but the inclusion of advanced/control tools like cdp, batch, network, and session makes the surface feel broad and borderline bloated.
The set covers navigation, tab lifecycle, extraction, interaction, waits, screenshots, PDF/upload, network inspection, CDP, and batching. Minor gaps such as dedicated hover/drag/select or cookie/storage management exist, though most are workaroundable via eval or raw CDP.
Related MCP Connectors
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Cloud browser, web extraction, screenshots, and remote CDP tools for AI agents.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Let AI agents use your real, signed-in Chrome: tabs, clicks, forms, screenshots and video.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to directly control your real Chrome browser with full context including login sessions, cookies, and open tabs. It provides tools for page scanning, JavaScript execution, CDP control, screenshots, and physical mouse/keyboard input for authentic browser automation.20243MIT
- AlicenseAqualityCmaintenanceEnables AI clients to control the user's already-open, logged-in browser pages in real time over a local WebSocket channel, without Playwright, Puppeteer, Selenium, or any browser driver. Exposes tools for navigation, semantic page snapshots, clicking, form filling, JavaScript evaluation, screenshots, network monitoring, cookie handling, and tab management via the CDP.20MIT
- AlicenseBqualityBmaintenanceEnables AI agents and developers to automate real Chrome/Chromium browsers through the Chrome DevTools Protocol, with token-efficient snapshots, multi-action batching, shadow DOM traversal, system-page control, extension management, and network/WebSocket inspection.951MIT
- AlicenseNot gradedqualityBmaintenanceEnables local Chrome control for AI clients over MCP stdio, HTTP, or CLI, exposing 20 tools to extract page text, number and click elements, type text, scroll, manage tabs, capture screenshots, and bind uploaded files to file inputs. Operations run entirely on the local machine with origin allowlists and refusal of untrusted URLs, without calling a cloud model or consuming model tokens.MIT