antigravity-docview_cards
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.
当 Agent 完成代码、文档、图表或网页开发后,Antigravity DocView 会直接在对话流中生成极简的 Codex 风格文件卡片:普通文件一键/双击直达 Antigravity 原生侧栏预览;本地 HTML 自动挂载至本机 HTTP 端口,与外部网站一致通过原生直链秒开侧栏内置浏览器——零常驻 Sidecar、零多余浏览器面板、零子 Agent 等待。

核心特性
Codex 风格独立文件卡片:无外框、无多余描述性文案;左侧自动匹配文件类型彩色图标(图片自动加载缩略图),右侧为
[ 打开 | ⌄ ]分体胶囊按钮,自适应 Antigravity 浅色/深色主题。紧凑悬浮操作菜单:点击
⌄在按钮旁就地展开圆角菜单,悬停高亮反馈清晰,鼠标离开按钮与菜单区域后自动平滑收起(支持Esc与外部点击关闭)。文档 / 图片 / 代码直达侧栏预览:点击「打开」或双击文件卡片直接通过
com.google.antigravity/toggle-aux-pane唤起 Antigravity 原生侧栏fileView。本地 HTML 与网页零延迟侧栏预览:
交付本地
.html/.htm时,插件内置的LazyHtmlHost按需启动回环 HTTP 服务(默认http://127.0.0.1:47831/html/...,冲突自动顺延),支持同工作区相对路径 CSS / JS / 图片、ES Module 与Cache-Control: no-store实时刷新,服务重载后自动恢复挂载。回复正文附带对应的原生直链,点击即在 Antigravity 原生侧栏浏览器 0 延迟打开(不触发笨重的
browser子代理)。
对话结束智能兜底(
StopHook):若本轮实际生成/更新了文档、HTML、图片或压缩包却遗漏调用卡片,自动提醒补发;纯问答、未完成回合及内部 Artifact 零打扰。开箱即用的跨平台兼容:支持 Windows / macOS / Linux,仓库内置编译好的
dist/运行时单文件产物,其他电脑无需npm install即可直接克隆启用。
Related MCP server: op-product-design-mcp
界面示意图
浅色主题 · 文件卡片与悬浮菜单
点击文档、图片、代码卡片的「打开」或双击卡片即可唤起侧栏 fileView 预览;点击右侧 ⌄ 展开悬浮操作菜单:

深色主题 · 本地 HTML 菜单与暗黑自适应
自动跟随 Antigravity 宿主主题切换;本地 HTML 卡片主按钮「打开」直开本地端口渲染页,⌄ 菜单提供「侧栏查看源码」「复制预览链接」「在文件资源管理器中显示」等完整操作:

快速安装(其他电脑 10 秒上手)
前置要求
已安装 Google Antigravity(Antigravity App 2.0 / IDE)
系统已安装 Node.js ≥ 20(命令行可直接执行
node -v)
仓库已内置打包好的运行时文件(
dist/server.mjs、dist/stop-hook.mjs、dist/card.html),无需安装node_modules或手动编译。
方式一:直接克隆到 Antigravity 插件目录(推荐)
Windows (PowerShell):
git clone https://github.com/bluepillowman/antigravity-docview.git "$env:USERPROFILE\.gemini\config\plugins\antigravity-docview"macOS / Linux:
git clone https://github.com/bluepillowman/antigravity-docview.git ~/.gemini/config/plugins/antigravity-docview克隆完成后,Antigravity 会自动发现并启用 Antigravity DocView(如当前应用正在运行,开启新对话即可生效;若需要立即重载 MCP,可在 Settings → MCP Servers 刷新 antigravity-docview_cards)。
方式二:从源码构建并部署
适合需要二次开发或自定义样式的开发者:
git clone https://github.com/bluepillowman/antigravity-docview.git
cd antigravity-docview
npm install
npm run typecheck
npm run build
npm test
npm run deploy更新与卸载
更新(方式一):
cd ~/.gemini/config/plugins/antigravity-docview git pull卸载:
在 Antigravity 的 自定义扩展 / Plugins 页面卸载或禁用
Antigravity DocView,或直接删除插件目录:# macOS / Linux rm -rf ~/.gemini/config/plugins/antigravity-docview# Windows (PowerShell) Remove-Item -Recurse -Force "$env:USERPROFILE\.gemini\config\plugins\antigravity-docview"
快速验证是否生效
打开 Antigravity 的 自定义扩展(Plugins),确认 Antigravity DocView 处于启用状态。
(可选)确保 Antigravity 设置中网页链接默认在 Built-in browser(内置浏览器) 打开,点击聊天区直链即可直接在侧栏原生浏览器秒开。
在对话中输入测试指令:
请使用 Antigravity DocView 展示示例页面
examples/sample-page.html
交互说明
产物类型 | 点击「打开」/ 双击卡片 |
|
文档 / PDF / Markdown / 代码 / 图片 | 唤起 Antigravity 侧栏 | 侧栏预览、默认应用、在文件资源管理器中显示、复制路径、附加上下文 |
本地 HTML( | 通过本地 HTTP 端口打开渲染页面(聊天区同时附原生直链秒开侧栏浏览器) | 浏览器预览、侧栏查看源码、在文件资源管理器中显示、复制预览链接、复制文件路径、附加上下文 |
外部 / 本地服务网址( | 系统默认浏览器打开(聊天区同时附原生直链秒开侧栏浏览器) | 默认浏览器、复制网址、附加上下文 |
文件夹 | 在系统文件管理器中定位打开 | 在文件资源管理器中显示、复制路径、附加上下文 |
架构与目录结构
antigravity-docview/
├── plugin.json # Antigravity 插件清单
├── mcp_config.json # MCP Server 入口配置(使用 ${PLUGIN_ROOT} 与 ${PLUGIN_DATA})
├── hooks.json # Stop 生命周期兜底钩子配置
├── assets/logo.svg # 插件图标
├── rules/AGENTS.md # 插件全局行为规则(卡片呈现 + 原生直链预览规范)
├── skills/antigravity-docview/
│ └── SKILL.md # 插件技能说明
├── src/
│ ├── server/
│ │ ├── index.ts # MCP Server(present_deliverables + 3 个 app-only 工具)
│ │ ├── localHtmlHost.ts # 按需启动的本地回环 HTTP 静态服务(支持重载恢复)
│ │ ├── storage.ts # 交付记录持久化与路径访问白名单校验
│ │ ├── fileInspect.ts # 文件分类、元数据读取、图片尺寸与缩略图编码
│ │ └── systemOpen.ts # 跨平台默认应用打开与文件管理器定位(含危险脚本拦截)
│ ├── ui/
│ │ ├── card.ts # MCP App 前端逻辑(Codex 卡片与悬浮菜单)
│ │ └── styles.css # 浅色/深色自适应主题样式
│ ├── hooks/stopHook.ts # 对话结束兜底检查脚本
│ └── shared/types.ts # 共享类型定义
├── dist/ # 预编译单文件运行时产物(零 node_modules 依赖)
│ ├── server.mjs
│ ├── stop-hook.mjs
│ └── card.html
├── scripts/
│ ├── build.mjs # esbuild 打包脚本
│ └── deploy.mjs # 跨平台安装 / 卸载脚本
├── tests/server.test.mjs # 端到端 MCP 协议、端口服务、安全拦截与 Hook 单测
├── examples/sample-page.html # 本地 HTML 预览测试示例页
└── docs/images/ # README 示意图素材可选环境变量
变量名 | 说明 | 默认值 |
| 本地 HTML 预览服务优先绑定的回环端口(设为 |
|
| 开发调试时指定自定义 |
|
安全设计
仅绑定本地回环:本地 HTML 静态服务严格监听
127.0.0.1,不向局域网或公网暴露端口。路径授权与穿越拦截:所有缩略图读取、HTML 端口挂载和系统打开请求均须通过
DeliverableStore已登记路径/工作区白名单校验,静态服务拦截../越界访问(返回403 Forbidden)。危险脚本防误执行:调用系统默认应用打开文件时,自动拦截
.exe/.bat/.cmd/.ps1/.vbs/.js/.msi/.sh/.command/.appimage等可执行/脚本后缀,降级为在文件管理器中定位选中。
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
Deploy HTML pages and built web apps (React, Vue, Vite) to a live HTTPS link from your AI agent.
Deploy AI-generated HTML/CSS/JS to instant public HTTPS URLs from any MCP-compatible agent.
Instant web publishing for AI agents. POST HTML, get a live URL. No account needed.
Super Artifacts lets AI agents create, host and share interactive artifacts: web pages, reports, forms and media galleries. Combine HTML, images, video and audio, collect responses, and collaborate at one link. Artifacts start private. Connect over OAuth; connecting publishes nothing. Home: https://superartifacts.app. Setup: https://superartifacts.app/docs. Pricing: https://superartifacts.app/pricing.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to send HTML documents to a local viewer, where they are stored and displayed in a live web UI for browsing and searching.-
- AlicenseAqualityCmaintenanceEnables AI hosts to validate, write to disk, hot-reload, preview, and export single-file HTML prototypes built to the Spark OP design spec, serving them locally at 127.0.0.1:5179 by slug. Also bundles the triggering skill, spec references, templates, and CSS tokens so agents can create, revise, and hand off development-ready prototype HTML through one controlled output path.915 npmMIT
- AlicenseNot gradedqualityBmaintenanceExposes a governed, OAuth-gated set of tools that let web-based AI chat clients read and write local files, run whitelisted shell commands, search code, inspect Git and SQLite data, automate browsers and DevTools, and manage background jobs, localhost services, clipboard, notifications, and Postman on the user's own machine.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Codex to launch and orchestrate local agent sessions, delegate tasks, return clickable live web links, and independently verify actual workspace changes.1MIT