← 返回 Skills 市场
chrischall

Tmp.Qh1hHlhweP

作者 chrischall · GitHub ↗ · v0.2.0 · MIT-0
cross-platform ✓ 安全检测通过
16
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install gemini-mcp
功能描述
Generate and edit images with Google Gemini image models via MCP. Use when the user asks to generate, create, or edit images using Gemini or Nano Banana mode...
使用说明 (SKILL.md)

gemini-mcp

MCP server for Google Gemini image generation and editing — natural-language image creation via the Gemini API (Nano Banana / Nano Banana Pro models).

Setup

Option A — npx (recommended)

Add to .mcp.json in your project or ~/.claude/mcp.json:

{
  "mcpServers": {
    "gemini": {
      "command": "npx",
      "args": ["-y", "@chrischall/gemini-mcp"],
      "env": {
        "GEMINI_API_KEY": "your-api-key-here"
      }
    }
  }
}

Option B — from source

git clone https://github.com/chrischall/gemini-mcp
cd gemini-mcp
npm install && npm run build

Then add to .mcp.json:

{
  "mcpServers": {
    "gemini": {
      "command": "node",
      "args": ["/path/to/gemini-mcp/dist/index.js"],
      "env": {
        "GEMINI_API_KEY": "your-api-key-here"
      }
    }
  }
}

Or use a .env file in the project directory with GEMINI_API_KEY=\x3Cvalue>.

Getting your API key

  1. Go to aistudio.google.com/apikey
  2. Create an API key (requires a Google account)
  3. Copy the key and set it as GEMINI_API_KEY

Note: Image generation requires a billing-enabled Google Cloud project.

Environment Variables

Variable Required Description
GEMINI_API_KEY Yes Your Google Gemini API key
GEMINI_IMAGE_MODEL No Override the default image model (default: gemini-3-pro-image)
GEMINI_OUTPUT_DIR No Default directory for saved images (default: current working directory)

Tools

Models

Tool Description
gemini_list_models List available Gemini image models and the current default

Image Generation

Tool Description
gemini_generate_image(prompt, count?, model?, aspect_ratio?, image_size?, output_dir?, inline?) Generate image(s) from a text prompt
gemini_edit_image(prompt, images[], model?, aspect_ratio?, image_size?, output_dir?, inline?) Edit or compose one or more input images with a text instruction
gemini_generate_set(master_prompt, scenes? | count?, reference_mode?, model?, ...) Generate a master image plus N consistent images referencing it

Workflows

Generate a single image:

gemini_generate_image(prompt: "a red maple leaf on white background, studio photo")
→ returns path to saved PNG

Generate multiple variations:

gemini_generate_image(prompt: "a cartoon fox", count: 4, output_dir: "/tmp/foxes")
→ returns paths to 4 PNG files

Edit an existing image:

gemini_edit_image(prompt: "make the background blue", images: ["/path/to/image.png"])
→ returns path to edited PNG

Generate a consistent set (master + scenes):

gemini_generate_set(
  master_prompt: "a cartoon fox named Rusty, orange fur, blue scarf",
  scenes: ["Rusty waving hello", "Rusty eating an apple", "Rusty sleeping"]
)
→ returns paths to master + 3 scene images, all consistent

Generate variations of a concept:

gemini_generate_set(
  master_prompt: "minimalist logo for a coffee shop",
  count: 5
)
→ returns master + 5 variations

Notes

  • output_dir per-call overrides $GEMINI_OUTPUT_DIR which overrides the current working directory
  • inline: true returns image bytes directly in the response instead of writing to disk
  • count and scenes are mutually exclusive in gemini_generate_set
  • reference_mode: "chain" makes each scene reference the previous image (vs. all referencing master)
  • Aspect ratios: 1:1, 16:9, 9:16, 4:3, 3:4, 2:3, 3:2, and others
  • Image sizes: 1K, 2K, 4K
  • Server logs to stderr only — stdout is reserved for JSON-RPC
安全使用建议
Before installing, treat @chrischall/gemini-mcp as third-party code with access to your GEMINI_API_KEY. Use a limited API key where possible, remember that image generation may bill your Google Cloud project, and set output_dir or GEMINI_OUTPUT_DIR deliberately if generated or edited images may be private. Use inline mode or clean up saved files when you do not want image outputs left on disk.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is to generate, edit, and compose images through Gemini/Nano Banana models, and the documented tools and workflows match that purpose.
Instruction Scope
Instructions are limited to installing/registering the MCP server, setting GEMINI_API_KEY, and using image-generation tools; generated files are disclosed as local outputs, though sensitive-output cleanup guidance could be clearer.
Install Mechanism
The recommended setup uses npx -y to run @chrischall/gemini-mcp or a source build, which is normal for an MCP integration but means users execute a third-party npm package.
Credentials
GEMINI_API_KEY, optional model/output environment variables, and billing-enabled Google Cloud are proportionate to Gemini image API use.
Persistence & Privilege
Images are saved to disk by default using output_dir, GEMINI_OUTPUT_DIR, or the current working directory; inline mode is documented for non-file responses.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gemini-mcp
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gemini-mcp 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.2.0
gemini-mcp 0.2.0 - Added detailed usage instructions, setup steps, and API key guidance in SKILL.md. - Documented available models, tool commands, and parameters for image generation and editing. - Explained workflows for generating, editing, and composing single images, variations, or consistent sets. - Listed supported environment variables, options, and output behaviors. - Clarified new prompt triggers and scenarios for using the skill.
元数据
Slug gemini-mcp
版本 0.2.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Tmp.Qh1hHlhweP 是什么?

Generate and edit images with Google Gemini image models via MCP. Use when the user asks to generate, create, or edit images using Gemini or Nano Banana mode... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 16 次。

如何安装 Tmp.Qh1hHlhweP?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gemini-mcp」即可一键安装,无需额外配置。

Tmp.Qh1hHlhweP 是免费的吗?

是的,Tmp.Qh1hHlhweP 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Tmp.Qh1hHlhweP 支持哪些平台?

Tmp.Qh1hHlhweP 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Tmp.Qh1hHlhweP?

由 chrischall(@chrischall)开发并维护,当前版本 v0.2.0。

💬 留言讨论