441777523/gemini-local-master-hub
About
Windows local MCP hub & Antigravity plugin for Gemini Web/Desktop (46 tools) — Gemini 本地 MCP 插件/中控: dual-stack browser (cua-driver + devtools), batch code tools, PowerShell, WinRT OCR, Vision & multi-agent dispatch.
AI & Machine LearningMeasured star growth
- in 24h
- Collecting history
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README_EN.md
OriginalGemini Local Master Hub
中文文档 | English | Changelog | llms.txt
Turn Gemini Web, Gemini Desktop, mobile browsers, and any stdio MCP client into a full local Windows master controller (47 tools) — featuring native shell-free
run_script(Node.js/Python), dual-stack browser control with DevTools auto-attach & profile isolation, fair-quota batch tools,cua-driverGUI automation with fullstructuredContentpassthrough, local WinRT OCR & Vision inspect, and multi-agent async orchestration (v1.5.0).
Out of the box, Gemini stays in the cloud — it cannot read your local codebase, run scripts or PowerShell commands, inspect live browser DevTools, control Windows desktop apps, or dispatch heavy tasks to local CLI agents.
Gemini Local Master Hub wraps your local Windows filesystem, native Node/Python script runner, UTF-8 PowerShell, dual-stack browser bridges (cua-driver 0.71.1+ + chrome-devtools-mcp), zero-dependency local vision (WinRT OCR + .NET C# template matching + Gemini Flash Vision), shared MEMORY.md, and local CLI agents (Antigravity / Gemini CLI) into a single Streamable HTTP & stdio MCP server exposed safely through a permanent Cloudflare Named Tunnel.
Supported Clients
- Gemini Web (
gemini.google.com): ✅ Fully supported - Gemini Desktop: ✅ Fully supported
- Standard stdio MCP clients: ✅
npx -y gemini-local-master-hub --stdio - Mobile:
- Continue existing sessions: Conversations started on Gemini Web/Desktop continue to work with MCP inside the Gemini mobile app ✅
- Start a new MCP session on mobile: Open
gemini.google.comin a mobile browser to initiate new MCP-enabled chats.
What's New in v1.5.0 (Full Notes: CHANGELOG.md)
- Native Shell-Free
run_script(Tool #47): Run Node.js (CJS/ESM) and Python scripts directly via temp script files — completely avoids Windows PowerShell 5.1 double-quote stripping. - DevTools & CUA Bridge Overhaul:
browser_devtoolsauto-probes127.0.0.1:9222, supports custombrowserUrl/wsEndpoint/autoConnect, launches Chrome with a dedicated profile (~/.cache/gemini-hub-chrome-profile), and auto-retries with--isolatedif a profile lock occurs.cua-bridge&devtools-bridgepreservestructuredContent;desktop_clipboardnow returns real clipboard text (include_text: trueby default) and supports writingtext,image_path, orfile_path.
- Fair Quotas & Multi-Task Orchestration:
- Water-filling fair quotas for
batch_read,batch_outline, andbatch_search;wait_tasksupports waiting ontaskIds[](any/all);list_taskssorts newest-first withstatus/prefixfilters. dispatch_antigravityprevents model-suffix--effortconflicts, auto-falls back from--mode autotoaccept-editson Windows builds< 26100, and injects local proxy env vars;dispatch_gemini_clisupports isolated API keys & timeout circuit-breakers.cocos_buildadds per-project mutex locking, clean env, hung-process tree reaping, pre/post output false-success guards, and strictly serial postbuild execution.
- Water-filling fair quotas for
- Security & Reliability Hardening:
resolvePathSafesymlink/junction escape guard viafs.realpathSync;vision_inspecthides API keys via temporarycurl -Kconfig files; atomic Windows case-normalizedbatch_editwith rollback; crash-safefs_manageoverwrite-move;GIT_TERMINAL_PROMPT=0+ allowlistedgit_action; streamingread_file(>10 MB) & tail-window transcript reading; 6h periodic storage pruning.
Why Gemini Local Master Hub?
- Triple-Mode Deployment: Ready-to-install Antigravity Plugin (
skills/setup-gemini-hub/SKILL.md), standalone Cloudflare Tunnel HTTP MCP server, or instantnpx --stdioserver. - Zero Heavy Dependencies: Pure Node.js + built-in Windows capabilities — no Python, no OpenCV, no ripgrep required (optional Python runtime supported automatically by
run_script). - Context & Quota Friendly:
code_outline&batch_outlineextract structure with line numbers (saves 80–90% context);- Water-filling
batch_read/batch_outline/batch_searchprevent large early items from starving later ones; - Zero-API-cost local log compaction in
get_task_status(preserves head, error lines, tail, andgit status); dispatch_antigravitynever hardcodes models — choose any model per task or configureagyStandardModel/agyHeavyModelinhub/config.json.
- Resilient & Safe: Auto-reconnecting Cloudflare Tunnel daemon (
run-all.mjs,5s → 60sbackoff + full process tree cleanup), zero OAuth scraping, zero reverse-proxying, symlink-safeallowedRoots, timing-safe high-entropysecretPathwith spoof-resistant per-IP 403 rate limiting, and minimal public/health.
Toolset Overview (46 General Tools + 1 Optional Engine Tool = 47 Tools)
| Category | Tools | Highlights |
|---|---|---|
| Code, Batch & Filesystem (16) | project_bootstrap, list_dir, code_outline, batch_outline, read_file, batch_read, write_file, edit_file, batch_edit, find_files, grep_search, batch_search, fs_manage, git_inspect, git_action, project_diagnostics |
Pure Node.js, water-filling fair quotas, streaming >10 MB reads, Windows case-normalized atomic multi-file edits with rollback & post-edit verify, trash-backed delete, non-interactive whitelisted Git ops |
| Scripts, System, Memory & Agents (14) | run_script, run_shell, run_checks, manage_process, local_memory, dispatch_antigravity, dispatch_gemini_cli, wait_task, get_task_status, list_tasks, cancel_task, list_antigravity_conversations, read_conversation_transcript, cocos_build (optional) |
Shell-free Node/Python run_script, UTF-16LE -EncodedCommand PowerShell, parallel checks with tree-kill timeouts, WMI detached services, shared MEMORY.md, multi-task wait_task(any/all), newest-first list_tasks, managed cocos_build |
| Dual-Stack Browser (2) | browser_cua, browser_devtools |
Human-like browser automation via cua-driver 0.71.1+ + Chrome DevTools (chrome-devtools-mcp) with auto-attach (9222), dedicated profile & --isolated retry |
| Desktop GUI Control (12) | desktop_list_windows, desktop_get_window_state, desktop_get_desktop_state, desktop_bring_to_front, desktop_click, desktop_drag, desktop_type_text, desktop_hotkey, desktop_scroll, desktop_clipboard, desktop_run_steps, desktop_window_control |
Persistent cua-driver 0.71.1+ bridge on WinSta0\Default with structuredContent passthrough, full clipboard text/image/file support, window frame/menu/value control & recording |
| Local Vision (3) | desktop_ocr_find, desktop_find_image, vision_inspect |
Offline Windows WinRT OCR, zero-Python .NET C# NCC template matching, local Gemini Flash vision-to-pixel coordinates with regional crop & curl -K header-only API key protection |
Quick Start (Windows 10/11)
Option A — Instant stdio MCP
npx -y gemini-local-master-hub --stdio
Option B — Full HTTP MCP + Cloudflare Tunnel (Gemini Web / Desktop / Mobile)
- Prerequisites:
- Node.js 20+
- Standalone
cua-driver 0.71.1+(%LOCALAPPDATA%\Programs\Cua\cua-driver\bin\cua-driver.exe) cloudflared.exeplaced inhub/bin/cloudflared.exe(or onPATH)- (Optional)
GEMINI_API_KEY(or separatevisionGeminiApiKey/geminiCliApiKeyinhub/config.json)
- Clone & Initialize:
git clone https://github.com/441777523/gemini-local-master-hub.git cd gemini-local-master-hub powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup.ps1 -AllowedRoots @("D:\projects") -RegisterTasksetup.ps1generates a BOM-freehub/config.jsonwith a randomsecretPath. You can optionally configureagyStandardModel/agyHeavyModel(runagy modelsto list IDs) and change them anytime. - Verify End-to-End:
node .\scripts\verify.mjs - Connect to Gemini & Enable "Always Allow":
- Open Gemini Web (
gemini.google.com) or Gemini Desktop → Settings → Connected Apps (Custom apps) → Add Custom App and paste the URL fromhub/current-public-url.txt. - Click into
Gemini Local Master Hubunder Connected Apps and set tool permissions to Always allow to avoid repeated confirmation prompts (re-enable once whenever tools are updated).
- Open Gemini Web (
Compliance & License
Strictly adheres to official Google / Antigravity Terms of Service: zero OAuth token extraction, zero client modification, zero raw model proxying — built exclusively on official MCP Custom Apps and unmodified official CLIs for personal single-machine use.
Licensed under GNU AGPL-3.0. Free for personal and open-source use; any modified distribution or network/commercial service built on this software must disclose its source code under AGPL-3.0. For closed-source commercial licensing, please contact the author.
Explore related projects
Loading…