原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Gemini MCP

作者:chrischall版本 2.5.1i★ –i在你的电脑上运行
注册名称io.github.chrischall/gemini-mcp

安装

概览

作者提供的说明(英文原文)

Generate and edit images with Google Gemini (Nano Banana / Nano Banana Pro) image models.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 设计、图片与音频
  • 你需要填写:GEMINI_API_KEY

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: GEMINI_API_KEY, GEMINI_IMAGE_MODEL, GEMINI_OUTPUT_DIR, GEMINI_INPUT_DIR, GEMINI_UPLOAD_DIR, GEMINI_REFERENCE_DIR, GEMINI_TIMEOUT_MS, GEMINI_HEARTBEAT_MS, GEMINI_CHAIN_RETRY_MS, GEMINI_DEBUG, GEMINI_RATE_CARD

标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "gemini": {
      "command": "npx",
      "args": [
        "-y",
        "@chrischall/gemini-mcp"
      ],
      "env": {
        "GEMINI_API_KEY": "your-value",
        "GEMINI_IMAGE_MODEL": "your-value",
        "GEMINI_OUTPUT_DIR": "your-value",
        "GEMINI_INPUT_DIR": "your-value",
        "GEMINI_UPLOAD_DIR": "your-value",
        "GEMINI_REFERENCE_DIR": "your-value",
        "GEMINI_TIMEOUT_MS": "your-value",
        "GEMINI_HEARTBEAT_MS": "your-value",
        "GEMINI_CHAIN_RETRY_MS": "your-value",
        "GEMINI_DEBUG": "your-value",
        "GEMINI_RATE_CARD": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add gemini --env GEMINI_API_KEY=your-value --env GEMINI_IMAGE_MODEL=your-value --env GEMINI_OUTPUT_DIR=your-value --env GEMINI_INPUT_DIR=your-value --env GEMINI_UPLOAD_DIR=your-value --env GEMINI_REFERENCE_DIR=your-value --env GEMINI_TIMEOUT_MS=your-value --env GEMINI_HEARTBEAT_MS=your-value --env GEMINI_CHAIN_RETRY_MS=your-value --env GEMINI_DEBUG=your-value --env GEMINI_RATE_CARD=your-value -- npx -y @chrischall/gemini-mcp

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "gemini": {
      "command": "npx",
      "args": [
        "-y",
        "@chrischall/gemini-mcp"
      ],
      "env": {
        "GEMINI_API_KEY": "your-value",
        "GEMINI_IMAGE_MODEL": "your-value",
        "GEMINI_OUTPUT_DIR": "your-value",
        "GEMINI_INPUT_DIR": "your-value",
        "GEMINI_UPLOAD_DIR": "your-value",
        "GEMINI_REFERENCE_DIR": "your-value",
        "GEMINI_TIMEOUT_MS": "your-value",
        "GEMINI_HEARTBEAT_MS": "your-value",
        "GEMINI_CHAIN_RETRY_MS": "your-value",
        "GEMINI_DEBUG": "your-value",
        "GEMINI_RATE_CARD": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "gemini": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@chrischall/gemini-mcp"
      ],
      "env": {
        "GEMINI_API_KEY": "your-value",
        "GEMINI_IMAGE_MODEL": "your-value",
        "GEMINI_OUTPUT_DIR": "your-value",
        "GEMINI_INPUT_DIR": "your-value",
        "GEMINI_UPLOAD_DIR": "your-value",
        "GEMINI_REFERENCE_DIR": "your-value",
        "GEMINI_TIMEOUT_MS": "your-value",
        "GEMINI_HEARTBEAT_MS": "your-value",
        "GEMINI_CHAIN_RETRY_MS": "your-value",
        "GEMINI_DEBUG": "your-value",
        "GEMINI_RATE_CARD": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • GEMINI_API_KEY 机密 env
    Your Google Gemini API key (aistudio.google.com/apikey)
  • GEMINI_IMAGE_MODEL env
    Override the default image model (default: gemini-nano-banana-2.1)
  • GEMINI_OUTPUT_DIR env
    Default directory for generated images (default: ~/Downloads/gemini-mcp). When set, a per-call output_dir must be inside it.
  • GEMINI_INPUT_DIR env
    Directory to resolve bare input-image filenames against
  • GEMINI_UPLOAD_DIR env
    Restrict local-file uploads to the Gemini Files API to these directories (path.delimiter-separated; unset = unrestricted)
  • GEMINI_REFERENCE_DIR env
    Restrict local reference images (images / image paths sent to Gemini) to these directories (path.delimiter-separated), plus GEMINI_OUTPUT_DIR. Unset: GEMINI_UPLOAD_DIR applies; if that is unset too,…
  • GEMINI_TIMEOUT_MS env
    Upstream request timeout in ms (default: 60000, or 120000 for image_size: "4K"); each generation tool also takes a per-call timeout_ms
  • GEMINI_HEARTBEAT_MS env
    Progress-notification cadence in ms while a generation runs (default: 10000; 0 disables) — keeps MCP hosts that reset their timeout on progress from timing out long generations
  • GEMINI_CHAIN_RETRY_MS env
    How long to wait out interactions-store lag when a chained call 404s (default: 120000; 0 disables retrying)
  • GEMINI_DEBUG env
    When set, emit heartbeat diagnostics to stderr. Off by default.
  • GEMINI_RATE_CARD env
    Override/extend the shipped USD-per-1M-token rates used by gemini_token_usage's cost estimate, e.g. {"gemini-3-pro-image":{"input":2,"text_output":12,"image_output":120}}. Malformed JSON is ignored (…

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 chrischall 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“设计、图片与音频”中的其他服务器比较i

  • 星标数多于此分类中其他 2759 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 2759 个服务器的 98% 更新
  • 基础检查结果等于或优于此分类中其他 2759 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Gemini MCP 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:GEMINI_API_KEY

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(2.5.1)于今天进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Figma Context MCP, Claude Real Video, Figma MCP Server

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Figma Context MCP

作者:GLips

Give your coding agent access to your Figma data. Implement designs in any framework in one-shot.

在你的电脑上运行★ 16,165MIT5个月前更新
安装

Claude Real Video

作者:HUANGCHIHHUNGLeo

Let any LLM watch a video locally — and search everything it has ever watched.

在你的电脑上运行★ 2,284MIT2个月前更新
安装

Figma MCP Server

作者:figma

The Figma MCP server brings Figma design context directly into your AI workflow.

在云端运行★ 2,15213个月前更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

gemini-mcp

MCP server for Google Gemini media generation. Exposes thirteen tools to Claude over stdio: list available models, generate/edit/compose images, generate a consistent set of images from a master prompt, multi-turn image refinement (Interactions API), video generation (omni), music generation (Lyria), an async result poll for long generations, and Files API upload/list/delete for reusable image references. Output is written to disk by default (path returned) or returned inline as base64. Built on the Gemini v1beta API (generativelanguage.googleapis.com) using the Nano Banana / Nano Banana Pro (images), omni (video), and Lyria (music) model families.

Developed and maintained by AI (Claude Code).

Environment Variables

VariableRequiredDescription
GEMINI_API_KEYYesYour Google Gemini API key (aistudio.google.com/apikey)
GEMINI_IMAGE_MODELNoOverride the default image model (default: gemini-nano-banana-2.1)
GEMINI_OUTPUT_DIRNoDefault directory for generated images (default: ~/Downloads/gemini-mcp). When set, a per-call output_dir must be inside it.
GEMINI_INPUT_DIRNoDirectory to resolve bare input-image filenames against (so images: ["foo.jpg"] works)
GEMINI_UPLOAD_DIRNoRestrict local files streamed to the Gemini Files API (gemini_upload_file path, video_path) to these directories — one or more, separated by : (; on Windows); ~ allowed. A path outside is refused before any upload. Unset: no restriction
GEMINI_REFERENCE_DIRNoRestrict local reference images (the images / master_images paths read and sent to Gemini — inline, or as a Files API upload once reused) to these directories — :-separated (; on Windows), ~ allowed; GEMINI_OUTPUT_DIR is always allowed too, so generated images can be fed back in. A path outside (symlinks followed) is refused before it is read. Unset: GEMINI_UPLOAD_DIR applies instead. If both are unset, reference images are unrestricted on a local install (any file the server can read can be sent), and confined to $MCP_DATA_DIR/uploads when MCP_DATA_DIR is set (hosted)
GEMINI_TIMEOUT_MSNoUpstream request timeout in ms (default: 60000, or 120000 for image_size: "4K"); each generation tool also takes a per-call timeout_ms
GEMINI_HEARTBEAT_MSNoProgress-notification cadence in ms while a generation runs (default: 10000; 0 disables) — keeps MCP hosts that reset their timeout on progress from timing out long generations
GEMINI_CHAIN_RETRY_MSNoHow long to wait out interactions-store lag when a chained call 404s (default: 120000; 0 disables retrying)
Confirmations

Sending a local file to Google (the images / master_images / video_path inputs, or gemini_upload_file's path) and every delete ask for confirmation first. A client that can show a confirmation prompt (Claude Code) gets the real prompt, unless MCP_CONFIRM_ELICITATION=off. Elsewhere the first call does nothing and returns a preview (the resolved local paths with their MIME types and sizes, or the method/path being deleted) plus a confirmToken; only a repeat call with the same arguments and that token proceeds. The token is single-use, expires, and is bound to the exact arguments — a changed prompt or a swapped file between the two calls is refused. Pure text prompts, URLs, files/ references and base64 inputs are not gated.

variabledefault
MCP_CONFIRM_MODEask-userWhat a write does on a client that cannot show a confirmation prompt (claude.ai, Claude Desktop). ask-user: two steps — the first call does nothing and returns a preview plus a token, and the model must get your approval in chat before calling again with it. auto: the same two steps, but the model may use the token after reviewing the preview itself. refuse: writes are refused on such clients. A client that can show prompts (Claude Code) always gets the real prompt, unless MCP_CONFIRM_ELICITATION=off. An unrecognised value is treated as refuse.
MCP_CONFIRM_ELICITATIONonoff never shows a confirmation prompt, so every client gets the MCP_CONFIRM_MODE path. Set it for a client that claims to support prompts but never shows one (the gated call hangs — opencode 2.0.x). Any other value stays on, with a warning on stderr.
MCP_CONFIRM_TTL_SECONDS600How long a token stays valid.
MCP_CONFIRM_SECRETrandom per processSigning key; set it only if tokens must survive a server restart.
Long generations and client timeouts

4K / Pro-model generations can outrun an MCP host's own tools/call timeout (error -32001). The server sends notifications/progress heartbeats so hosts that reset their timeout on progress wait it out. If the host still gives up, the server-side generation usually completes anyway: the image is written to the output dir, gemini_interact also writes an .json sidecar recording the interaction_id, and continue_last: true resumes the interaction the lost response belonged to.

When a chained call 404s

A 404 on a request carrying previous_interaction_id is not proof the chain expired. The only 404 body observed live is generic — "Requested entity was not found." — and never names *which* entity. An unknown or renamed model id, and an expired Files API `files/…` uri (~48h TTL), return exactly the same thing. So the server no longer asserts a cause it can't establish: the upstream text is surfaced verbatim, and gemini_interact runs an experiment to find out which it was.

Most often the id isn't missing at all — it just isn't *visible* yet. The interactions store is eventually consistent, and a freshly created id can 404 while the same id resolves fine minutes later; heavy turns (4K, Pro, thinking_level: high) are the likeliest to hit it, which is exactly the turn you most want to chain from. So a chained 404 is retried with exponential backoff for up to 120s (GEMINI_CHAIN_RETRY_MS) before anything is declared broken. The 404 generates nothing and isn't billed, so the wait costs only time.

After that budget is spent, the tool looks up that id's sidecar, re-attaches the image it produced, and re-issues the request without the chain:

  • The re-issue succeeds → the chain really was the problem, and you get your image anyway, reported as chain_recovered: { expired_interaction_id, reanchored_on }. The 404'd attempt generates nothing, so this costs the one generation you'd have paid for re-anchoring manually.
  • The re-issue 404s too → the interaction id was never the cause. You get told exactly that, with the upstream text, and pointed at the model id and any files/… uri instead of being sent to chase an interaction that was fine all along.
  • No sidecar matches the dead id → the original error, rather than a guess. Re-anchoring on the wrong picture would silently corrupt the edit.

Separately, continue_last no longer dies with the server process: with no in-memory id it resumes from the newest .json sidecar in the output dir and reports continued_from_sidecar: true. That case was never an expired chain at all — the interaction was alive upstream the whole time; only our memory of its id was gone.

For hosts whose timeout can't be tamed (e.g. Claude Desktop, a fixed ~30s cap that ignores progress), two guards make re-issuing safe and unnecessary:

  • `async: true` returns a job_id immediately instead of the image, so the call can't time out at all; poll gemini_get_result with the job_id until it's done.
  • `idempotency_key` makes a repeat call idempotent — a retry with the same key returns the recorded result (reused: true) instead of billing a second generation. (Even without a key, two identical in-flight calls are deduplicated automatically.)

Tools

ToolDescription
gemini_list_modelsList available Gemini image models and the current default
gemini_image_generateGenerate image(s) from a text prompt
gemini_image_editOne-off edits or multi-image composition with a text instruction (for a series of edits, use gemini_interact)
gemini_image_setGenerate a master image plus N consistent images referencing it
gemini_interactPreferred tool for iterative refinement: multi-turn generation/editing via the Interactions API — chain the returned interaction_id via previous_interaction_id (or continue_last: true)
gemini_video_generateGenerate a short video (text→video, image→video, two-still interpolation, edit or extend) via the Gemini omni model; resolution 360p/720p/1080p/4k is the cost lever; written to disk as MP4
gemini_music_generateGenerate music from a text prompt via a Lyria model — lyria-3-clip-preview (30s, default), lyria-3.5 (full-length, vocals) or lyria-3-pro-preview; single-turn; written to disk as MP3
gemini_get_resultFetch an async generation started with async: true by its job_id (status running → done result). Lets a long generation outlive a host's tools/call timeout
gemini_token_usageToken usage and an estimated USD cost for this session so far. Call it before and after a workflow and subtract to attribute that workflow's spend. Priced per call against each call's own model from a dated rate card (GEMINI_RATE_CARD overrides it); there is no account-balance endpoint to read, so this is how spend is attributed
gemini_upload_fileUpload an image (or video/audio) to the Gemini Files API once — from a url, data_base64, or a local path — and get a reusable files/ reference
gemini_list_filesList the files currently uploaded under this API key, with MIME types and expiry times
gemini_delete_fileDelete an uploaded file before its ~48h expiry (confirmed first — see Confirmations)
gemini_sign_media*(hosted deployments only)* Mint a fresh signed URL for generated media from its r2_key — an expired link is not a dead end
gemini_view_media*(hosted deployments only)* Return a generated image as an inline image block from its r2_key, so a model can actually see what it made before refining it
gemini_get_upload_url*(hosted deployments only)* Mint a short-lived signed PUT URL so a shell can upload a reference image with no auth header; the PUT returns an r2_key usable in images_r2_keys, gemini_save_character, or gemini_upload_file
gemini_save_character / gemini_list_characters / gemini_delete_character*(hosted deployments only)* Persistent per-account character library: save a reference image + description under a name, then pass characters: ["name"] on generation tools. No expiry
gemini_save_style / gemini_list_styles / gemini_delete_style*(hosted deployments only)* Persistent per-account style presets: a reusable prompt fragment (optionally with a reference image), applied by passing style: "name" on generation tools. No expiry

Generation tools also share three throughput/latency controls: async: true (return a job_id immediately), max_wait_ms (wait up to a budget, then hand back the job_id — fast results stay in-band, slow batches never trip the host timeout), and idempotency_key (a retry returns the recorded result instead of re-billing). On a hosted deployment, a gemini_image_set result with more than one image also carries a `bundle_url` — one sig

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx