Antigravity Win Explorer
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.
为什么需要这个插件?
在 Windows 上使用 Google Antigravity 2.0 桌面端时,常见的几个高频痛点:
聊天气泡里的文件链接无法一键在资源管理器中定位:点击文件胶囊通常只能复制或在应用内预览,无法像日常开发那样直接弹出 Windows 资源管理器并高亮选中该文件(
explorer.exe /select,)。外部文件不方便直接用默认软件打开:AI 生成的
.pdf、.docx、.xlsx、.png等交付物,每次都要手动复制路径去文件夹找,再用 Word / Excel / PDF 阅读器打开。右侧工作区缺少完整右键菜单 & 隐藏产物难找:Antigravity 对话产物默认保存在隐藏目录
%USERPROFILE%\.gemini\antigravity\brain\下,平时排查历史输出非常麻烦。现有社区同类插件大多只适配 macOS:依赖
bash启动脚本和 macOS 专用的open -R,在 Windows 上直接不可用。
antigravity-win-explorer 将聊天内嵌交互卡片与侧边栏全功能文件浏览器合二为一,原生采用 node 启动(无需 Bash、无需 npm install),专为 Windows 10/11 打磨,同时也完整兼容 macOS(访达)和 Linux(xdg-open)。
Related MCP server: Antigravity File Viewer
核心功能一览
入口 / 视图 | 核心能力 | 交互体验 |
1. 聊天内嵌文件卡片(MCP App + 自动规则) | AI 每次产出文档、脚本、报告或图片时,自动在回复末尾渲染紧凑的交互文件卡片 | • 双击文件行 或点击 |
2. 侧边栏 / 全局文件浏览器(Side Pane + Global 入口) | 在右侧辅助栏 | • 完整右键菜单:在资源管理器中显示、用默认程序打开、在标签页中预览、在 Windows Terminal / PowerShell 中打开、复制完整路径、收藏目录• 盘符与快捷目录条:一键切换 |
3. 最近产出扫描(Recent Outputs) | 一键扫描隐藏目录 | • 按最新修改时间排序,支持按来源(Brain / Scratch)与关键词过滤• 找回任意历史对话产物并一键定位、打开或预览 |
4. 收藏夹 & 偏好持久化 | 跨会话持久化保存到 | • 收藏常用工作区/目录一键直达• 可自由配置双击文件动作(定位 / 默认打开)与双击文件夹动作(进入 / 定位)• 实时同步 Antigravity 明暗主题 |
架构与工作原理
基于 MCP(Model Context Protocol)+ MCP Apps(SEP-1865) 协议,运行时零外部依赖:
flowchart LR
Agent["Agent / Always-On 规则"] -->|"stdio JSON-RPC (node)"| Server["零依赖 MCP Server<br/>server/index.mjs"]
Server -->|"structuredContent"| Host["Antigravity 2.0 宿主"]
Server -->|"ui://antigravity-win-explorer/*.html"| Host
Host -->|"隔离 iframe + 主题变量"| UI["内嵌文件卡片 / 侧边栏浏览器<br/>dist/inline.html & explorer.html"]
UI -->|"tools/call (app-only)"| Server
Server -->|"explorer.exe /select, / Start-Process / wt.exe"| Win["Windows 资源管理器 / 默认程序 / 终端"]无需 Bash:
mcp_config.json直接调用node ${PLUGIN_ROOT}/server/index.mjs --data_dir=${PLUGIN_DATA}。注入防护:Windows 默认程序打开与终端启动均通过环境变量向
Start-Process -LiteralPath传参(绝不使用shell: true拼接命令),天然兼容中文路径、空格、括号及特殊字符。预构建单文件 UI:
dist/inline.html与dist/explorer.html已打包@modelcontextprotocol/ext-apps并提交至仓库,满足 Antigravity 严格 CSP 要求,安装即用。
快速安装(Windows 零构建)
环境要求:Google Antigravity 2.0、Node.js(
v18+)。已内置预构建 UI,无需执行npm install。
方式一:Git 克隆直接安装(推荐)
打开 PowerShell,直接克隆到 Antigravity 全局插件目录:
git clone https://github.com/tino0190/antigravity-win-explorer.git "$env:USERPROFILE\.gemini\config\plugins\antigravity-win-explorer"方式二:使用 PowerShell 安装脚本
下载或克隆本仓库后,在仓库根目录运行:
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1如需卸载,可运行
powershell -NoProfile -ExecutionPolicy Bypass -File .\uninstall.ps1,或在 Antigravity 的 Skills & Customizations → Plugins 页面直接卸载。
安装后如何使用(无需重启 Antigravity)
Antigravity 会自动发现 ~/.gemini/config/plugins/ 下的新插件:
打开侧边栏浏览器:点击右侧辅助栏的
+按钮 → 选择Win 资源管理器(也可从左侧全局导航栏打开全屏视图)。体验聊天内嵌卡片:下一轮对话让 AI 生成任何文档/脚本,回复末尾会自动附上文件定位卡片;你也可以直接说:
“用文件卡片展示当前目录下的主要文件”
“打开 Win 资源管理器看看最近的对话产出”
工作区级规则(可选):如需在特定项目中强制提醒出卡,可将
examples/.agents/rules/win-explorer-inline-card.md复制到项目的.agents/rules/目录。
目录结构
antigravity-win-explorer/
├── plugin.json # Antigravity 插件清单
├── mcp_config.json # 原生 node 启动的 stdio MCP 配置
├── install.ps1 / uninstall.ps1 # Windows 一键安装与卸载脚本
├── README.md / README.en.md # 中英文说明文档
├── LICENSE # MIT 协议
├── assets/
│ └── logo.svg # 自适应明暗主题矢量图标
├── rules/
│ └── AGENTS.md # 插件内置全局规则:产出文件后自动展示卡片
├── examples/.agents/rules/
│ └── win-explorer-inline-card.md # 可选工作区规则模板
├── server/
│ └── index.mjs # 零依赖 Node.js MCP Server
├── dist/
│ ├── inline.html # 预构建单文件内嵌卡片 UI
│ └── explorer.html # 预构建单文件侧边栏浏览器 UI
├── src/ # UI 源码(使用 @modelcontextprotocol/ext-apps)
├── scripts/
│ └── build-ui.mjs # esbuild 单文件打包脚本
└── test/
└── smoke.mjs # MCP stdio 端到端冒烟测试安全与隐私说明
纯本地运行:插件不发起任何外部网络请求,所有文件扫描与打开操作均在本地完成。
无破坏性工具:仅提供只读目录浏览、在资源管理器中定位、默认程序打开与终端打开,不暴露任何删除或覆写用户文件的工具。
防命令注入:所有系统调用均使用
spawn/execFile配合-LiteralPath与环境变量传参,杜绝 Shell 注入风险。
本地开发与构建
如果你修改了 src/ 下的前端源码,可重新构建 dist/ 并运行冒烟测试:
npm.cmd install
npm.cmd run build:ui
npm.cmd testLicense
基于 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
Read and search folders on your own computer with explicit consent. Files are never uploaded.
Search, read, preview, create, update, rename, arrange and trash sketches in your Google Drive.
Manage files and folders directly from your workspace. Read and write files, list directories, cre…
Find, read and reorganize files across Google Drive, OneDrive, SharePoint and Dropbox, with undo.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables browsing, editing, and previewing workspace files — Markdown, images, PDFs, and Git diffs — directly inside Google Antigravity's sidebars. Provides a file tree with quick search, CodeMirror-based editing with syntax highlighting, and one-click chat context attachment, all without consuming model tokens.MIT
- AlicenseNot gradedqualityBmaintenanceEnables previewing local Word, Excel, PowerPoint, PDF, HTML, ZIP, Jupyter Notebook, media, images/SVG, and Markdown files directly in Google Antigravity's sidebar or full-page view, with automatic agent-driven opening and file navigation.MIT
- AlicenseNot gradedqualityCmaintenanceEnables an enhanced file-explorer side panel in Google Antigravity with right-click file and folder operations, including reveal/open, terminal launch, path copying, chat attachment, create/rename/copy/cut/paste/delete, properties, workspace switching, filtering, and recursive search.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables inspecting Google Antigravity sessions to break down context window composition and prefix-cache hits, rank token-heavy tool output hotspots, track every workspace file the agent read or modified, and search past transcripts and artifacts bilingually. It also lets users open touched files natively in a side pane and inject redacted historical excerpts or file references directly into the next prompt.MIT