Gemini Mcp

io.github.RLabs-Inc由 GitHub 帳號 RLabs-Inc 發布v0.7.1更新於 Oct 24, 2026

Gemini 3 MCP server with 30+ tools: images, video, research, TTS, code exec & CLI

概覽

AI 產生的概覽

一個本機 MCP 伺服器,將 Claude 連接到 Google Gemini 3 模型,用於查詢、圖像與影片生成、研究、語音、程式碼執行以及文件和網頁分析。

可以做什麼
直接查詢 Gemini Pro 或 Flash 模型,進行協作腦力激盪,並可控制思考深度、計算 token 和快取大型文件上下文。生成並多輪編輯最高 4K 的圖像,用 Veo 生成影片並輪詢狀態,以及用多種音色合成語音。執行附引用的網頁搜尋、多步深度研究、URL 分析與比較,以及 YouTube 影片分析或摘要。分析程式碼和文字,進行摘要、實體與事實擷取、表格擷取,並回傳符合 schema 的 JSON。分析 PDF 和文件,並讓 Gemini 撰寫和執行 Python 程式碼,將生成的圖表以圖像回傳。
適用情境
適合希望 Claude 把圖像或影片生成、附引用的網頁搜尋與研究、語音合成、文件和 YouTube 分析、Python 資料處理交給 Gemini 的情境。也適合將 Claude 的推理能力與 Gemini 的創意和視覺輸出結合的工作流程。
執行需求
透過 npm 套件以 npx 或 bunx 在本機執行,或全域安裝為 CLI。需要 Google Gemini API 金鑰,透過 GEMINI_API_KEY 提供;可選的 GEMINI_OUTPUT_DIR 指定生成檔案的儲存位置。需要存取 Google API 的網路,可透過 HTTP_PROXY 或 HTTPS_PROXY 設定代理。
安裝前請注意
Gemini API 金鑰是敏感資訊,透過 GEMINI_API_KEY 傳入,不應寫入設定檔。API 呼叫可能產生費用,免費額度有速率限制。生成的圖像、影片、音訊和圖表會寫入輸出目錄。Gemini 執行的 Python 程式碼會在你的機器上執行,提示詞、文件、URL 和 YouTube 連結會傳送給 Google。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Gemini Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

MCP Server Gemini

A Model Context Protocol (MCP) server for integrating Google's Gemini 3 models with Claude Code, enabling powerful collaboration between both AI systems. Now with a beautiful CLI!

[npm version] [MCP Registry]

MCP Registry Support: Now discoverable in the official MCP ecosystem!

Features

FeatureDescription
Deep Research AgentAutonomous multi-step research with web search and citations
Token CountingCount tokens and estimate costs before API calls
Text-to-Speech30 unique voices, single speaker or two-speaker dialogues
URL AnalysisAnalyze, compare, and extract data from web pages
Context CachingCache large documents for efficient repeated queries
YouTube AnalysisAnalyze videos by URL with timestamp clipping
Document AnalysisPDFs, DOCX, spreadsheets with table extraction
4K Image GenerationGenerate images up to 4K with 10 aspect ratios
Multi-Turn Image EditingIteratively refine images through conversation
Video GenerationCreate videos with Veo 2.0 (async with polling)
Code ExecutionGemini writes and runs Python code (pandas, numpy, matplotlib)
Google SearchReal-time web information with inline citations
Structured OutputJSON responses with schema validation
Data ExtractionExtract entities, facts, sentiment from text
Thinking LevelsControl reasoning depth (minimal/low/medium/high)
Direct QuerySend prompts to Gemini 3 Pro/Flash models
BrainstormingClaude + Gemini collaborative problem-solving
Code AnalysisAnalyze code for quality, security, performance
SummarizationSummarize content at different detail levels

Quick Installation

MCP Server for Claude Code

bash
# Using npm (Recommended)claude mcp add gemini -s user -- env GEMINI_API_KEY=YOUR_KEY npx -y @rlabs-inc/gemini-mcp
# Using bunclaude mcp add gemini -s user -- env GEMINI_API_KEY=YOUR_KEY bunx @rlabs-inc/gemini-mcp

CLI (Global Install)

bash
# Install globallynpm install -g @rlabs-inc/gemini-mcp
# Set your API key once (stored securely)gcli config set api-key YOUR_KEY
# Now use any command!gcli search "latest news"glci image "sunset over mountains" --ratio 16:9

Get your API key: Visit Google AI Studio - it's free and takes seconds!

Installation Options

bash
# With verbose loggingclaude mcp add gemini -s user -- env GEMINI_API_KEY=YOUR_KEY VERBOSE=true bunx -y @rlabs-inc/gemini-mcp
# With custom output directory for generated images/videosclaude mcp add gemini -s user -- env GEMINI_API_KEY=YOUR_KEY GEMINI_OUTPUT_DIR=/path/to/output bunx -y @rlabs-inc/gemini-mcp

Available Tools

gemini-query

Direct queries to Gemini with thinking level control:

prompt: "Explain quantum entanglement"model: "pro" or "flash"thinkingLevel: "low" | "medium" | "high" (optional)
  • low: Fast responses, minimal reasoning
  • medium: Balanced (Flash only)
  • high: Deep reasoning for complex tasks (default)

gemini-generate-image

Generate images with Nano Banana Pro (Claude can SEE them!):

prompt: "a futuristic city at sunset"style: "cyberpunk" (optional)aspectRatio: "16:9" (1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9)imageSize: "2K" (1K, 2K, 4K)useGoogleSearch: false (ground in real-world info)thinkingLevel: "high" (optional - minimal, low, medium, high)personGeneration: "ALLOW_ALL" (optional - ALLOW_ALL, ALLOW_ADULT, ALLOW_NONE)seed: 42 (optional - for reproducible results)

gemini-start-image-edit

Start a multi-turn image editing session:

prompt: "a cozy cabin in the mountains"aspectRatio: "16:9"imageSize: "2K"useGoogleSearch: falsethinkingLevel: "high" (optional - minimal, low, medium, high)personGeneration: "ALLOW_ALL" (optional - ALLOW_ALL, ALLOW_ADULT, ALLOW_NONE)seed: 42 (optional - for reproducible results)

Returns a session ID for iterative editing.

gemini-continue-image-edit

Continue refining an image:

sessionId: "edit-123456789"prompt: "add snow on the roof and make it nighttime"

gemini-end-image-edit

Close an editing session:

sessionId: "edit-123456789"

gemini-list-image-sessions

List all active editing sessions.

gemini-generate-video

Generate videos using Veo:

prompt: "a cat playing piano"aspectRatio: "16:9" (optional)negativePrompt: "blurry, text" (optional)

Video generation is async (takes 1-5 minutes). Use gemini-check-video to poll.

gemini-check-video

Check video generation status and download when complete:

operationId: "operations/xxx-xxx-xxx"

gemini-analyze-code

Analyze code for issues:

code: "function foo() { ... }"language: "typescript" (optional)focus: "quality" | "security" | "performance" | "bugs" | "general"

gemini-analyze-text

Analyze text content:

text: "Your text here..."type: "sentiment" | "summary" | "entities" | "key-points" | "general"

gemini-brainstorm

Collaborative brainstorming:

prompt: "How could we implement real-time collaboration?"claudeThoughts: "I think we should use WebSockets..."maxRounds: 3 (optional)

gemini-summarize

Summarize content:

content: "Long text to summarize..."length: "brief" | "moderate" | "detailed"format: "paragraph" | "bullet-points" | "outline"

gemini-run-code

Let Gemini write and execute Python code:

prompt: "Calculate the first 50 prime numbers and plot them"data: "optional CSV data to analyze" (optional)

Supports libraries: numpy, pandas, matplotlib, scipy, scikit-learn, tensorflow, and more. Generated charts are saved to the output directory and returned as images.

gemini-search

Real-time web search with citations:

query: "What happened in tech news this week?"returnCitations: true (default)

Returns grounded responses with inline citations and source URLs.

gemini-structured

Get JSON responses matching a schema:

prompt: "Extract the meeting details from this email..."schema: '{"type":"object","properties":{"date":{"type":"string"},"attendees":{"type":"array"}}}'useGoogleSearch: false (optional)

gemini-extract

Convenience tool for common extraction patterns:

text: "Your text to analyze..."extractType: "entities" | "facts" | "summary" | "keywords" | "sentiment" | "custom"customFields: "name, date, amount" (for custom extraction)

gemini-youtube

Analyze YouTube videos directly:

url: "https://www.youtube.com/watch?v=..."question: "What happens at 2:30?"startTime: "1m30s" (optional, for clipping)endTime: "5m00s" (optional, for clipping)

gemini-youtube-summary

Quick video summarization:

url: "https://www.youtube.com/watch?v=..."style: "brief" | "detailed" | "bullet-points" | "chapters"

gemini-analyze-document

Analyze PDFs and documents:

filePath: "/path/to/document.pdf"question: "Summarize the key findings"mediaResolution: "low" | "medium" | "high"

gemini-summarize-pdf

Quick PDF summarization:

filePath: "/path/to/document.pdf"style: "brief" | "detailed" | "outline" | "key-points"

gemini-extract-tables

Extract tables from documents:

filePath: "/path/to/document.pdf"outputFormat: "markdown" | "csv" | "json"

Workflow: Claude + Gemini

The killer combination for development:

ClaudeGemini
Complex logicFrontend/UI
ArchitectureVisual components
Backend codeImage generation
IntegrationReact/CSS styling
ReasoningCreative generation

Example workflow:

  1. Ask Claude to design the backend API
  2. Use gemini-generate-image for UI mockups
  3. Ask Gemini to generate React components via gemini-query
  4. Use multi-turn editing to refine visuals
  5. Let Claude wire everything together

Environment Variables

VariableRequiredDefaultDescription
GEMINI_API_KEYYes-Your Google Gemini API key
GEMINI_OUTPUT_DIRNo./gemini-outputWhere to save generated files
GEMINI_MODELNo-Override model for init test
GEMINI_PRO_MODELNogemini-3-pro-previewPro model (Gemini 3)
GEMINI_FLASH_MODELNogemini-3-flash-previewFlash model (Gemini 3)
GEMINI_IMAGE_MODELNogemini-3-pro-image-previewImage model (Nano Banana Pro)
GEMINI_IMAGE_THINKING_LEVELNohighDefault thinking level for image generation (minimal, low, medium, high)
GEMINI_VIDEO_MODELNoveo-2.0-generate-001Video model
VERBOSENofalseEnable verbose logging
QUIETNofalseMinimize logging
GEMINI_ENABLED_TOOLSNo-Comma-separated list of tool groups to load (e.g., query,search,image-gen)
GEMINI_TOOL_PRESETNo-Preset profile: minimal, text, image, research, media, full

Tool Configuration

By default, all 37 tools are loaded. To reduce context usage, configure which tools to load:

Available Presets

PresetTool Groups
minimalquery, brainstorm
textquery, brainstorm, analyze, summarize, structured
imagequery, image-gen, image-edit, image-analyze
researchquery, search, deep-research, url-context, document
mediaquery, image-gen, image-edit, image-analyze, video-gen, youtube, speech
fullAll 18 tool groups (default)

Using Presets

bash
# Minimal - query and brainstormGEMINI_TOOL_PRESET=minimal
# Text processingGEMINI_TOOL_PRESET=text  # query, brainstorm, analyze, summarize, structured
# Image workflowsGEMINI_TOOL_PRESET=image  # query, image-gen, image-edit, image-analyze
# Research workflowsGEMINI_TOOL_PRESET=research  # query, search, deep-research, url-context, document

Using Explicit Tool Lists

bash
# Only specific toolsGEMINI_ENABLED_TOOLS=query,search,image-gen

Combining Preset + Explicit

bash
# Start with preset, add extrasGEMINI_TOOL_PRESET=minimalGEMINI_ENABLED_TOOLS=search,image-gen  # Adds to minimal preset

Available Tool Groups

GroupTools
querygemini-query
brainstormgemini-brainstorm
analyzegemini-analyze-code, gemini-analyze-text
summarizegemini-summarize
image-gengemini-generate-image, gemini-image-prompt
image-editgemini-start-image-edit, gemini-continue-image-edit, gemini-end-image-edit, gemini-list-image-sessions
video-gengemini-generate-video, gemini-check-video
code-execgemini-run-code
searchgemini-search
structuredgemini-structured, gemini-extract
youtubegemini-youtube, gemini-youtube-summary
documentgemini-analyze-document, gemini-summarize-pdf, gemini-extract-tables
url-contextgemini-analyze-url, gemini-compare-urls, gemini-extract-from-url
cachegemini-create-cache, gemini-query-cache, gemini-list-caches, gemini-delete-cache
speechgemini-speak, gemini-dialogue, gemini-list-voices
token-countgemini-count-tokens
deep-researchgemini-deep-research, gemini-check-research, gemini-research-followup
image-analyzegemini-analyze-image

Manual Installation

Global Install

bash
# Using npmnpm install -g @rlabs-inc/gemini-mcp
# Using bunbun install -g @rlabs-inc/gemini-mcp

Claude Code Configuration

json
{  "gemini": {    "command": "npx",    "args": ["-y", "@rlabs-inc/gemini-mcp"],    "env": {      "GEMINI_API_KEY": "your-api-key",      "GEMINI_OUTPUT_DIR": "/path/to/save/files"    }  }}

If you must use a proxy to establish a connection to gemini, replace xxxx with your actual proxy port:

json
{  "gemini": {    "command": "npx",    "args": ["-y", "@rlabs-inc/gemini-mcp"],    "env": {      "GEMINI_API_KEY": "your-api-key",      "GEMINI_OUTPUT_DIR": "/path/to/save/files",      "HTTP_PROXY": "http://127.0.0.1:xxxx",      "HTTPS_PROXY": "http://127.0.0.1:xxxx"    }  }}

Troubleshooting

Rate Limits (429 Errors)

If you're hitting rate limits on the free tier:

  • Set GEMINI_MODEL=gemini-3-flash-preview to use Flash for init (higher limits)
  • Or upgrade to a paid plan

Connection Issues

  1. Verify your API key at Google AI Studio
  2. Check server status: claude mcp list
  3. Try with verbose logging: VERBOSE=true

Image/Video Issues

  • Ensure your API key has access to image/video generation
  • Check output directory permissions
  • Files save to GEMINI_OUTPUT_DIR (default: ./gemini-output)
  • For 4K images, generation takes longer

Previous Versions

0.7.2

Beautiful CLI with Themes! Use Gemini directly from your terminal:

bash
# Install globallynpm install -g @rlabs-inc/gemini-mcp
# Set your API key oncegcli config set api-key YOUR_KEY
# Generate images, videos, search, research, and more!gcli image "a cat astronaut" --size 4Kgcli search "latest AI news"gcli research "quantum computing applications" --waitgcli speak "Hello world" --voice Puck

5 Beautiful Themes: terminal, neon, ocean, forest, minimal

CLI Commands:

  • gcli query - Direct Gemini queries with thinking levels
  • gcli search - Real-time web search with citations
  • gcli research - Deep research agent
  • gcli image - Generate images (up to 4K)
  • gcli video - Generate videos with Veo
  • gcli speak - Text-to-speech with 30 voices
  • gcli tokens - Count tokens and estimate costs
  • gcli config - Manage settings

v0.6.x: Deep Research, Token Counting, TTS, URL analysis, Context Caching v0.5.x: 30+ tools, YouTube analysis, Document analysis v0.4.x: Code execution, Google Search v0.3.x: Thinking levels, Structured output, 4K images v0.2.x: Image/Video generation with Veo


Development

bash
git clone https://github.com/rlabs-inc/gemini-mcp.gitcd gemini-mcpbun installbun run buildbun run dev -- --verbose

Scripts

CommandDescription
bun run buildBuild for production
bun run devDevelopment mode with watch
bun run typecheckType check without emitting
bun run formatFormat with Prettier
bun run lintLint with ESLint

License

MIT License


Made with Claude + Gemini working together

來源:README.md,提交 9cea2e2

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.7.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分