Token导航 LogoToken导航

MCP Server · 运维云端

Gemini Pro

一个先进的模型上下文协议(MCP)服务器,提供与Google Gemini AI模型的无缝集成,支持复杂推理、JSON模式输出和实时网络信息整合等功能。

stdio官方级别未说明来源级核验工具 0
TypeScriptClaude云端部署Claude Desktop

快速开始

作者 / 组织
gurveeer
提供方
gurveeer
运行时
Docker

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

14

仓库热度

收录来源

1 个

MCP World

选型结论

Gemini Pro 属于运维云端类 MCP Server,公开资料标注 0 个工具,通过stdio 本地进程接入,适配 Claude Desktop、Claude,有可以直接复制的安装命令;接入前要先准备 API Key。

分类

运维云端

传输方式

stdio

认证方式

API Key

部署方式

公开资料未说明

安装与配置

安装命令

docker run -d \

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 Docker,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

🤖 MCP服务器Gemini

A. 最先进的模型上下文协议(MCP)服务器 它提供了与谷歌Gemini人工智能模型的无缝集成。该服务器使Claude Desktop和其他兼容MCP的客户端能够充分利用Gemini先进的人工智能功能。

✨ 特性

🧠 最新Gemini型号

  • 双子座2.5 Pro -最有能力的复杂推理思维模型
  • 双子座2.5闪光灯 -具有最佳性价比的快速思维模型
  • Gemini 2.0系列 -具有先进功能的最新一代型号
  • Gemini 1.5系列 -经过验证的可靠模型,适用于生产使用

🚀 高性能

  • 🧠 思维模型 -Gemini 2.5系列,逐步推理
  • 🔍 谷歌搜索暂停 -实时网络信息集成
  • 📊 JSON模式 -带模式验证的结构化输出
  • 🎯 系统说明 -行为定制和控制
  • 👁️ 视觉支持 -图像分析和多模式功能
  • 💬 对话记忆 -跨交互的上下文保护

🛠️ 生产就绪

  • TypeScript -全型安全与现代化发展
  • 全面的错误处理 -强大的错误管理和恢复
  • 速率限制 -防止API滥用的内置保护
  • 详细日志记录 -全面监控与调试
  • 输入验证 -使用Zod进行安全参数验证
  • 重试逻辑 -指数回退自动重试

🚀 快速开始

先决条件

安装

选项1:全局安装(推荐)
npm install -g mcp-server-gemini
方案2:地方发展
git clone https://github.com/gurr-i/mcp-server-gemini-pro.git
cd mcp-server-gemini-pro
npm install
npm run build

配置

1.设置API密钥

选项A:环境变量

export GEMINI_API_KEY="your_api_key_here"

选项B:.env文件

echo "GEMINI_API_KEY=your_api_key_here" > .env
2.配置克劳德桌面

添加到您的 claude_desktop_config.json:

对于全局安装:

{
  "mcpServers": {
    "gemini": {
      "command": "mcp-server-gemini",
      "env": {
        "GEMINI_API_KEY": "your_api_key_here"
      }
    }
  }
}

对于本地安装:

{
  "mcpServers": {
    "gemini": {
      "command": "node",
      "args": ["/path/to/mcp-server-gemini-pro/dist/enhanced-stdio-server.js"],
      "env": {
        "GEMINI_API_KEY": "your_api_key_here"
      }
    }
  }
}
3.重新启动克劳德桌面

完全关闭并重新启动Claude Desktop以使更改生效。

💡 使用示例

配置后,您可以使用自然语言通过Claude Desktop使用Gemini:

基本文本生成

"Use Gemini to explain quantum computing in simple terms"
"Generate a creative story about AI using Gemini 2.5 Pro"

高级功能

"Use Gemini with JSON mode to extract key points from this text"
"Use Gemini with grounding to get the latest news about AI"
"Generate a Python function using Gemini's thinking capabilities"

图像分析

"Analyze this image with Gemini" (attach image)
"What's in this screenshot using Gemini vision?"

开发任务

"Use Gemini to review this code and suggest improvements"
"Generate comprehensive tests for this function using Gemini"

⚙️ 配置

环境变量

服务器可以使用环境变量或 .env 文件:

所需配置
# Google AI Studio API Key (required)
GEMINI_API_KEY=your_api_key_here
可选配置
# Logging level (default: info)
# Options: error, warn, info, debug
LOG_LEVEL=info

# Enable performance metrics (default: false)
ENABLE_METRICS=false

# Rate limiting configuration
RATE_LIMIT_ENABLED=true        # Enable/disable rate limiting (default: true)
RATE_LIMIT_REQUESTS=100        # Max requests per window (default: 100)
RATE_LIMIT_WINDOW=60000        # Time window in ms (default: 60000 = 1 minute)

# Request timeout in milliseconds (default: 30000 = 30 seconds)
REQUEST_TIMEOUT=30000

# Environment mode (default: production)
NODE_ENV=production

环境设置

开发环境
# .env for development
GEMINI_API_KEY=your_api_key_here
NODE_ENV=development
LOG_LEVEL=debug
RATE_LIMIT_ENABLED=false
REQUEST_TIMEOUT=60000
生产环境
# .env for production
GEMINI_API_KEY=your_api_key_here
NODE_ENV=production
LOG_LEVEL=warn
RATE_LIMIT_ENABLED=true
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW=60000
REQUEST_TIMEOUT=30000
ENABLE_METRICS=true

Claude桌面配置

配置文件位置
操作系统路径
macOS~/Library/Application Support/Claude/claude_desktop_config.json
视窗%APPDATA%\Claude\claude_desktop_config.json
Linux~/.config/Claude/claude_desktop_config.json
基本配置
{
  "mcpServers": {
    "gemini": {
      "command": "mcp-server-gemini",
      "env": {
        "GEMINI_API_KEY": "your_api_key_here"
      }
    }
  }
}
高级配置
{
  "mcpServers": {
    "gemini": {
      "command": "mcp-server-gemini",
      "env": {
        "GEMINI_API_KEY": "your_api_key_here",
        "LOG_LEVEL": "info",
        "RATE_LIMIT_REQUESTS": "200",
        "REQUEST_TIMEOUT": "45000"
      }
    }
  }
}
本地开发配置
{
  "mcpServers": {
    "gemini": {
      "command": "node",
      "args": ["/path/to/mcp-server-gemini-pro/dist/enhanced-stdio-server.js"],
      "cwd": "/path/to/mcp-server-gemini-pro",
      "env": {
        "GEMINI_API_KEY": "your_api_key_here",
        "NODE_ENV": "development",
        "LOG_LEVEL": "debug"
      }
    }
  }
}

🛠️ 可用工具

工具描述主要功能
generate_text生成具有高级功能的文本思维模型、JSON模式、基础
分析图像使用视觉模型分析图像多模态理解,详细分析
count_tokes计算代币以进行成本估算所有型号的准确代币计数
list_models列出所有可用的Gemini型号实时型号可用性和功能
embed_text生成文本嵌入高质量矢量表示
获取帮助获取使用帮助和文档通过示例进行自我记录

📊 模型比较

模型上下文窗口功能最佳选择速度
双子座-2.5-pro2M令牌思考、JSON、接地复杂推理、编码较慢
双子座-2.5-flash ⭐1M代币思考、JSON、接地通用快速
双晶-2.5-长石1M令牌思考,JSON高吞吐量任务最快
双子座2.0闪光1M令牌JSON,接地标准任务快速
双子座-2.0-flash-lite1M令牌JSON简单任务最快
gemini-2.0-实验2M令牌JSON,接地实验功能中等
双子座-1.5-pro2M令牌JSON传统支持中等
双子座-1.5-flash1M令牌JSON传统支持快速

🔧 发展

先决条件

设置

# Clone the repository
git clone https://github.com/gurr-i/mcp-server-gemini-pro.git
cd mcp-server-gemini-pro

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY

可用脚本

发展
npm run dev          # Start development server with hot reload
npm run dev:watch    # Start with file watching (nodemon)
npm run build        # Build for production
npm run build:watch  # Build with watch mode
npm run clean        # Clean build directory
测试
npm test             # Run all tests
npm run test:watch   # Run tests in watch mode
npm run test:coverage # Run tests with coverage report
npm run test:integration # Run integration tests (requires API key)
代码质量
npm run lint         # Lint TypeScript code
npm run lint:fix     # Fix linting issues automatically
npm run format       # Format code with Prettier
npm run format:check # Check code formatting
npm run type-check   # Run TypeScript type checking
npm run validate     # Run all quality checks (lint + test + type-check)
发布与分发
npm run prepack      # Prepare package for publishing
npm run release      # Build, validate, and publish to npm

项目结构

mcp-server-gemini/
├── src/                          # Source code
│   ├── config/                   # Configuration management
│   │   └── index.ts             # Environment config with Zod validation
│   ├── utils/                   # Utility modules
│   │   ├── logger.ts           # Structured logging system
│   │   ├── errors.ts           # Custom error classes & handling
│   │   ├── validation.ts       # Input validation with Zod
│   │   └── rateLimiter.ts      # Rate limiting implementation
│   ├── enhanced-stdio-server.ts # Main MCP server implementation
│   └── types.ts                # TypeScript type definitions
├── tests/                       # Test suite
│   ├── unit/                   # Unit tests
│   │   ├── config.test.ts      # Configuration tests
│   │   ├── validation.test.ts  # Validation tests
│   │   └── errors.test.ts      # Error handling tests
│   ├── integration/            # Integration tests
│   │   └── gemini-api.test.ts  # Real API integration tests
│   └── setup.ts               # Test setup and utilities
├── docs/                       # Documentation
│   ├── api.md                 # API reference
│   ├── configuration.md       # Configuration guide
│   └── troubleshooting.md     # Troubleshooting guide
├── scripts/                    # Build and utility scripts
│   ├── build.sh              # Production build script
│   ├── dev.sh                # Development script
│   └── test.sh               # Test execution script
├── .github/workflows/         # GitHub Actions CI/CD
│   ├── ci.yml                # Continuous integration
│   └── release.yml           # Automated releases
├── dist/                      # Built output (generated)
├── coverage/                  # Test coverage reports (generated)
└── node_modules/             # Dependencies (generated)

🧪 测试

测试套件概述

该项目包括全面的测试,包括单元测试、集成测试和代码覆盖率报告。

运行测试

所有测试
npm test                    # Run all tests (unit tests only by default)
npm run test:watch         # Run tests in watch mode for development
npm run test:coverage      # Run tests with coverage report
单元测试
npm test -- --testPathPattern=unit    # Run only unit tests
npm test -- --testNamePattern="config" # Run specific test suites
集成测试

集成测试需要有效的 GEMINI_API_KEY 并进行真正的API调用:

# Set API key and run integration tests
GEMINI_API_KEY=your_api_key_here npm run test:integration

# Or set in .env file and run
npm run test:integration
测试覆盖率
npm run test:coverage      # Generate coverage report
open coverage/lcov-report/index.html  # View coverage report (macOS)

测试结构

单元测试(tests/unit/)
  • 配置测试:环境变量验证、配置加载
  • 验证测试:输入验证、模式验证、净化
  • 错误处理测试:自定义错误类、错误恢复、重试逻辑
  • 公用设施测试:记录器、速率限制器、辅助功能
集成测试(tests/integration/)
  • Gemini API测试:用于测试连接和功能的真实API调用
  • 模型测试:验证所有支持的模型是否正常工作
  • 特性测试:JSON模式、基础、嵌入、令牌计数

写作测试

测试文件结构
// tests/unit/example.test.ts
import { describe, it, expect, beforeEach, afterEach } from '@jest/globals';
import { YourModule } from '../../src/your-module.js';

describe('YourModule', () => {
  beforeEach(() => {
    // Setup before each test
  });

  afterEach(() => {
    // Cleanup after each test
  });

  it('should do something', () => {
    // Test implementation
    expect(result).toBe(expected);
  });
});
定制配对器

测试套件包括自定义Jest匹配器:

expect(response).toBeValidMCPResponse(); // Validates MCP response format

测试配置

测试配置在 jest.config.js 与:

  • TypeScript支持:完整的ES模块和TypeScript编译
  • 覆盖阈值:要求最低70%的覆盖率
  • 测试超时:30秒用于集成测试
  • 安装文件:自动测试环境设置

🐳 Docker部署

使用Docker

构建并运行
# Build the Docker image
docker build -t mcp-server-gemini .

# Run the container
docker run -d \
  --name mcp-server-gemini \
  -e GEMINI_API_KEY=your_api_key_here \
  -e LOG_LEVEL=info \
  mcp-server-gemini
使用Docker Compose
# Create .env file with your API key
echo "GEMINI_API_KEY=your_api_key_here" > .env

# Start the service
docker-compose up -d

# View logs
docker-compose logs -f

# Stop the service
docker-compose down
Docker开发
# Start development environment
docker-compose --profile dev up

# This mounts source code for live reloading

特定于环境的部署

生产部署
# Production build
docker build --target production -t mcp-server-gemini:prod .

# Run with production settings
docker run -d \
  --name mcp-server-gemini-prod \
  --restart unless-stopped \
  -e GEMINI_API_KEY=your_api_key_here \
  -e NODE_ENV=production \
  -e LOG_LEVEL=warn \
  -e RATE_LIMIT_ENABLED=true \
  -e ENABLE_METRICS=true \
  mcp-server-gemini:prod
健康检查
# Check container health
docker ps
docker logs mcp-server-gemini

# Manual health check
docker exec mcp-server-gemini node -e "console.log('Health check passed')"

🚀 部署选项

1.npm全局安装

# Install globally
npm install -g mcp-server-gemini

# Run directly
GEMINI_API_KEY=your_key mcp-server-gemini

2.本地安装

# Clone and build
git clone https://github.com/gurr-i/mcp-server-gemini-pro.git
cd mcp-server-gemini-pro
npm install
npm run build

# Run locally
GEMINI_API_KEY=your_key npm start

3.Docker部署

# Using Docker Hub (when published)
docker run -e GEMINI_API_KEY=your_key mcp-server-gemini-pro:latest

# Using local build
docker build -t mcp-server-gemini-pro .
docker run -e GEMINI_API_KEY=your_key mcp-server-gemini-pro

4.流程经理(PM2)

# Install PM2
npm install -g pm2

# Create ecosystem file
cat > ecosystem.config.js Made with ❤️ By Gurveer for the AI development community

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

AI模型服务TypeScript本地部署复杂推理JSON模式多模态分析生产级部署

支持客户端

Claude DesktopClaude

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

看服务状态

查询容器、日志和监控指标,定位异常。

执行部署变更

在权限范围内触发发布、回滚和环境切换。

核对资源用量

汇总用量,找出闲置和超额的部分。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已经适配 Claude Desktop、Claude,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好 Docker,换机器要重新装一遍。
  • 需要自备API Key,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在运维云端场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到API Key的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Gemini Pro

MCP World · 本页

0stdio有1 个2026-05-17
Ui Tars Desktop 8a825770

MCP World

0stdio有1 个2026-05-17
Elie222 MCP

MCP World

0未说明未标注1 个2026-05-17
Arizeai Phoenix MCP

MCP World

0stdio有3 个2026-05-17
Unity MCP 87ee506e

MCP World

42HTTP有2 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Gemini Pro 怎么安装?

公开资料给出的安装命令是 docker run -d \,运行环境为 Docker。装完后按客户端要求写进 MCP 配置,重启客户端生效。

Gemini Pro 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Docker;保存后完全退出客户端再打开,配置才会生效。

Gemini Pro 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Gemini Pro 需要 API Key 吗?

公开资料标注的认证方式是API Key,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

Gemini Pro 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP