Gemini Web MCP
Provides read-only Git tools (git_status, git_diff, git_log) to inspect branches, staged or unstaged diffs, and recent commits in authorized repositories.
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 Web MCP
让 Gemini 网页端和移动 App 通过 MCP 访问你明确授权的本地目录。模型在 Gemini Apps 中运行,使用该账号的 Gemini Apps 额度,可以独立于 IDE 使用。文件、Git 和终端操作在宿主机执行。工具返回的文件片段和命令输出会进入 Gemini 对话上下文。连接器是否可用取决于账号、地区和客户端。 Gemini Apps 用量 · 自定义连接器说明
交给 AI Agent 配置 · 远程接入技术参考 · 新 Mac 安装与迁移
平台支持
场景 | 当前支持 |
macOS 本机宿主 + Linux VPS 反向代理 | 开箱支持。VPS 提供 Nginx HTTPS 入口,Mac 通过 SSH 反向转发。HTTP 侧的文件、Git 和终端使用 macOS Seatbelt( |
macOS 本机 stdio | 需要支持 stdio MCP 及目录级沙盒的客户端。提供文件工具 |
Windows / Linux 本机宿主 | 沙箱与守护进程适配已列入路线图,欢迎贡献 PR |
Related MCP server: Spark Terminal MCP
架构
Gemini Web / Mobile ── HTTPS + OAuth /mcp ──▶ Linux VPS(Nginx)
│
VPS 回环转发端口
│
SSH 反向隧道(Mac 发起)
│
macOS 回环 MCP
│
Seatbelt → 已授权目录
本机 MCP 客户端 ── stdio ──▶ 文件工具(继承客户端沙盒) ──▶ 已授权目录HTTPS 入口复用 VPS 已有的公开端口。Mac 和 VPS 上的 MCP 转发端口均绑定 127.0.0.1,家庭路由器无需开入站端口。
部署入口
先准备 uv、macOS 宿主和一个只含合成文件的测试目录。远程接入按 Agent 指南 或 远程技术参考 操作。先运行 python3 scripts/install_local.py --check-sandbox 验证 Seatbelt,再准备 DNS、VPS 和 OAuth。发布地址形如 https://mcp.example.invalid/mcp,实际部署时换成你有权管理的域名。
本机 stdio 可以直接安装。示例路径须换成已存在的规范绝对路径。
python3 scripts/install_local.py \
--workspace /absolute/path/to/approved-project \
--workspace-id demo-project --access read_only将安装回执中的 command 填入本机客户端的 stdio MCP 设置,显示名用 Gemini Web MCP。在客户端的外层沙盒中仅授权这个工作区。安装器默认使用已缓存的锁定依赖,首次安装缺少缓存时可显式加 --allow-download。
MCP 工具
有权限的账号可以发现 HTTP 的 15 个工具。stdio 注册其中 11 个文件工具。具体调用须满足工作区权限。
工具 | HTTP | stdio | 用途 |
| ✓ | ✓ | 查看工作区 ID 与权限 |
| ✓ | ✓ | 列出相对目录 |
| ✓ | ✓ | 按行读取文本,返回全文件 SHA-256 |
| ✓ | ✓ | 按文件名或通配符查找 |
| ✓ | ✓ | 字面或受限正则搜索,返回行号 |
| ✓ | ✓ | 分页读取 Markdown frontmatter 和标题 |
| ✓ | ✓ | 批量读取,最多 20 个文件 |
| ✓ | ✓ | 在已存在的父目录下新建目录 |
| ✓ | ✓ | 创建文本或按已知 SHA-256 覆盖 |
| ✓ | ✓ | 校验 SHA-256 后替换匹配文本 |
| ✓ | ✓ | 校验 SHA-256 后删除匹配的普通文件 |
| ✓ | — | 查看受支持仓库的分支和变更 |
| ✓ | — | 查看暂存或未暂存的差异 |
| ✓ | — | 查看近期提交 |
| ✓ | — | 在显式授权的可写目录运行受限命令 |
在本机管理工作区
workspace="$HOME/.local/share/gemini-web-mcp/remote/workspace"
"$workspace" list
"$workspace" status
"$workspace" add /absolute/path/to/another-project --id reference
"$workspace" update reference --access read_write --terminal
"$workspace" update reference --access read_only --no-terminal
"$workspace" remove reference
"$workspace" reloadlist 查看白名单,status 查看回环监听及隧道状态。新增默认只读。改动后运行 reload,也可给 add、update、remove 加 --reload,以重载已核验的 HTTP 服务。所有已授权账号共用同一份工作区白名单,配置必须至少保留一个工作区。
安全设计
拒绝整个主目录、系统和凭证目录、符号链接根、重叠工作区,以及与控制面双向重叠的目录。运行副本、配置、凭据和 OAuth 状态在工作区之外。
HTTP 需要 OAuth、PKCE 和本机预绑的 Google 账号,动态注册只接受精确确认的回调。OAuth 状态加密保存在宿主机。
HTTP 文件、Git 和终端在 Seatbelt 中执行。Git 工具只读。终端默认关闭,开启后仍禁止网络,隔离进程与文件权限。部分依赖
posix_spawn的工具链会失败。stdio 继承客户端沙盒。文件工具拒绝越界路径、符号链接跳转、硬链接和跨卷访问,为覆盖和删除校验 SHA-256。宿主系统与本机用户属于信任边界。
测试与分发
uv run --frozen pytest
uv build
python3 scripts/export_bundle.py完整集成测试需 macOS 和 Seatbelt,以临时目录、回环网络和合成身份进行。源文件包写入 dist/gemini-web-mcp-source.tar.gz,包含 SHA-256 清单。许可证为 MIT。
复制给你的 AI Agent
请阅读本仓库的 AGENT_GUIDE.md,和我一起部署 Gemini Web MCP。先检查宿主平台、uv、Seatbelt 与可用入口,用合成目录跑隔离验收。列出你需要我确认的工作区绝对路径及权限、DNS、VPS 或 Cloudflare 改动。先保留只读和终端关闭。我自己处理登录和授权,你只记录测试结果与脱敏错误。分别验收 Gemini 网页端和手机端,最后给我部署清单和回滚步骤。
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
Drive Google Antigravity from the Gemini app: remote MCP with OAuth 2.1 + PKCE.
Connect AI agents to Filepad workspaces through OAuth MCP.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Remote MCP for Gemini upgrade evals, prompt regressions, output diffs, and eval receipts.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceA local MCP server that enables Gemini Spark to safely access and work with files in a user-selected workspace via authenticated HTTPS tunnel, with sandboxing, policy enforcement, and audit logging.3-
- FlicenseNot gradedqualityBmaintenanceEnables Gemini Spark to securely connect via full OAuth 2.1 and use 30+ terminal, file, web, Git, and system management tools through MCP.-
- AlicenseNot gradedqualityBmaintenanceEnables 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 gradedqualityAmaintenanceEnables AI assistants to securely inspect, search, edit, build, and test explicitly authorized local development projects over MCP, with sandboxed filesystem access and sensitive-file protection.2AGPL 3.0