ConsoleSun/Gemini-Eyes 预览 preview

ConsoleSun/Gemini-Eyes

Plugin插件 Native原生 ⭐ 11 Models & Routing模型与路由

Project Overview项目介绍

Gemini-Eyes is an MCP server that exposes Gemini web capabilities to any AI agent that supports the MCP protocol. It does not require an official Google Gemini API key and incurs no API billing, because it reuses the existing authenticated Google session cookie from your local browser. It shares your existing Gemini web account's conversation history and generation quota, and comes pre-bundled with a DSH manifest for native installation on DeepSeek Harness. It also works with any standard MCP client like Claude Desktop, Cline, and other common MCP-enabled agents.

This tool is targeted at developers who already have access to Gemini web through their browser but do not have access to an official Gemini API key or do not wish to pay for official API usage. To get started, you first install the project dependencies using uv, which is the recommended dependency manager for this project. Next you extract your Gemini cookie either automatically from your Chrome or Edge browser, or manually via a browser extension like Cookie-Editor if automatic extraction fails. Once the cookie is configured and the service is started, your agent can call the 9 available Gemini tools for whatever task you need.

This project is an unofficial reverse-engineered wrapper for Gemini's internal web APIs, so it comes with significant risks. Automated access to Gemini via this method may violate Google's Terms of Service, and there is a non-zero risk of your Google account being banned. You are strongly advised to only use a dedicated throwaway Google account for testing this tool, and you should not use it for any commercial purposes. Automatic cookie extraction may fail on newer browsers that use portal/app-bound encryption, so manual export is required in these cases.

这是一个桥接 Gemini 网页端能力的 MCP 服务,可让任意 AI Agent 调用 Gemini 的对话、多媒体分析、文生图、文生视频、会话管理等能力。它不需要官方 API 密钥,也不会产生 API 计费,直接复用浏览器中已登录的 Google 账号 Cookie,和你在浏览器中使用共享同一账号的历史与生成额度。项目自带 DSH 绑定清单,可开箱即用接入 DeepSeek Harness,同时也兼容所有标准 MCP 客户端。

适合已经可以访问 Gemini 网页端,但不想支付官方 API 费用,或是暂时无法申请到官方 API 密钥的开发者使用。典型工作流程为:先按照文档安装 Python 依赖,再从本地浏览器提取或手动导出 Gemini 的登录 Cookie,配置完成启动服务后,Agent 即可调用各类 Gemini 能力完成图文识别、内容生成、媒体下载等任务。

本项目是对 Gemini 网页端内部接口的逆向封装,不属于 Google 官方项目,自动化访问可能违反 Google 服务条款,使用存在账号被封禁的风险,请务必使用专用小号测试,不要用于商业用途。运行依赖 Python 3.10 及以上版本,推荐使用 uv 管理依赖,新版浏览器可能无法自动提取 Cookie,需要手动导出配置。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
  • 11 stars - an early-stage project星标 11,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile demo add github:ConsoleSun/Gemini-Eyes

把 ConsoleSun/Gemini-Eyes 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

gemini-web-mcp

让 Agent 用上 Gemini 的「眼睛」和「手」 —— 一个 MCP 服务,把 gemini.google.com 网页端的能力桥接给任何 Agent:

  • 🗣️ 对话:多轮聊天、续聊历史会话
  • 👁️ 看图 / 看视频:上传本地文件,让 Gemini 识别并描述
  • 🎨 生图(Imagen)/ 🎬 生视频(Veo):自动下载成品到本地
  • 💬 会话管理:列出 / 读取 / 删除账号下的历史对话
  • 🔄 免维护登录态:后台每 25 分钟自动续期 Cookie,服务常驻就不过期

核心特点:不走官方 API——不需要 API Key、不产生 API 计费。它复用你浏览器里 已登录的 Google 会话 Cookie,重放网页端的内部请求,与你在浏览器里使用完全等价 (共享账号历史、共享生成额度)。

⚠️ 风险提示

本项目是对 Gemini 网页端内部接口的逆向封装,非官方 API;自动化访问可能违反 Google 服务条款,请合法使用、自行评估风险。请务必使用专用 Google 小号测试, 不要使用主力账号——这类操作有真实的封号风险,且不应用于商业用途或批量抓取。


快速开始

环境:Python ≥ 3.10,推荐 uv。

uv sync --extra dev        # 安装依赖

1. 准备 Cookie(二选一)

A. 自动提取:在 Chrome/Edge 登录 gemini.google.com 后关闭浏览器:

uv run python -m gemini_mcp.cookie_extractor --browser chrome --list --domain google.com

新版浏览器改用 portal/app-bound 加密无法离线解密时,程序会明确提示,改用方式 B。

B. 手动导出:用浏览器扩展(如 Cookie-Editor)导出 gemini.google.com 的全部 Cookie 为 JSON。全量导出、一个不落;其中 __Secure-1PSID 必带,浏览器里有 __Secure-1PSIDTS 则必须一起带。保存位置三选一:

  • 默认路径 ~/.config/gemini-web-mcp/cookies.json —— 服务自动读取,零配置
  • 任意路径 + 启动参数 --cookie-file /path/to/cookies.json
  • 任意路径 + 环境变量 GEMINI_COOKIE_FILE

2. 启动服务

# stdio(大多数 MCP 客户端用这个)
uv run gemini-mcp --cookie-file cookies.json

# HTTP(供远程 Agent 或调试;默认开启 Bearer token 鉴权,启动时打印随机 token)
uv run gemini-mcp --cookie-file cookies.json --transport http --port 8900

3. 接入客户端

DeepSeek Harness(推荐):仓库根目录带有 DSH bundle 清单,开箱即用——不设 环境变量时走「uv + Chrome 自动提取 Cookie」的零配置路径;需要自定义时,在启动 dsh web 前设置环境变量(任选):

  • GEMINI_EYES_UV —— uv 的绝对路径(默认:PATH 上的 uv)
  • GEMINI_EYES_DIR —— 本仓库的绝对路径(默认:dsh 的当前工作目录)
  • GEMINI_COOKIE_FILE —— 手动导出的 cookies.json 路径(默认: ~/.config/gemini-web-mcp/cookies.json,若存在;否则从 Chrome 自动提取)
dsh plugin --profile demo add github:ConsoleSun/Gemini-Eyes
dsh --profile demo

新开会话后工具以 mcp__gemini-web__* 出现。

DSH bundle 已把 toolCallTimeoutMs 设为 600000 毫秒(10 分钟),以覆盖 mcp-client 默认的 60 秒超时。

Claude Desktop / Cline / 其他:标准 MCP 配置,command + args 指向 gemini-mcp --cookie-file /path/to/cookies.json(stdio),或 HTTP 模式填 http://127.0.0.1:8900/mcp 并带 Authorization: Bearer <token> 头。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-desktop 下一个 Next dsh-bookmarks →