Antigravity External Terminal 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.
Antigravity External Terminal Bridge
An Antigravity native plugin and MCP server that lets Antigravity safely launch (including Administrator terminals via standard Windows UAC), pair, and operate external Windows Terminals over authenticated loopback TCP (127.0.0.1).
让 Antigravity 安全、可控地拉起、配对并操作你指定的外部 Windows Terminal(包括通过标准 Windows UAC 授权的管理员权限终端)。
Key Features / 核心特性
Cross-Privilege Loopback Transport(跨权限本地回环通信):
External bridge binds strictly to
127.0.0.1:<random_port>(never exposed to LAN/Internet), avoiding Windows Named Pipe Mandatory Integrity Level barriers between a standard Antigravity process and an Administrator external terminal.
Standard Windows UAC Elevation(标准 Windows UAC 提权,无任何绕过):
launch_external_terminal(elevated: true)invokes standard WindowsRunAsto open a visible elevated Windows Terminal window (wt.exe, with fallback topwsh.exe/powershell.exe).Approval stays strictly with the user on the Windows UAC prompt; declining returns
uac-cancelled-by-userimmediately.
One-Time Pairing + HMAC-SHA256 Authentication(一次性配对 + HMAC 双向鉴权):
Generates a 24-hex-char one-time pairing code (10-minute TTL) and verifies every pairing and execution request with a local 32-byte key (
%LOCALAPPDATA%\AntigravityExternalTerminalBridge\identity.key).Keys and auth proofs stay strictly inside the MCP server and bridge processes — never exposed to model context.
Per-conversation isolation (
conversationId) with multi-terminal aliases (targetName, e.g.default,admin).
Native Windows ConPTY In-Place Progress Bars(原生 ConPTY 进度条原地刷新):
Bundled C# source (
scripts/conpty-runner.cs) compiles via built-in Windows.NET Framework csc.exe(zero external dependencies) to provide a real TTY (IsOutputRedirected = False) soDISM,sfc,winget,pip, and PowerShellWrite-Progressupdate progress bars in-place instead of spamming line-by-line.Dual-stream processor (
scripts/conpty-processor.mjs) relativizes ConPTY cursor jumps and strips screen clears / title hijacks for the user's external terminal while returning clean, ANSI-stripped, CR-folded text to MCP.
Adaptive UTF-8 / GB18030 Decoding(自适应 UTF-8 / GB18030 防乱码):
Line- and multi-byte-boundary-aware stream decoder (
scripts/stream-decoder.mjs) decodes strict UTF-8 first and falls back togb18030(CP936/GBK) when native Windows CLI tools emit system-codepage bytes, preventing mojibake and cross-chunk character splitting.
Sync Timeout Protection & Auto-Promote to Managed Job(防 MCP 超时挂死与自动转后台作业):
run_command_batchdefaults to45000 ms(capped at50000 ms) to stay safely below MCP's ~60s synchronous timeout.On timeout (or unexpected client disconnect), still-running batches are automatically promoted to a managed background job (
promotedToJob: true, returningjobIdand immediately releasingbatchBusy) instead of killing sensitive system operations or locking the terminal.
Persistent Working Directory & Multi-Shell Support:
Persists
cd/Set-Locationchanges across batches; supportspowershell,pwsh, andcmd.
Related MCP server: Windows CLI MCP Server
Requirements / 环境要求
Windows 10 (1809+) or Windows 11
Node.js 20+
Windows Terminal (
wt.exe, optional — recommended for elevated and standard windows)Windows built-in
.NET Framework 4.x(csc.exe, preinstalled on Windows 10/11 for compilingconpty-runner.exe)
Quick Install / 一键安装
Clone this repository and run install.ps1:
git clone https://github.com/czhovo/antigravity-external-terminal-bridge.git
cd antigravity-external-terminal-bridge
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1install.ps1 automatically:
Installs the plugin to
%USERPROFILE%\.gemini\config\plugins\external-terminal-bridgeGenerates
mcp_config.jsonwith your local absolute path toscripts\mcp-server.mjsCompiles
scripts\conpty-runner.exeusing Windows built-incsc.exeInstalls runtime dependencies (
@modelcontextprotocol/sdk,zod) vianpm install --omit=dev
After installation, enable/refresh External Terminal Bridge in Antigravity's Customizations / MCP Servers panel.
MCP Tools (10) / 工具一览
Tool | Purpose |
| Launch a visible external Windows Terminal ( |
| Pair with an external terminal you started manually (reads Desktop |
| Check connectivity, |
| Execute 1–50 short commands ( |
| Start slow ( |
| List managed jobs in the paired external terminal. |
| Inspect job status, exit code, and latest |
| Send text to a running job's |
| Terminate a job and its entire child process tree ( |
| Unbind and optionally shut down or reopen the bridge with a fresh pairing code. |
Manual Launch Commands / 手动启动备用命令
Start bridge in an existing external terminal (standard or already-Administrator):
powershell -NoProfile -ExecutionPolicy Bypass -File "$env:USERPROFILE\.gemini\config\plugins\external-terminal-bridge\scripts\start-external-bridge.ps1"Trigger Windows UAC to open a new Administrator external terminal:
powershell -NoProfile -ExecutionPolicy Bypass -File "$env:USERPROFILE\.gemini\config\plugins\external-terminal-bridge\scripts\start-admin-bridge.ps1"
Development & Testing / 开发与测试
npm install
npm run build:conpty
npm testAll tests run in isolated temporary state directories and never touch live bindings or active external terminals.
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
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Remote shell and detached long-running jobs on your own machines — no SSH, open ports or VPN.
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 ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables secure command-line interactions on Windows systems with support for PowerShell, CMD, Git Bash, and WSL shells, providing controlled file access, command execution, and configurable security restrictions.620 npm4MIT
- AlicenseBqualityDmaintenanceEnables secure command-line interactions on Windows systems through PowerShell, CMD, and Git Bash, with support for SSH remote connections, SFTP file transfers, system monitoring, and configurable security controls including command blocking and path restrictions.342MIT
- AlicenseAqualityCmaintenanceEnables SSH remote command execution, passwordless key management, Windows Session 0 desktop process launching, and SFTP file transfers across Windows, Linux, and macOS.813 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables persistent terminal sessions across multiple shells (Bash, CMD, PowerShell, WSL) with incremental output reading and autonomous goal execution with acceptance criteria.MIT