GemSuite-MCP

by PV-Bhat
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Integrates with Google Search to provide grounded responses to factual questions and current information.

  • Provides intelligent model selection between Gemini 2.0 Flash, Flash-Lite, and Flash Thinking models for different tasks, with file handling and multimodal capabilities.

  • Enables code generation and analysis directly within the Replit development environment using Gemini's capabilities.

GemSuite MCP:最全面的 Gemini API 集成模型上下文协议

用于高级 Gemini API 与模型上下文协议 (MCP) 交互的终极开源服务器,智能地选择模型以实现最佳性能、最低令牌成本和无缝集成。

专业的 Gemini API 集成,适用于 Claude 和所有兼容 MCP 的主机,具有智能模型选择和高级文件处理功能

geminiserchMCP项目发展而来,功能增强

安装功能使用示例模型贡献

🌟 什么是 GemSuite MCP?

GemSuite(模型上下文协议)MCP 是面向 MCP 主机的终极 Gemini API 集成接口,能够智能地根据当前任务选择模型,从而提供最佳性能、最低代币成本和无缝集成。它使任何兼容 MCP 的主机(例如 Claude、Cursor、Replit 等)都能无缝利用 Gemini 的功能,重点关注以下方面:

  1. 智能:根据任务和内容自动选择最佳的 Gemini 模型
  2. 效率:优化不同工作负载下的令牌使用和性能
  3. 简单性:为复杂的AI操作提供干净、一致的API
  4. 多功能性:高级文件处理;处理多种文件类型、操作和用例

无论您是分析文档、解决复杂问题、处理大型文本文件还是搜索信息,GemSuite MCP 都能提供合适的工具和合适的模型来完成工作。

为什么选择 GemSuite MCP?

与其他提供有限功能的 Gemini MCP 服务器不同,GemSuite MCP 提供:

智能模型选择:根据任务自动选择最佳的 Gemini 模型✅统一文件处理:通过自动格式检测无缝处理各种文件类型✅综合工具套件:四种专用工具,涵盖搜索、推理、处理和分析✅生产就绪:已在 Smithery.ai、MCP.so 和 Glama.io 上部署和验证

🚀 安装

选项 1:Smithery.ai(推荐)

# Install directly via Smithery CLI npx -y @smithery/cli@latest install @PV-Bhat/gemsuite-mcp --client claude

选项 2:手动安装

# Clone the repository git clone https://github.com/PV-Bhat/gemsuite-mcp.git cd gemsuite-mcp # Install dependencies npm install # Set your Gemini API key echo "GEMINI_API_KEY=your_api_key_here" > .env # Build the project npm run build # Start the server npm start

🔑 API 密钥设置

  1. Google AI Studio获取 Gemini API 密钥
  2. 将其设置为环境变量:
    export GEMINI_API_KEY=your_api_key_here
    或者在项目根目录中创建一个.env文件:
    GEMINI_API_KEY=your_api_key_here

💎 主要特点

统一文件处理

  • 无缝文件处理:所有工具都支持通过file_path参数输入文件
  • 自动格式检测:使用适当的 MIME 类型正确处理各种文件类型
  • 多模式支持:处理图像、文档、代码文件等
  • 批处理:支持在一次操作中处理多个文件

智能模型选择

GemSuite MCP 根据以下情况自动选择最合适的 Gemini 模型:

  • 任务类型:搜索、推理、处理或分析
  • 内容类型:文本、代码、图像或文档
  • 复杂性:简单查询与复杂推理
  • 用户偏好:可选手动覆盖

这种智能可确保最佳性能,同时最大限度地减少令牌的使用。

专用工具

工具目的模型用例
gem_search集成搜索的信息检索双子座闪光事实问题、最新信息、有根据的回答
gem_reason复杂的推理和逐步的分析双子座 闪光思维数学、科学、编码问题、逻辑分析
gem_process快速、高效的内容处理双子座Flash-Lite汇总、提取、大容量操作
gem_analyze具有自动模型选择的智能文件分析自动选择文档分析、代码审查、图像理解

强大的错误处理

  • 指数退避:优雅地处理 API 速率限制
  • 全面的错误检测:清晰识别错误源
  • 可操作消息:用于故障排除的详细错误信息
  • 恢复机制:当主要方法失败时,智能回退

🖥️ 使用方法

在 Claude 或其他 MCP 兼容主机中

当 GemSuite MCP 与 Claude 或其他兼容 MCP 的主机一起使用时,这些工具将直接在助手工具包中使用。只需根据您的需求调用相应的工具即可:

工具选择指南

  • gem_search :针对需要搜索集成的事实问题
  • gem_reason :针对需要逐步推理的复杂问题
  • gem_process :用于高效处理文本或文件(最高效的标记)
  • gem_analyze :用于自动模型选择的文件详细分析

📚 使用示例

Claude Desktop 使用 GemSuite Gemini Search 访问 Google 搜索

处理文件(最高效的令牌)

// Summarize a large document const response = await gem_process({ file_path: "/path/to/your/large_document.pdf", operation: "summarize" }); // Extract specific information const response = await gem_process({ file_path: "/path/to/your/report.docx", operation: "extract", content: "Extract all financial data and metrics from this document." });

分析文件

// Analyze an image const response = await gem_analyze({ file_path: "/path/to/your/image.jpg", instruction: "Describe what you see in this image in detail." }); // Analyze code const response = await gem_analyze({ file_path: "/path/to/your/code.py", instruction: "Identify potential bugs and suggest optimizations." });

复杂推理

// Solve a complex problem with step-by-step reasoning const response = await gem_reason({ problem: "Analyze this code and suggest improvements:", file_path: "/path/to/your/code.js", show_steps: true }); // Mathematical problem solving const response = await gem_reason({ problem: "Solve this differential equation: dy/dx = 2xy with y(0) = 1", show_steps: true });

使用文件搜索

// Answer questions about a document with search integration const response = await gem_search({ query: "What companies are mentioned in this document?", file_path: "/path/to/your/document.pdf" }); // Factual questions with search const response = await gem_search({ query: "What are the latest developments in quantum computing?", enable_thinking: true });

🧠 模型特征

GemSuite MCP 利用三种主要的 Gemini 模型,为每个任务智能地选择最佳模型:

双子座 2.0 闪光灯

  • 1M 令牌上下文窗口:处理大量内容
  • 搜索集成:当前信息中的地面响应
  • 多模式功能:处理文本、图像等
  • 均衡的性能:质量和速度的良好结合

双子座 2.0 Flash-Lite

  • 最具成本效益:最大限度地减少代币使用
  • 最快的响应时间:适合大批量操作
  • 以文本为中心:针对文本处理进行了优化
  • 效率最优:当不需要搜索和推理时

双子座2.0 闪思维

  • 增强推理能力:逻辑分析和解决问题
  • 逐步分析:展示推理过程
  • 专业能力:擅长复杂计算
  • 最适合深度:当需要彻底分析时

🔄 工作流程示例

文档分析工作流程

// 1. Get a high-level summary (most efficient) const summary = await gem_process({ file_path: "/path/to/large_document.pdf", operation: "summarize" }); // 2. Extract specific information const keyPoints = await gem_process({ file_path: "/path/to/large_document.pdf", operation: "extract", content: "Extract the key findings and recommendations" }); // 3. Answer specific questions with search integration const answers = await gem_search({ query: "Based on this document, what are the implications for market growth?", file_path: "/path/to/large_document.pdf" }); // 4. Claude synthesizes the processed information // This approach is dramatically more token-efficient than having // Claude process the entire document directly

代码审查工作流程

// 1. Get code overview const overview = await gem_analyze({ file_path: "/path/to/code.js", instruction: "Provide an overview of this code's structure and purpose" }); // 2. Identify potential issues const issues = await gem_reason({ problem: "Analyze this code for bugs, security vulnerabilities, and performance issues", file_path: "/path/to/code.js", show_steps: true }); // 3. Generate improvements const improvements = await gem_reason({ problem: "Suggest specific improvements to make this code more efficient and maintainable", file_path: "/path/to/code.js", show_steps: true }); // 4. Claude provides a comprehensive code review synthesis

🧩 与其他 MCP 主机集成

GemSuite MCP 可与任何兼容 MCP 的主机配合使用:

  • Claude Desktop :与Claude强大的推理能力无缝集成
  • Cursor IDE :通过 Gemini 的功能增强编码辅助
  • Replit :直接在您的开发环境中生成和分析代码
  • 其他 MCP 主机:兼容任何实施 MCP 标准的平台

🛠️高级配置

自定义模型选择

您可以通过指定model_id参数来覆盖自动模型选择:

// Force the use of Gemini Flash Thinking for a processing task const response = await gem_process({ file_path: "/path/to/document.pdf", operation: "analyze", model_id: "models/gemini-2.0-flash-thinking" });

gem_process的可用操作

  • summarize :创建简明摘要
  • extract :提取特定信息
  • restructure :将内容重新组织成更有用的格式
  • simplify :使复杂的内容更容易理解
  • expand :为内容添加细节或上下文
  • critique :提供批判性分析
  • feedback :提供建设性反馈
  • analyze :内容的总体分析

🔧 贡献

欢迎贡献!以下是开始的方法:

  1. 分叉存储库
  2. 创建功能分支: git checkout -b feature/my-new-feature
  3. 进行更改
  4. 运行测试: npm test
  5. 提交您的更改: git commit -m 'Add my new feature'
  6. 推送到你的分支: git push origin feature/my-new-feature
  7. 提交拉取请求

对于重大更改,请先打开一个问题来讨论您想要更改的内容。

📜 许可证

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

🙏 致谢

🔗 链接


ID: m2ljvlatlu