gemini-win-bridge
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.
gemini-win-bridge
A Windows-native MCP server that lets the web version of Gemini read and write local files and run commands inside your workspaces. Remote access works over three connection options (Tailscale, a Cloudflare quick tunnel, or your own public base URL), and every dangerous command must be approved by the owner before it runs.
Features
12 MCP tools —
read_file,write_file,edit_file,list_dir,grep_search,find_by_name,run_command,manage_task,execute,poll_execution,cancel_execution,server_info.Workspace whitelist plus sensitive-path blacklist — file tools only touch paths inside the configured roots and never touch credential directories (
.ssh,.aws, ...).Dangerous-command interception in three shell grammars — the command line is parsed (not string-searched) for Git Bash, PowerShell and cmd syntax, including wrappers, variable expansion and nested shells.
Owner approval page at
/web— a blocked command creates a pending approval; the owner approves it in the browser and the model retries withConfirm=true.Per-session write claims and an audit log — two sessions never write the same path, and the last 200 tool calls are recorded.
Code Mode (
execute) — sandboxed Python snippets with tool callbacks for batch, multi-file operations.OAuth 2.1 for remote connections — dynamic client registration and a password-based consent page, no external identity provider needed.
Interactive TUI wizard and a single-file exe — one
gwbcommand configures everything; the release build needs no Python installed.
Related MCP server: Arrgon
Requirements
Windows 11 (Windows 10 also works).
Python 3.12+ — only needed for a source install; the release exe is self-contained.
Git for Windows — provides the default
git-bashshell the command tools run in.Optional, for remote access: Tailscale or cloudflared.
Installation
A) Release exe (recommended)
Download
gwb-windows-x86_64.exefrom the GitHub Releases page.Rename it to
gwb.exeand put the folder on yourPATH.The exe is unsigned, so the first launch shows a SmartScreen warning — choose "More info" → "Run anyway".
B) From source
pip install git+https://github.com/shiyuanzheng/gemini-win-bridgeor with uv:
uv tool install git+https://github.com/shiyuanzheng/gemini-win-bridgeThis requires Python 3.12+ and Git for Windows on the PATH.
Quick start
Start the wizard with
gwb(no arguments), or go headless:gwb init --workspace D:\code --connect localThe first run prints the generated owner password — shown once, save it now.
Check the environment:
gwb doctorAll checks should be green. A missing tunnel binary is fine for
local; it only matters for remote modes.Start the server:
gwb serveIt prints the MCP URL (local mode:
http://127.0.0.1:7676/mcp) and the approval page (http://127.0.0.1:7676/web).Register the connector in Gemini: open
gemini.google.com/customize/connectors, create a new connector, and paste the MCP URL. Leave Client ID and Client Secret empty. When the consent page opens, paste the owner password.In a Gemini conversation, mention the connector with
@and start working on your files.
Connection modes
Mode | Listens on | Public URL | Notes |
|
| none, no OAuth | for local MCP clients on the same machine |
|
|
| enable Funnel and HTTPS certificates in the Tailscale admin console; stable address |
|
|
| the trycloudflare URL changes on every restart; update the connector afterwards |
|
|
| you provide the reverse proxy and certificate |
Google binds connectors by hostname: one hostname can only carry one
connector. If serve prints a new public hostname, remove the old
connector registration in Gemini first.
Configuration
Show, locate or change config.json:
gwb config show
gwb config path
gwb config set shell=powershellKey | Default | Meaning |
| your home directory | allowed roots; repeatable ( |
|
|
|
|
| first port tried; occupied ports walk up (max 10 tries) |
|
| bind address ( |
| empty | required for |
|
| shell for |
| auto | UI language: |
|
| how long |
Everything lives in %USERPROFILE%\.gemini-win-bridge (override with the
GWB_CONFIG_DIR environment variable): config.json, auth.json (the
owner password hash), clients.json (registered OAuth clients) and
server.pid (the running instance).
Command reference
Command | One-liner |
| no arguments: the interactive setup wizard (needs a TTY) |
| write |
| run the setup wizard explicitly |
| run the environment health checks |
| generate or set the owner password |
| print the MCP URL for the configured mode |
| report the running server (pid, port, URL) |
| stop the running server and its process tree |
| inspect or change |
| start the MCP server, local or tunneled |
| run the MCP server on stdio (for local clients) |
Tools
Tool | One-liner |
| read a text or binary file slice (max 800 lines / 45 KB per call; images inlined) |
| create, overwrite (atomic) or append to a file |
| exact-match replace that preserves the file's line endings and BOM |
| list one directory (max 500 entries) |
| text or regex search (max 100 hits) |
| glob file-name search (max 100 hits) |
| run a shell command with a wait window, background tasks and input |
| status, output, input or kill for background tasks |
| Code Mode: run a sandboxed Python snippet with tool callbacks |
| fetch a Code Mode execution's log and result |
| cancel a running Code Mode execution |
| report the server version, public URL and workspace roots |
Security model
Workspace whitelist. File tools resolve every path to its real form
(symlinks, junctions, 8.3 short names, subst drives, \\?\ prefixes and
case tricks all normalize) and reject anything outside the configured
roots. Relative paths are always rejected.
Sensitive-path blacklist. These locations are never readable or
writable, even when they sit inside a workspace root: .ssh, .gnupg,
.aws, .kube, .docker, .gemini, .azure, .password-store,
.config/gh, .config/gcloud, .config/configstore, .config/op,
.local/share/keyrings, .netrc, .git-credentials, .pypirc,
.npmrc (each under %USERPROFILE%), plus
%APPDATA%\Microsoft\Credentials,
%LOCALAPPDATA%\Microsoft\Credentials and the gwb config directory
itself.
Dangerous commands. The command line is parsed per the configured
shell and matched against rule tables for recursive deletion
(rm -rf, Remove-Item -Recurse, del /s /q, PowerShell aliases like
ri/rm/rd/del/erase), disk tools (mkfs, format,
diskpart, Format-Volume), power (shutdown, Stop-Computer), risky
git operations (git reset --hard, git clean -f, git push --force,
config/env injection), and dynamic execution (find -exec, xargs,
Invoke-Expression). Encoded or nested variants
(powershell -EncodedCommand, cmd /c ... inside bash) are decoded and
re-parsed. The tables cannot enumerate every possible spelling — see the
known limitations in docs/acceptance.md.
Approval flow. A blocked command is refused with a pending approval
id. The owner reviews it at the /web page (login with the owner
password) and approves or denies it. Approval is valid for 5 minutes, for
that exact command string, and is consumed once: the model retries the
identical command with Confirm=true.
stdio mode. There is no HTTP server and no approval page, so
dangerous commands are never available in gwb stdio; the refusal message
says so and points at gwb serve.
Audit. The last 200 tool calls (name, arguments, outcome, truncated
output) are kept in memory and shown on the /web page.
Autostart (optional, off by default)
gwb never registers itself anywhere. To start the server at logon, create a Windows scheduled task yourself:
schtasks /create /tn "gwb serve" /tr "\"C:\path\to\gwb.exe\" serve" /sc onlogonThe server is a normal foreground process launched by Task Scheduler, so
its console output is not visible. gwb stop stops it like any other
instance. Remove the task with:
schtasks /delete /tn "gwb serve" /fTroubleshooting
doctoris all green but Gemini cannot connect — Google binds connectors by hostname. If this hostname already carries another connector, requests fail with 401: remove the old registration ingemini.google.com/customize/connectorsand register again.401 in a tunnel mode after a restart — access tokens are held in memory only; after a server restart Gemini must re-authorize once (paste the owner password on the consent page again). This is a known limitation.
port taken— serve walks up fromlistenPortand picks the next free port (max 10 tries). The actual port is authoritative ingwb status; pin it withgwb config set listenPort=<n>.Code Mode
SnippetRejected— snippets only see whitelisted builtins;awaitis only allowed insidetools.<name>(...)calls;importis banned; use f-strings instead of thestr.formatfamily; the injected names (tools,json,print) cannot be rebound.Very long paths still fail — the exe manifest already declares
longPathAware, but the system policy must allow it too: setLongPathsEnabledto 1 underHKLM\SYSTEM\CurrentControlSet\Control\FileSystem(or via Group Policy) and reboot.Tunnel binary missing —
doctorreports the exact winget install command; gwb never installs anything itself.Daemon command with
shell=powershell— PowerShell ignores the detach flag, soIsDaemon=truedegrades to a normal run there; the defaultgit-bashshell is unaffected.
Uninstall
gwb stop(if a server is running).Delete
%USERPROFILE%\.gemini-win-bridge(the config, password hash, OAuth clients and audit log).Delete
gwb.exe, orpip uninstall gemini-win-bridge/uv tool uninstall gemini-win-bridge.If you configured autostart:
schtasks /delete /tn "gwb serve" /f.
Development
uv sync
uv run pytest -q
uv run python scripts/build_exe.py
uv run python scripts/smoke_exe.py dist/gwb.exeThe full test suite runs on Windows (that is the target platform); CI runs
test → build → release on windows-latest. 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
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.
Let ChatGPT and Claude read and edit files, search and run commands on your own computer.
Connect AI assistants to your Mac and Linux computers with scoped access to local files and tools.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables Gemini Spark to securely read, edit, and search a selected local workspace, execute shell commands, and integrate development tools via MCP with user approval safeguards.1MIT
- 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 gradedqualityCmaintenanceEnables Google Gemini to access a local PC workspace through MCP, allowing it to list, read, and write files and execute a whitelist of safe commands.4MIT
- 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