AGY Magician
Connects coding agents to personal Google Gemini Web accounts via browser automation, enabling prompt delegation, model/effort selection, reply capture, and OAuth-protected access for Gemini Web to local files.
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.
AGY Magician
A zero-dependency local MCP bridge and agent skill that connects coding agents (such as Antigravity / T3 Code / MCP clients) to personal Gemini Web (gemini.google.com) accounts — and gives Gemini Web live, OAuth-protected access to your local files.
How It Works
Coding Agent (MCP client)
│ stdio MCP (agy-mcp.mjs — locked 1-to-1 to one account)
▼
Local Bridge Server (server.mjs on 127.0.0.1:38471)
├──► Browser CDP (browser-trigger.mjs + picker-script.js)
│ Opens /u/<index> on gemini.google.com, selects model/effort,
│ attaches @AGY Magician, submits prompt, captures reply
│
└──◄ Public HTTPS via Tailscale Funnel (https://<your-host>.ts.net/mcp)
OAuth 2.1 + PKCE + Dynamic Client Registration
Exposes list_files, read_file, search_files, write_file, save_note_for_antigravityTwo Tool Sets
1. Agent-side tools (agy-mcp.mjs)
plan_with_my_gemini— Delegates a prompt to the agent's locked Gemini Web account (mode: "chat"or"task",effort: "low" | "medium" | "high",allowWrite,remote,continue_job_id,wait).check_gemini_job— Polls status or retrieves the completed response for ajob_id.check_gemini_limits— Inspects available models and any visible quota/reset notices without sending a prompt.
2. Gemini-side tools (server.mjs at /mcp)
list_files— Lists local drives or full folder contents without a tiny item cutoff (supports absolute paths orjob:<jobId>).read_file— Reads local files in full up to 2 MB; auto-compacts huge JSON exports (> 2 MB) by skipping giant trailing cache blobs (such asindexedDB) and supports#offset=<bytes>chunking for other multi-MB files.search_files— Case-insensitive search matching both file/folder names (including media/binary files) and text file contents, with streaming search for large files and escaped-quote matching.write_file— Creates or overwrites text files with no arbitrary size cap (automatically backs up overwritten files tobackups/; blocked on read-only jobs and.git/.env).save_note_for_antigravity— Archives markdown plans/notes intobridge-replies/.
Built-In Safeguards
1-to-1 Account Locking: Each agent instance only ever talks to its assigned
BRIDGE_ACCOUNT.Optional Ask-First Accounts: Set
"requireExplicitApproval": trueon any account inaccounts.jsonto force agents to ask before using that account.Unattended / Remote Failsafe: Passing
remote: trueforces read-only plan-only mode; unresolved write prompts automatically fall back to read-only afterapprovalTimeoutSeconds.Protected Paths: Sensitive credential folders (
.ssh,.aws,.gnupg, browserUser Data,.t3/userdata,.gemini,.gemini-bridge,.git,.env, Windows credential stores) are blocked.OAuth 2.1 + Passcode Gate: Public
/mcprequires OAuth 2.1 + PKCE + a local 6-digit passcode (passcode.txt, auto-generated on first start) with brute-force lockout. Local/local/*endpoints reject proxied requests and requirelocal-api-token.txt.
Related MCP server: AKIMCP
Requirements
Node.js 22+ (uses built-in
fetch,WebSocket, andRegExp.escape; zero npm dependencies)A Chromium-based browser (Chrome, Edge, Helium, etc.) signed into your Google account(s) with remote debugging enabled (
chrome://inspect/#remote-debugging)Tailscale Funnel (or any HTTPS reverse proxy) pointing to
http://127.0.0.1:38471sogemini.google.comcan reach/mcp
Setup
1. Clone and create your local config files
git clone https://github.com/ct-g0d/agy-magician.git
cd agy-magician
cp accounts.example.json accounts.json
cp folders.example.json folders.jsonEdit accounts.json:
Set
browserDevToolsActivePortto your browser'sDevToolsActivePortfile path (for exampleC:\Users\<you>\AppData\Local\Google\Chrome\User Data\DevToolsActivePort).Map each account key (
account1,account2, …) to its Google/u/<index>slot, email, display name, and optionalrequireExplicitApproval.
2. Start the local bridge server
node server.mjsOn Windows, you can launch it invisibly at login via Task Scheduler using wscript.exe "C:\path\to\agy-magician\run-hidden.vbs".
On first run, server.mjs creates:
passcode.txt— 6-digit passcode used once when linking each Google account via OAuthlocal-api-token.txt— local-only shared secret used byagy-mcp.mjs
3. Expose /mcp over HTTPS (Tailscale Funnel)
tailscale funnel --bg 38471Your public MCP endpoint will be https://<your-tailscale-host>.ts.net/mcp.
4. Add the Custom MCP App in Gemini Web
Open
https://gemini.google.com→ Settings → Connected Apps (orgemini.google.com/devmode) → add a Custom MCP App.Enter your HTTPS endpoint (
https://<your-tailscale-host>.ts.net/mcp), name/handle (e.g.AGY Magician), and authorize using the 6-digit code inpasscode.txt.Tip for multi-account linking: Link additional Google accounts in an Incognito window so Google's OAuth redirect doesn't collide with
/u/0.
5. Wire your MCP client & skill
Copy the snippet from
mcp_config.example.jsoninto your coding agent's MCP config, settingBRIDGE_ACCOUNTandBRIDGE_PROVIDER_NAMEper provider.Copy
skill/anti-gemini-magician/into your agent's skills directory (e.g.~/.gemini/config/skills/anti-gemini-magician/).
License
MIT — see 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
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.
Connect AI assistants to your Mac and Linux computers with scoped access to local files and tools.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Let ChatGPT and Claude read and edit files, search and run commands on your own computer.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceExposes a governed suite of 38 OAuth-gated tools that let web-based AI chat clients read, write, edit, and search local files, run whitelisted shell commands, inspect databases and localhost APIs, drive browsers and DevTools, and manage background tasks, Git, clipboard, notifications, and ports. Local IDEs connect directly over loopback, while remote clients reach the same machine through a secure tunnel.MIT
- AlicenseNot gradedqualityAmaintenanceExposes an OAuth-gated suite of 38 tools that let web-based AI chat clients operate a local machine, covering files, whitelisted shell commands, search, Git, SQLite, browser and DevTools automation, background tasks, localhost services, clipboard, and ports. It keeps access governed through folder allowlists, a command whitelist, and rate limits so clients gain a large operating surface without unrestricted shell access.MIT
- AlicenseNot gradedqualityBmaintenanceEnables Google Gemini APP on web and mobile to safely read mounted local repositories and notes, protect writes with snapshots and conflict checks, and asynchronously hand off tasks with local coding agents.MIT
- AlicenseNot gradedqualityBmaintenanceEnables Gemini web chat to access and control a local PC's files, search, Git, shell commands, and background processes across macOS, Windows, and Linux through an OAuth-secured MCP connector.5MIT