KenEasy-Gemini-MCP-Auto-Helper
Google Gemini MCP 自动化放行与连续对话助手:MV3 永不断线后台引擎 +…
An intelligent automation extension tailored for Google Gemini web UI (v1.0.0 Stable Release): auto-approves MCP tool permissions with "Always allow", auto-clicks "Continue / Yes" follow-up chips, features live MCP connection wait timer, stall auto-stop & custom reconnect prompt (default: "继续,刚才mcp连接断开了"), one-click "Resume Now", human-like anti-throttling pacing, and a never-sleep MV3 background engine, with 4 languages, Dark/Light themes, zero-glitch hold-to-drag HUD, desktop stall alerts, and a 6-layer circuit breaker.
Summary extracted from the README.
[!NOTE]
✅ Stable Release (v1.0.0)
KenEasy Gemini MCP Auto Helper v1.0.0 is now officially released! The automation engine, live connection wait timer, stall auto-stop & custom reconnect prompt, one-click immediate resume, human-like anti-throttling pacing, 6-layer circuit breaker, hold-to-drag HUD, 4-language & dark/light themes, multi-window guards, and desktop notifications have all passed 100% of automated & VM end-to-end test suites.
- Customize your reconnect prompt or keywords anytime in the popup settings, or report Gemini UI updates on GitHub Issues.
- Star 🌟 and PR contributions are warmly welcomed!
🚀 Installation
Option 1: Chrome Web Store (Pending Review)
The extension has been submitted for Chrome Web Store security review. Once approved, you can install and receive silent auto-updates with one click:
👉 Get KenEasy Gemini MCP Auto Helper on Chrome Web Store (Coming Soon)
Option 2: Manual Installation (Developer Mode - One-Click Direct Download)
Click either link below to immediately download the .zip package with one click:
- 📦 Direct Download: Manual Install Bundle (
KenEasy-Gemini-MCP-Auto-Helper-v1.0.0-manual-install.zip) (Recommended — extracts toKenEasy-Gemini-MCP-Auto-Helper/folder with docs) - 🏪 Direct Download: Clean Extension Zip (
KenEasy-Gemini-MCP-Auto-Helper-v1.0.0-store.zip) (Clean root containingmanifest.json)
Installation steps:
- Click a link above to download the
.zipfile and extract it to a local folder (e.g.E:\code\KenEasy-Gemini-MCP-Auto-Helper). - Open Google Chrome or Microsoft Edge and navigate to:
- Chrome:
chrome://extensions/ - Edge:
edge://extensions/
- Chrome:
- Enable the Developer mode toggle in the top-right corner.
- Click the Load unpacked button in the top-left toolbar.
- In the folder picker dialog, select the extracted folder containing
manifest.json. - Open or refresh Google Gemini (
gemini.google.com). You will see the floating HUD on the page, and clicking the extension toolbar icon opens the full configuration panel.
🎬 Core Features Walkthrough & Demos (v1.0.0 Highlights)
0. Live MCP Wait Timer, Stall Auto-Stop & One-Click Resume + Human Pacing 🆕
Tracks how long Gemini or an MCP server (such as Desktop Commander) has been connecting/waiting directly in the floating HUD and Popup. If a turn stalls past your threshold (default 5 minutes), the extension automatically cancels the stuck turn and sends your customizable reconnect prompt (default:
"继续,刚才mcp连接断开了"), with draft protection, per-task recovery caps, an immediate "Resume Now" button, and human-like anti-throttling pacing (natural delays, chunked typing, and a 60s anti-burst governor).
1. Never-Sleep MV3 Background Engine & Smart Click Retry
Keep Gemini running uninterrupted while minimized, on background tabs, or when working in other apps. A ~19.5s Service Worker keepalive prevents MV3 30-second idle suspension, proactive 4-minute Port rotation avoids Chrome's 5-minute forced disconnect, unthrottled Service Worker delayed ticks (
GMAH_SCHEDULE_TICK) complete settling and cooldown waits on time, and failed background clicks automatically retry once with@material/webShadow DOM piercing.
2. Zero-Glitch Hold-to-Drag Floating HUD 🆕
Left-click and hold the HUD header to drag it smoothly anywhere across the Gemini viewport — simply hovering near the header never moves or traps the HUD! Now ignores Windows minimize (
0x0resize) so coordinates never snap to(0, 0), auto-clamps inside the viewport when expanding or opening Logs/Inspect panels, and supports one-click position reset in the popup.
3. One-Click Desktop Notification & Anti-Stall Alert
If an MCP tool execution hangs or model output stalls longer than the configured threshold (default 5 minutes), the extension triggers a localized OS desktop notification and flags a red
!badge on the toolbar icon. Easily mute or enable with a single click directly from the on-page HUD or the popup. Clicking the notification instantly brings the Gemini tab and window back to the foreground.
4. Dark & Light Dual Themes + 4-Language Control Center (Auto-Save) 🆕
Switch effortlessly between Dark Night and Light Daylight themes (
🌙 / ☀️) and across 4 languages (Simplified Chinese, Traditional Chinese, English, and Japanese) in real time from either the popup or HUD. Numeric inputs and custom keywords now auto-save immediately and push live settings to open Gemini tabs to reconcile tripped breakers instantly.
⚡ Capability Matrix
| Category | Feature | Technical Breakdown |
|---|---|---|
| Background Engine 🆕 | Never-Sleep MV3 Keepalive | Combines ~19.5s MV3 Service Worker keepalive, proactive 4-minute Port rotation, unthrottled SW delayed settling/cooldown ticks (GMAH_SCHEDULE_TICK), and tab/window focus wakeups so automation never stalls in background tabs or other apps. |
| Smart Click Retry 🆕 | Shadow DOM Piercing | Auto-retries un-dismissed background clicks once with center coordinates, safe non-scrolling focus, and @material/web ShadowRoot inner <button> piercing without double-counting or false breaker trips. |
| MCP Auto-Approval | Always Allow Priority | Prefers and auto-clicks Always allow (and localized equivalents), penetrating Material Web Components <slot> projections, split inline <span> labels, and role="menu" / role="menuitem" dropdowns. |
| Single Allow Fallback | Safe Single Click | Optional fallback to click Allow once when no permanent option exists, strictly guarded by sibling context checks and 4-language cookie/notification/camera/mic/location exclusions. |
| Smart Continuity | Follow-up Chip Click | Detects and triggers explicit affirmative ↪ Yes follow-up chips and "Continue" buttons, strictly ignoring general suggestions, surveys, and chat history. |
| Hold-to-Drag HUD 🆕 | Zero-Glitch Positioning | Left-button press guard eliminates hover-sticking; ignores Windows minimize 0x0 resize events; auto-clamps on expand/panel open; includes popup Reset HUD button. |
| 4 Languages & Themes | 4 Locales + Dark/Light | Live UI, engine status, notifications, and keyword matching across Simplified Chinese, Traditional Chinese, English, and Japanese, with synchronized Dark / Light themes. |
| Multi-Window & Route Guard | Zero Accidental Clicks | Skips non-chat routes (/gems, /extensions, /settings), 0-turn screens, and stale history chips on restored tabs in secondary windows, while allowing first continues on newly created /app → /app/<id> chats. |
| Desktop Notifications | One-Click Anti-Stall Alert | Issues localized desktop notifications when MCP execution exceeds the stall threshold (1–60 mins); togglable instantly from either the HUD or the popup. |
| Tab Discard Protection | Anti-Memory-Saver Sleep | Sets autoDiscardable: false on active Gemini tabs to prevent Chrome Memory Saver from unloading active sessions. |
| 6-Layer Circuit Breaker | Anti-Loop Quota Guard | Enforces per-task limits, daily limits, streaming stabilization settle time, operation cooldown, completion cues, and stagnant output detection. |
| Custom Keywords | Auto-Saved Rule Lists | Extend built-in dictionaries with comma- or newline-separated custom phrases that auto-save and sync live to open Gemini tabs. |
| Emergency Kill Switch | Instant Safe Brake | Prominent "Emergency Stop" button instantly blocks all automation actions; includes "Reset Breaker" and "Reset Stats" controls. |
🛡️ 6-Layer Anti-Loop Circuit Breaker Architecture
To safeguard your API quotas and tokens against runaway recursive loops, the extension implements a comprehensive multi-tier circuit breaker:
┌────────────────────────────────────────────────────────┐
│ Gemini Output & DOM Mutation Stream │
└──────────────────────────┬─────────────────────────────┘
│
▼ Layer A: Quota & Error Breaker (Immediate Trip)
[ "Reached your limit" / "Quota exceeded" / "Try again later" ] ──► 🚨 Hard Stop
│
▼ Layer B: Streaming Settle Guard (Wait for Completion)
[ Observe DOM until stable with no cursor for >= 1.8s ]
│
▼ Layer C: Operation Cooldown Guard (Rate Limiting)
[ Force minimum 4.0s delay after every "Continue" action ]
│
▼ Layer D: Per-Task Continue Limit (Single Prompt Guard)
[ Max continues reached (default 10) ] ──► 🛑 Per-Task Trip
│
▼ Layer E: Daily Continue Cap (All-Day Safety Net)
[ Daily cap reached (default 0=unlimited) ] ──► 🛑 Daily Trip
│
▼ Layer F: Completion Cue & Smart Pass-Through
[ "Task completed" found & no explicit ↪ Yes chip ] ──► ⏹️ Skip Action
│
▼ Layer G: Stagnant Output & Repetition Detection
[ Output DOM unchanged or identical text across turns ] ──► ⚠️ Stagnant Trip
- Layer A · Quota & Error Cutoff: Instantly halts all automated actions when Gemini outputs error phrases such as
reached your limit,quota exceeded,please try again later, or system service errors. - Layer B · Streaming Settle Guard (default 1.8s): Observes streaming output to verify the blinking cursor is gone and no DOM updates have occurred for at least 1.8 seconds before taking any action.
- Layer C · Operation Cooldown (default 4.0s): Enforces an intentional pause between consecutive clicks to prevent double-click race conditions.
- Layer D · Per-Task Limit (default 10): Limits continues per conversation turn; automatically resets to 0 whenever the user sends a new prompt.
- Layer E · Daily Continue Cap (default 0 = unlimited): Caps total automated continues per calendar day, automatically resetting at midnight (00:00).
- Layer F · Completion Cue Detection: Skips auto-continue when Gemini outputs definitive completion phrases like "All tasks finished", while smartly continuing if Gemini explicitly displays a
↪ Yesfollow-up chip. - Layer G · Stagnant Output Fingerprinting: Trips when consecutive actions produce zero new content or generate identical response hashes, preventing repetitive bot loops.
🏗️ Architecture & Decoupled Modules
The extension follows clean separation of concerns and data-driven principles:
manifest.json
Manifest V3 declaration specifying minimal permissions (storage, tabs, alarms, scripting, notifications) and Gemini matching rules.
defaults.js
Shared configuration hub: built-in keyword dictionaries, default options, schema migration, and boundary clamping.
hud.js & hud.css
In-page floating HUD component: pointer drag handling, boundary clamping, live state pills, and quick notification toggle.
content.js
Runs in the isolated content script world: DOM observers, button matching heuristics, circuit breakers, and microtask dispatchers.
background.js
Persistent Service Worker: manages long-lived ports, heartbeat alarms, tab discard prevention, and OS desktop notifications.
popup.js, popup.html, popup.css
Extension popup control center: real-time metrics, interactive switches, custom keywords textarea, and emergency controls.
❓ Frequently Asked Questions (FAQ)
- Confirm that your browser is on a page matching
gemini.google.com. - Click the extension toolbar icon and ensure that the Master Switch and "Show floating HUD" options are enabled.
- If the HUD was previously dragged to an edge or off-screen, click the "Reset HUD" button in the popup to snap it back to the default bottom-right position.
Yes. When you release the HUD after dragging, its (left, top) coordinates are immediately saved to chrome.storage.local and localStorage (gmah_hud_position). It restores cleanly across page reloads, new chat sessions, and browser minimize/restore cycles.
- Open the popup and click the "Test Notification" button to confirm that your browser and operating system have notification permissions enabled.
- Check if Windows "Focus Assist" or macOS "Do Not Disturb" is active.
- Verify that the "Desktop Notification" pill in the HUD or the toggle in the popup is turned on.
No. The engine applies an explicit exclusion blacklist (blocking terms like delete, remove, deny, cancel, dismiss, survey) combined with strict sibling hierarchy and container verification.
Click the "Restore Defaults" button at the bottom of the extension popup. This resets all thresholds, cooldowns, and keyword sets to safe official defaults.
📝 Changelog
v1.0.0 (Official Release) - 2026-11-23
- Stall Auto-Stop & Custom Reconnect Prompt: Automatically cancels stuck MCP/Gemini turns past the configured timeout (default 5 min) and sends a customizable reconnect prompt (default
继续,刚才mcp连接断开了) with draft protection and per-task recovery cap. - Live Wait Timer & One-Click Immediate Resume: Real-time connecting/wait elapsed timer in HUD & Popup plus a one-click "Resume Now" button to recover immediately without waiting.
- Human-Like Anti-Throttling Pacing: Randomized post-stop/pre-send pauses, chunked typing, natural hover + off-center click jitter, and a 60s rolling anti-burst governor.
- Circuit Breaker Desktop Alerts & Background Hardening: Wired end-to-end circuit breaker badge/desktop notifications across
content.jsandbackground.js, added Web Lock anti-freeze shield, fast 8s zombie-port recovery, and expanded automated verification to 76/76 passing tests.
v0.3.0 (v0.3 Beta) - 2026-11-22
- Never-Sleep MV3 Background Engine: Added ~19.5s Service Worker keepalive, proactive 4-minute Port rotation before Chrome's 5-minute disconnect limit, unthrottled SW delayed settling/cooldown ticks (
GMAH_SCHEDULE_TICK), and instant tab/window focus wakeups so automation never stalls in background or other apps. - Smart Background Click Retry & Shadow DOM Observer: Auto-retries un-dismissed clicks in background with
@material/webShadowRoot inner<button>piercing and safe focus/coords; recursively observes dynamic ShadowRoots; fixes minimized-window hidden spinners falsely lockingisGenerating. - Zero-Glitch HUD, Popup & Safety Hardening: Stops Windows minimize (
0x0resize) from snapping the HUD to(0, 0), auto-clamps on expand/panel open, fixes/app->/app/<id>new-chat continue suppression, guards cookies/notifications/camera/mic/location across all 4 locales, adds live 4-language engine status, and auto-saves popup fields with instant breaker reconciliation. - 64/64 Automated, E2E Sandbox & 30-Min Marathon Tests: Verified end-to-end across 5 test suites including a 30-minute hidden background marathon with 7+ port rotations and simulated SW crash recovery.
v0.2.0 (v0.2 Beta) - 2026-11-22
- Hold-to-Drag HUD Fix: Strict left-button press gating (
isPointerDown) eliminates hover-sticking; deferred pointer capture after 4px threshold keeps collapse, theme, and language header buttons immediately responsive; added off-window auto-release and popup Reset HUD button. - Multi-Window & Non-Chat Guard: Skips non-chat routes (
/gems,/extensions,/settings, etc.) and 0-turn screens; removed overly broad localized "Start" triggers; ignores stale pre-existing history chips on restored tabs in secondary browser windows. - 4-Language Support: Live UI, desktop notification, and keyword recognition across Simplified Chinese, Traditional Chinese, English, and Japanese.
- Dark & Light Dual Themes: Synchronized Dark Night (
🌙) and Light Daylight (☀️) modes across both the floating HUD and extension popup. - Redesigned 2x Retina Assets: All promotional banners, walkthrough diagrams, and Chrome Web Store screenshots rebuilt at 2x DPI.
v0.1.0 (v0.1 Beta) - 2026-11-21
- Initial Public Beta release with MCP "Always allow" auto-approval,
↪ Yesfollow-up chip clicking, draggable floating HUD, 1-click desktop stall notifications, background keep-alive, and 6-layer anti-loop circuit breaker.
See full details in CHANGELOG.md.
Friendly Links
- LINUX DO - Sincere, friendly, collaborative, and professional developer community.
License
This project is licensed under the MIT License.