Gemini Handoff MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
What is this? Why build it?
People using Google Gemini APP (Deep Research, Pro reasoning, mobile voice) hit an obvious gap: Gemini in the browser or on your phone cannot see your local code or notes, while local coding agents (Antigravity, Claude Code, Codex, Cursor) can edit files and run tests but can't pick up ideas and research straight from your Gemini APP sessions.
Gemini Handoff MCP bridges both sides with 4 priorities:
Zero dependencies, zero setup bloat: Pure Node.js >= 22. No
npm install, runs in two commands.Read-only code safety + auto-snapshots on writes: Mounted repositories and notes are strictly read-only with
.env, private keys, andnode_modulesautomatically blocked. Workspace edits enforcesha256conflict checks (dry_runsupported) and save pre-write snapshots so mistakes roll back cleanly.Two-way async task handoff (mobile ↔ desktop): Dispatch scoped research tasks from your terminal to Gemini APP, or brainstorm on your phone and call
propose_taskso your local coding agent canpullthe work item when you're back at your desk.100% official Custom Apps protocol (zero browser scripts): Uses Google's official MCP Streamable HTTP & OAuth 2.1 spec (theoretically compatible with Claude.ai / ChatGPT custom connectors, untested on those two clients). No DOM injection, no cookie scraping — works on both mobile and web without account-ban risk.
How is this different from alternatives?
Approach | Examples | Limitation | Where Gemini Handoff MCP fits |
Local CLI calling Gemini |
| Works from desktop terminals only; unusable from mobile Gemini APP | Reversed flow: puts Gemini APP (mobile/web) in the driver's seat |
Browser extensions / cookie scrapers |
| Desktop-only, breaks when Google changes DOM, cookie scraping risks bans | Official Custom Apps protocol (standard-compatible, untested on other clients), mobile-ready, zero DOM hacks |
All-in-one desktop control bags |
| Bundles dozens of unrelated desktop/camera/UI tools with weak guardrails | Focused 20-tool surface: read-only mounts, |
Generic remote filesystem MCP | Filesystem MCP + proxy | File I/O only; no task queue, mobile proposals, or agent handoff workflow | Built specifically for safe async task handoff with a CLI, Agent Skill, and boundary protection |
Why is a public HTTPS URL required?
Google Gemini APP runs on Google's servers and cannot reach127.0.0.1on your laptop directly. Exposing your local port through a tunnel (cloudflaredortailscale funnel) keeps 100% of your files on your own machine — no cloud VPS needed.
Related MCP server: Arrgon
1. Run Locally in 3 Minutes (No Cloud Server Needed)
Requirement: Node.js >= 22.0.0 (zero third-party dependencies — skip
npm install).
Step 1: Start the local server
git clone https://github.com/Sansi-06/gemini-handoff-mcp.git
cd gemini-handoff-mcp
# Optional: register `gemini-handoff` globally (or run `node cli/handoff-cli.mjs`)
npm link
# Generate .env secrets and sandbox directories
gemini-handoff init-env
# Start the server (listens on 127.0.0.1:8787 by default)
npm startStep 2: Expose a public HTTPS endpoint
Pick either option to tunnel 127.0.0.1:8787:
Option A — 30-second zero-signup trial (
cloudflared):cloudflared tunnel --url http://127.0.0.1:8787This prints a temporary
https://xxx.trycloudflare.comURL.Note: Quick Tunnel subdomains change on every restart and are meant for quick testing only. Use Option B for daily workflows.
Option B — Persistent HTTPS URL (Recommended:
Tailscale Funnelor your own domain):tailscale funnel 8787Gives you a permanent
https://<machine>.<tailnet>.ts.netURL that never changes, or use a Cloudflare Named Tunnel with your own domain.
Step 3: Add the connector in Google Gemini APP
Prerequisite: Personal Google account with Custom apps visible under Settings → Connected Apps (English UI / Keep Activity may be required depending on region).
Open
https://gemini.google.com→ Settings → Connected Apps → Custom apps.Enter your endpoint URL (pick one):
OAuth 2.1 login: Enter
https://<your-domain>/mcp, then approve using theOWNER_PASSPHRASEfrom.env.Direct path-key URL (no OAuth popup): Set
MCP_ACCOUNT_KEYS=acc1:your-long-secretin.env, enterhttps://<your-domain>/mcp/u/your-long-secret, and choose No authentication.
Time-saving tip (skip typing
@MCPevery time):
Consumer Gemini APP enforces turn-based security — an external MCP cannot wake up an idle chat without a user message (this project intentionally avoids browser DOM auto-click scripts). Create a dedicated Gem with instructions like: "Whenever I saygo, calllist_tasks/get_task,claim_taskthe highest-priority task, complete it, and callsubmit_task_result." Then opening the Gem and typinggostarts the workflow immediately.
2. Mount Local Code & Notes Directly (No Upload Needed)
When running on your own machine, point .env directly at local directories instead of pushing files over HTTP:
# Writable sandbox where Gemini can create drafts and reports
FILES_ROOT=/path/to/your/sandbox-workspace
# Read-only code mounts (semicolon-separated; Gemini can never modify these)
REPO_MOUNTS=myapp=/path/to/your/project
# Read-only notes mounts
NOTE_MOUNTS=obsidian=/path/to/your/notes3. Two-Way Task Handoff CLI
If you just want Gemini to read mounted folders in chat, you are already done.
To dispatch scoped async tasks between your local coding agent (via skills/gemini-handoff/SKILL.md) and Gemini APP:
# 1. Verify connectivity
gemini-handoff health
# 2. (Optional, for remote server setups) Upload reference context or read-only repo files
gemini-handoff push-file ./spec.md research/spec.md --account acc1
gemini-handoff push-repo ./my-project my-project
# 3. Dispatch a task (prints a 1-line prompt for Gemini APP)
gemini-handoff dispatch \
--title "Architecture research" \
--objective "Compare auth options and recommend an implementation" \
--attach research/spec.md \
--account acc1
# 4. Pull distilled results back locally (stdout wrapped in randomized untrusted-data boundaries)
gemini-handoff list --status completed --account acc1
gemini-handoff pull <task_id> --out ./result.md
# 5. Review & pull proposals initiated from mobile/web Gemini APP
gemini-handoff proposals
gemini-handoff pull <proposed_task_id>4. Tools Exposed to Gemini APP (20 Tools)
Category | Tools | Purpose |
Task Queue |
| Inspect/claim tasks, save long-task checkpoints, submit reports, or propose new tasks back to desktop |
Workspace ( |
| Sandboxed read/write ( |
Read-Only Notes ( |
| 100% read-only browsing and search |
Read-Only Repos ( |
| 100% read-only code access with |
Status |
| Inspect active mounts, queue counts, and active guardrails |
5. Security & Usage Notes
Do not sync proprietary or sensitive code: Consumer Gemini APP with Connected Apps typically requires
Keep Activityenabled. Only use this with personal projects, open-source code, or sanitized material — never upload confidential company source code, PII, or production credentials.Protect path-key URLs: If using
/mcp/u/<key>, ensure reverse proxies strip path keys from logs (see deploy/Caddyfile.example and deploy/nginx.conf.example).Review cloud deliverables before executing commands:
gemini-handoff pullwraps stdout output in randomized<<<UNTRUSTED_REMOTE_ARTIFACT_BEGIN nonce=...>>>boundaries to reduce second-order prompt injection risk; always inspect pulled reports before running suggested shell commands.Account isolation:
TENANT_ISOLATION=trueis enabled by default so different account keys stay isolated in separate queues, files, and snapshots.
See SECURITY.md for the full threat model.
6. Optional: 24/7 Cloud Hosting (Docker / VPS)
Want mobile Gemini APP to stay connected and submit propose_task ideas even when your laptop is powered off?
Docker Compose + Caddy: Set
PUBLIC_BASE_URLin.env, copydeploy/Caddyfile.exampletodeploy/Caddyfile, and run:docker compose --profile caddy up -d --buildSystemd + Nginx: See deploy/gemini-handoff.service and deploy/nginx.conf.example.
Split Admin Port (Recommended): Set
ADMIN_PORT=8788andADMIN_HOST=127.0.0.1so/api/tasksand/api/syncare never exposed on the public MCP port (8787).Avoid sleeping free container tiers: Platforms that sleep after idle periods or wipe ephemeral disks on restart will drop MCP connections and lose unpulled tasks/snapshots.
7. Run Tests & License
node --test tests/integration.test.mjsLicensed under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Agent-native notes, tasks, dev-docs, vaults, sync & handoffs. MCP + OpenAPI dual surface.
Secure AI access to OpenOak tasks, notes, and Kanban boards.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceConnects AI clients such as Google Gemini Web, Claude Desktop, and Cursor to a personal vault and cloud storage, letting them list, read, write, and append Markdown notes and search or read documents anywhere on a personal drive through secure OAuth 2.0 authentication over Streamable HTTP or SSE.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Google Gemini to autonomously read, write, search, and patch code files and run whitelisted developer commands inside a sandboxed local workspace for edit-and-verify coding workflows.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables Google Gemini on web or mobile to connect to a local Antigravity IDE/CLI workstation, letting users browse and manage coding sessions, inspect paused approvals, search and read repository files, audit git changes, send handoffs that resume the right project chat, and view ASCII usage telemetry or a live web dashboard.10AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables Gemini App to securely browse, search, read, edit, and run commands in selected local Windows workspaces through GitHub OAuth-protected access.MIT