Universal Local File Studio
Reads and renders local Jupyter .ipynb notebooks, displaying code cells, text outputs, and embedded Matplotlib charts without requiring a Jupyter server.
Previews local SQLite database files, maps tables to sheet tabs, supports filtering/statistics, and can export tables to .xlsx.
Previews local SVG images with zoom/rotate/background controls and can convert them to PNG/JPG/WebP/PDF.
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.
Universal Local File Studio · 全能本地文件预览工作台
专为 Google Antigravity 打造的本地 55+ 种非常规/办公/科研文件分屏预览与无损快改原生插件(MCP App + Lifecycle Hooks)
简体中文 | English Documentation
💡 为什么需要这个插件?
在 Google Antigravity 中与智能体协作撰写论文、整理实验数据或处理多媒体素材时,软件自带的内置查看器(File View)仅支持纯文本代码、Markdown、PDF 和常规网页图片。一旦遇到 .docx Word 论文、.xlsx 多表数据、.pptx 组会课件、苹果 .heic 照片、多页科研 .tiff 插图、Stata .dta 面板数据或 .7z 压缩包,直接点开就会提示 “此文件类型不支持显示”。
Universal Local File Studio(全能本地文件预览工作台) 基于 Antigravity 原生开放的 MCP App (SEP-1865) + Plugin + Lifecycle Hooks 架构,将右侧 辅助面板(Auxiliary Pane) 与左侧 侧边栏(Left-hand Sidebar) 直接升级为纯本地离线、零隐私外泄、支持原位无损快改的全能文件工作台。
Related MCP server: doc-viewer
✨ 五大核心特性
🗂️ 5 大类 55+ 种本机非原生格式一站式兼容
全面覆盖 Office / 金山 WPS / Visio、手机 HEIC / 科研多页 TIFF / PSD / EMF 图像、Stata / SPSS / Parquet / SQLite / MATLAB 实证与实验数据、EPUB / MOBI 电子书 以及 7z / ZIP 压缩包、Jupyter Notebook、Outlook 邮件与字体文件。✏️ OpenXML 无损结构化原位快改(100% 保样式)
Word (
.docx):双击 A4 页面上的任意段落或三线表单元格即可直接改字并写回原文件;独创 Diff-Preserving Run Surgery 跨<w:r>差异缝合算法,100% 保留原有宋体/Times New Roman 字体、加粗斜体、行距、页边距与学术三线表边框;内置【待填】占位符自动聚合填充与 纯汉字 + MS Word 双轨字数统计仪。Excel (
.xlsx/.csv):支持底部多工作表切换、合并单元格、顶部fx公式栏、鼠标拖选实时计算 求和 / 均值 / 最大 / 最小,双击单元格修改数值或=SUM(...)公式无损写回(保留原工作簿图表与格式)。PPT (
.pptx):像素级高清幻灯片胶片预览 + 点击本页任意文本框无损改字并实时重绘幻灯片。20 步历史快照撤销 + 一键高保真导出 PDF。
📂 一键调起系统原生资源管理器选文件(告别复制路径)
面板左上角内置 「📂 本机选文件」 按钮,直接唤起 Windows 资源管理器 / macOS Finder / Linux 文件选择窗口,双击即可秒开任意磁盘文件;点击📁一键在系统文件夹中高亮定位当前文件。⚡ 对话生成文档「零点击自动弹出右侧分屏」
内置PostToolUse + Stop双层生命周期钩子(hooks.json)与全局协作规则(rules/AGENTS.md)。当 AI 在对话中新建或修改了 Word、Excel、PPT、Stata 数据或高清插图时,右侧辅助面板会自动弹出并刷新该文件预览,无需人工再去菜单寻找或复制路径。🔒 纯本地单文件沙箱,100% 数据隐私安全
前端渲染引擎(docx-preview+JSZip+@modelcontextprotocol/ext-apps)已预打包为单一离线 HTML 资源(ui/app.html,约 815 KB),无需构建前端、无需联网,所有学术手稿与实验数据均不离开本机。
📊 支持格式与功能全景矩阵
类别 | 支持后缀 | 专属交互能力与内置工具 |
1. Office / WPS / Visio 办公套件 | Word: | • Word 1:1 仿真 A4 分页、白纸/暖纸/夜读底色、章节大纲与全文检索、待填项批量替换、双轨字数统计;• Excel 多 Sheet 切换、冻结行列头、 |
2. 手机照片、科研大图与设计稿 |
| • 鼠标滚轮无级缩放、 |
3. 经管实证与理工科实验数据 |
| • 直接在交互式电子表格中高速预览、筛选与框选统计;• Stata |
4. 电子书与固定版式文档 |
| • 基于 PyMuPDF 自适应流式排版分页、左侧目录缩略图、键盘翻页与一键导出 |
5. 压缩包、代码本、邮件与字体 | 压缩包: | • 压缩包免解压透视:搜索包内文件并支持一键安全解压到同名目录(内置防路径穿越保护);• Jupyter |
🚀 30 秒极速安装
环境前置要求
Google Antigravity 桌面端
Python 3.10+(支持系统 Python、Anaconda / Miniconda、
venv或 Homebrew Python)(可选推荐) 安装 LibreOffice(免费开源):用于激活 PPT / Visio / 金山 WPS / 旧版
.doc的 1:1 矢量渲染及 Office 一键转 PDF 能力。
方式一:一键脚本自动部署(推荐)
克隆本仓库并运行 install.py,脚本会自动安装 Python 依赖、将插件部署到 ~/.gemini/config/plugins/word-studio/,并将您当前的 Python 解释器绝对路径自动写入配置(避免 GUI 环境变量找不到 Conda/虚拟环境):
git clone https://github.com/THU-DoFor/antigravity-universal-file-studio.git
cd antigravity-universal-file-studio
python install.py轻量安装选项:若仅需 Office + 照片图像 + 电子书核心能力(不安装
pandas/pyarrow/scipy等科研数据包),可运行:python install.py --minimal
方式二:从 GitHub Releases 下载免构建包
前往 Releases 页面 下载最新
antigravity-universal-file-studio-v3.0.0.zip;解压后运行
python install.py(或直接将文件夹放入~/.gemini/config/plugins/word-studio/并执行pip install -r requirements.txt)。
🖥️ 在 Antigravity 中的使用方式
安装完成后无需重启软件,Antigravity 会自动发现并启用插件:
右侧分屏并排审阅(最常用)
点击界面右上角辅助面板(Auxiliary Pane)的+号 → 选择🧩 插件→ 点击 「全能文件预览」(或在+页搜索框敲全能回车直达)。左侧全屏沉浸工作台
点击左侧侧边栏(Left-hand Sidebar)插件栏下的 「全能预览工作台」。打开任意本机文件
点击工作台左上角的蓝色 「📂 本机选文件」 按钮,直接从弹出的系统资源管理器中双击任意文件即可预览与快改。与 AI 对话全自动联动
在任意对话中让 AI 生成或修改.docx论文、.xlsx表格、.pptx演示文稿或.dta数据集,生成完毕时右侧面板会自动弹出预览。
🛠️ 系统架构与智能体工具(MCP Tools)
flowchart LR
subgraph Host["Google Antigravity Host"]
Chat["对话区 (Chat Canvas)"]
Hooks["Lifecycle Hooks (PostToolUse + Stop)"]
Pane["右侧辅助面板 / 全屏工作台 (Iframe Sandbox)"]
end
subgraph Plugin["Universal File Studio Plugin"]
UI["ui/app.html (docx-preview + Grid + Retina Stage)"]
Server["server/word_studio_server.py (MCP Stdio JSON-RPC)"]
Engines["Word Run Surgery | Excel Engine | PPT/Visio | Universal 55+ Decoder"]
Dialog["Native OS File Dialog (Win32 / Finder / Zenity)"]
end
Chat -->|"调用 MCP 工具"| Server
Hooks -->|"检测新生成文件自动唤起"| Chat
Server -->|"600KB 分块流式传输"| UI
UI <-->|"app.callServerTool()"| Server
Server --> Engines
Server --> Dialog插件同时向对话智能体暴露以下 4 个标准工具(另有 14 个 visibility: ["app"] 内部高速流式通信接口仅供前端面板调用,不占用模型上下文 Token):
工具名称 | 用途说明 |
| 在右侧辅助面板打开或刷新指定本地文件预览(支持传入 |
| 读取 Word 双轨字数/章节大纲/待填项、Excel/Stata/SQLite 表结构或 PPT 幻灯片标题与备注摘要。 |
| 对 |
| 将本地办公文档、高清图片或电子书一键高保真导出为 |
🧪 本地二次开发与自动化测试
前端单文件应用 ui/app.html 已预构建内置于仓库中,开箱即用。若您修改了 ui/styles.css 或 ui/app_logic.js,只需运行纯 Python 打包脚本即可重新生成单文件包(无需安装 Node.js):
# 重新打包单文件 CSP 安全前端 (ui/app.html)
python ui/build_ui.py
# 运行端到端冒烟自检测试(自动校验 MCP 握手、无损写回、撤销、表格与钩子)
python tests/smoke_test.py📄 开源许可协议
本项目采用 MIT License 开源协议发布。欢迎提交 Issue 与 Pull Request 扩展更多专业领域格式!
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
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Online office suite for AI agents: edit docs, sheets, slides and PDFs in browser or via MCP.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables Google Antigravity agents to quickly inspect and read PDF, Word, Excel, PowerPoint, and text documents, extracting structure and content as token-efficient Markdown.-
- AlicenseNot gradedqualityNot gradedmaintenanceEnables offline browsing, previewing, searching, and citing local PDFs, Word, Excel/CSV, Markdown, HTML, images, and code directly in Antigravity's sidebar, with agent integration for opening documents and sending selected text to conversations.1MIT
- 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