Skip to main content
Glama
falahgs

Gemini Thinking MCP Server

by falahgs

双子座思维 MCP 服务器

针对 Google Gemini 语言模型的模型上下文协议 (MCP) 服务器实现。该服务器允许 Claude Desktop 用户访问 Gemini-2.0-flash-thinking-exp-01-21 模型的强大推理能力。

什么是 Gemini Flash?

Gemini-2.0-flash-thinking-exp-01-21 是 Google Gemini 模型的专用版本,经过优化,可在保持高质量的同时实现快速响应。它的优势在于:

  • 数学推理

  • 逻辑推理

  • 逐步分析

  • 结构化思维

Related MCP server: Gemini MCP Server

安装

先决条件

  • Node.js(v18 或更高版本)

  • npm

  • 克劳德桌面

  • Google Gemini API 密钥

设置

  1. 克隆此存储库:

git clone https://github.com/falahgs/gemini-thinking-mcp.git cd gemini-thinking-mcp
  1. 安装依赖项:

npm install
  1. 使用您的 Google API 密钥创建一个.env文件:

GEMINI_API_KEY=your-api-key-here
  1. 构建项目:

npm run build

配置 Claude 桌面

要将此 MCP 服务器与 Claude Desktop 一起使用,请更新您的 Claude Desktop 配置:

  1. 找到您的 Claude Desktop 配置文件:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  2. 将以下内容添加到mcpServers部分:

"gemini-thinking": { "command": "node", "args": ["/path/to/gemini-thinking-mcp/build/index.js"], "env": { "GEMINI_API_KEY": "your-api-key" } }
  1. 重新启动 Claude Desktop 以应用更改。

用法

配置完成后,您可以在 Claude Desktop 对话中访问 Gemini 模型:

@gemini-thinking Can you help me solve this math problem step by step?

参数

您可以调整模型参数:

  • prompt :您对 Gemini 的输入文本(必填)

  • max_tokens :生成的最大令牌数(默认值:8192)

  • temperature :控制随机性(默认值:0.2)

示例

以下是 Gemini Thinking MCP 服务器设置和使用的一些示例:

示例 1:安装 MCP 服务器

MCP 服务器安装本示例展示了在 Claude Desktop 环境中安装和配置 Gemini Thinking MCP 服务器的过程。

示例 2:测试数学问题解决能力

测试数学求解器MCP 服务器逐步解决数学方程的演示,展示其解决问题的能力。

发展

npm run dev # Watch mode npm run build # Build for production npm start # Run the server

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

执照

麻省理工学院

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/falahgs/gemini-thinking-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server