Skip to main content

Gemini MCP

基于 Gemini 2.5 Flash 的图片处理 MCP 服务器,支持与 Claude Desktop、Cursor 等 MCP 客户端集成。

快速开始

使用 uvx 运行(推荐)

# 无需安装,直接运行
GEMINI_API_KEY=your-api-key uvx gemini-mcp

通过 pip 安装

pip install gemini-mcp
GEMINI_API_KEY=your-api-key gemini-mcp

配置客户端

Claude Desktop

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "gemini": {
      "command": "uvx",
      "args": ["gemini-mcp"],
      "env": {
        "GEMINI_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor

编辑 ~/.cursor/mcp.json:

{
  "mcpServers": {
    "gemini": {
      "command": "uvx",
      "args": ["gemini-mcp"],
      "env": {
        "GEMINI_API_KEY": "your-api-key"
      }
    }
  }
}

功能

  • 🖼️ 支持本地文件、URL 和 Base64 图片
  • 🚀 使用 uvx 无需安装即可运行
  • 🔄 流式响应处理
  • 📦 自动保存生成的图片
  • 🌐 支持 SOCKS5 代理

使用示例

在 Claude Desktop 中:

分析这张图片:/path/to/image.jpg
描述 https://example.com/image.png 的内容

环境变量

  • GEMINI_API_KEY: Gemini API 密钥(必需)
  • OUTPUT_DIR: 输出目录(默认:./outputs)
  • ALL_PROXY: SOCKS5 代理(如:socks5://127.0.0.1:1080)

命令行参数

gemini-mcp --help              # 查看帮助
gemini-mcp --mode http         # HTTP 模式
gemini-mcp --debug             # 调试模式

许可证

MIT

Metadata

Release files for gemini-mcp 0.2.7

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

Source distribution (sdist)

Source distribution for gemini-mcp 0.2.7
File Size Uploaded
gemini_mcp-0.2.7.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gemini-mcp 0.2.7
File Interpreter ABI Platform
gemini_mcp-0.2.7-py3-none-any.whl Python 3 none any Details

Total release size: 29.7 kB

Release files / gemini_mcp-0.2.7.tar.gz

Download URL gemini_mcp-0.2.7.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
81dcaec954e3efaf953fca359c39f60503ab74129a85539ebc641863fb84f2d8
BLAKE2b-256 checksum
How to use checksums
eac3fe50e2e1b5e0fecf5a8aa127e3c5e69ca16f6ff8a498acad51e44e6b9875
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2025.

Transparency log

Release files / gemini_mcp-0.2.7-py3-none-any.whl

Download URL gemini_mcp-0.2.7-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77a5cc80f1d1529b36d09552e44dc4624c351ba2794e021470316b3d5504e5f9
BLAKE2b-256 checksum
How to use checksums
1fdd19fbb9b37a4b3ec0927300698ae8d52a884ad273ed8bc31cf2218f8fd4c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.7 This release

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.0

2 release files

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