Skip to main content

Nano-Banana MCP Server

基于 gemini-2.5-flash-image-preview 优化的画图 API MCP Server,支持图像生成和图像编辑功能。

功能特性

  • 图像生成 (generate_image): 根据提示词生成图像
  • 图像编辑 (edit_image): 基于参考图进行图像编辑
  • 模型列表 (list_models): 列出所有可用模型及其特性

可用模型

模型名称 描述
nano-banana 标准版,适合一般图像生成和编辑
nano-banana-hd 高清版,4K 画质输出
nano-banana-2 增强版,支持自定义图片尺寸 (1K/2K/4K)

环境变量

变量名 必需 默认值 描述
NANO_BANANA_API_KEY ✅ - API 密钥
NANO_BANANA_API_BASE_URL ❌ https://api.lightai.io API 基础 URL

安装

pip install shuttlet_nano_banana_mcp

或使用 uvx 直接运行(无需安装):

uvx shuttlet_nano_banana_mcp

Cursor MCP 配置

在 Cursor 的 ~/.cursor/mcp.json 中添加以下配置:

{
  "mcpServers": {
    "nano-banana": {
      "command": "uvx",
      "args": [
        "shuttlet_nano_banana_mcp"
      ],
      "env": {
        "NANO_BANANA_API_KEY": "your-api-key-here",
        "NANO_BANANA_API_BASE_URL": "https://api.lightai.io"
      }
    }
  }
}

⚠️ 请将 your-api-key-here 替换为你的实际 API 密钥。

使用示例

配置完成后,在 Cursor 中可以使用以下工具:

生成图像

生成一张可爱的猫咪图片,卡通风格

编辑图像

将这张图片的背景改成海滩

查看可用模型

列出所有可用的 nano-banana 模型

许可证

MIT

Metadata

Release files for shuttlet_nano_banana_mcp 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shuttlet_nano_banana_mcp 0.1.4
File Size Uploaded Provenance
shuttlet_nano_banana_mcp-0.1.4.tar.gz 3.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for shuttlet_nano_banana_mcp 0.1.4
File Interpreter ABI Platform
shuttlet_nano_banana_mcp-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 8.9 kB

Release files / shuttlet_nano_banana_mcp-0.1.4.tar.gz

Download URL shuttlet_nano_banana_mcp-0.1.4.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8584d389e347f8b729ca70eabb441b365bfdf06549226cfe3a8e2b9daafd1692
BLAKE2b-256 checksum
How to use checksums
87ca513616029952b6ecb40d3d275c237da6215c98ba7690aa0c68dfc1ad0f80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / shuttlet_nano_banana_mcp-0.1.4-py3-none-any.whl

Download URL shuttlet_nano_banana_mcp-0.1.4-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2199c62f16899eb85b8ddd85b431b38be0677857105429762e4def0b836b1d9e
BLAKE2b-256 checksum
How to use checksums
ecdda3954b1795302b02b9464888a4f1ae35ff59c61459cb9add7b82c13abbf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for shuttlet_nano_banana_mcp 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page