Gemini Thinking Server

Gemini Thinking Server

一个 MCP 服务器实现,利用 Google 的 Gemini API,通过顺序思考步骤提供分析性问题解决能力,无需生成代码。 (Alternatively, a slightly more formal translation:) 一个 MCP 服务器的实现方案,它利用 Google 的 Gemini API,通过循序渐进的思考步骤来提供分析性问题解决能力,并且无需生成代码。

研究与数据
知识与记忆
访问服务器

Tools

geminithinking

A detailed tool for dynamic and reflective problem-solving through Gemini AI. This tool helps analyze problems through a flexible thinking process powered by Google's Gemini model. Each thought can build on, question, or revise previous insights as understanding deepens. When to use this tool: - Breaking down complex problems into steps - Planning and design with room for revision - Analysis that might need course correction - Problems where the full scope might not be clear initially - Problems that require a multi-step solution - Tasks that need to maintain context over multiple steps - Situations where irrelevant information needs to be filtered out Key features: - Leverages Gemini AI for deep analytical thinking - Provides meta-commentary on the reasoning process - Indicates confidence levels for generated thoughts - Suggests alternative approaches when relevant - You can adjust total_thoughts up or down as you progress - You can question or revise previous thoughts - You can add more thoughts even after reaching what seemed like the end - You can express uncertainty and explore alternative approaches - Not every thought needs to build linearly - you can branch or backtrack - Session persistence: save and resume your analysis sessions Parameters explained: - query: The question or problem to be analyzed - context: Additional context information (e.g., code snippets, background) - approach: Suggested approach to the problem (optional) - previousThoughts: Array of previous thoughts for context - thought: The current thinking step (if empty, will be generated by Gemini) - next_thought_needed: True if you need more thinking, even if at what seemed like the end - thought_number: Current number in sequence (can go beyond initial total if needed) - total_thoughts: Current estimate of thoughts needed (can be adjusted up/down) - is_revision: A boolean indicating if this thought revises previous thinking - revises_thought: If is_revision is true, which thought number is being reconsidered - branch_from_thought: If branching, which thought number is the branching point - branch_id: Identifier for the current branch (if any) - needs_more_thoughts: If reaching end but realizing more thoughts needed - metaComments: Meta-commentary from Gemini about its reasoning process - confidenceLevel: Gemini's confidence in the generated thought (0-1) - alternativePaths: Alternative approaches suggested by Gemini Session commands: - sessionCommand: Command to manage sessions ('save', 'load', 'getState') - sessionPath: Path to save or load the session file (required for 'save' and 'load' commands) You should: 1. Start with a clear query and any relevant context 2. Let Gemini generate thoughts by not providing the 'thought' parameter 3. Review the generated thoughts and meta-commentary 4. Feel free to revise or branch thoughts as needed 5. Consider alternative paths suggested by Gemini 6. Only set next_thought_needed to false when truly done 7. Use session commands to save your progress and resume later

README

模型上下文协议 - Gemini 思维服务器

这是一个模型上下文协议 (MCP) 的实现,它与 Google 的 Gemini API 集成,以提供无需代码生成的分析思维能力。

概述

Gemini 思维服务器是一个专门的 MCP 服务器,它利用 Google 的 Gemini 模型来提供顺序思维和问题解决能力。它允许:

  • 将复杂问题分解为步骤
  • 规划和设计,并留有修改空间
  • 可能需要纠正方向的分析
  • 范围可能最初不明确的问题

特性

  • Gemini 驱动的思维: 利用 Gemini 的分析能力来生成周到的响应
  • 元评论: 提供对推理过程的见解
  • 置信度: 指示 Gemini 对其分析的置信程度
  • 替代路径: 建议解决问题的不同方法
  • 分支思考: 允许探索不同的思考路径
  • 修订能力: 支持修订之前的想法
  • 会话持久性: 保存和恢复分析会话

安装

# 克隆仓库
git clone <repository-url>

# 安装依赖
npm install

# 构建项目
npm run build

使用

环境设置

在运行服务器之前,您需要设置您的 Gemini API 密钥:

export GEMINI_API_KEY=your_api_key_here

运行服务器

node dist/gemini-index.js

工具参数

geminithinking 工具接受以下参数:

  • query (必需): 要分析的问题或难题
  • context (可选): 附加的上下文信息
  • approach (可选): 建议的解决问题的方法
  • previousThoughts (可选): 用于上下文的先前想法的数组
  • thought (可选): 您当前的思考步骤(如果为空,将由 Gemini 生成)
  • nextThoughtNeeded (必需): 是否需要另一个思考步骤
  • thoughtNumber (必需): 当前思考编号
  • totalThoughts (必需): 估计需要的总思考次数
  • isRevision (可选): 这是否修改了之前的想法
  • revisesThought (可选): 正在重新考虑哪个想法
  • branchFromThought (可选): 分支点思考编号
  • branchId (可选): 分支标识符
  • needsMoreThoughts (可选): 是否需要更多想法

会话管理

该工具还支持会话管理命令:

  • sessionCommand: 用于管理会话的命令 ('save', 'load', 'getState')
  • sessionPath: 用于保存或加载会话文件的路径('save' 和 'load' 命令必需)

示例:保存会话

{
  "sessionCommand": "save",
  "sessionPath": "/path/to/save/session.json",
  "query": "dummy",
  "thoughtNumber": 1,
  "totalThoughts": 1,
  "nextThoughtNeeded": false
}

示例:加载会话

{
  "sessionCommand": "load",
  "sessionPath": "/path/to/load/session.json",
  "query": "dummy",
  "thoughtNumber": 1,
  "totalThoughts": 1,
  "nextThoughtNeeded": false
}

示例:获取会话状态

{
  "sessionCommand": "getState",
  "query": "dummy",
  "thoughtNumber": 1,
  "totalThoughts": 1,
  "nextThoughtNeeded": false
}

示例

这是一个如何使用该工具的示例:

{
  "query": "我们如何设计一个可持续的城市交通系统?",
  "context": "该城市有 50 万居民,目前严重依赖私家车。",
  "approach": "考虑环境、经济和社会因素。",
  "thoughtNumber": 1,
  "totalThoughts": 5,
  "nextThoughtNeeded": true
}

响应格式

服务器响应:

{
  "thought": "Gemini 生成的想法",
  "thoughtNumber": 1,
  "totalThoughts": 5,
  "nextThoughtNeeded": true,
  "branches": [],
  "thoughtHistoryLength": 1,
  "metaComments": "关于推理的元评论",
  "confidenceLevel": 0.85,
  "alternativePaths": ["替代方法 1", "替代方法 2"]
}

示例客户端

提供了几个示例客户端来演示不同的用例:

  • sample-client.js: 基本客户端示例
  • example-usage.js: 特定用法示例
  • codebase-analysis-example.js: 代码库分析示例
  • session-example.js: 演示会话持久性的示例
  • advanced-filtering-example.js: 演示高级语义过滤的示例

要运行会话示例:

node dist/session-example.js

要运行高级过滤示例:

node dist/advanced-filtering-example.js

许可证

MIT

推荐服务器

graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

一个模型上下文协议 (MCP) 服务器,它使用 CoinCap API 提供全面的加密货币分析。该服务器通过一个易于使用的界面提供实时价格数据、市场分析和历史趋势。 (Alternative, slightly more formal and technical translation): 一个模型上下文协议 (MCP) 服务器,利用 CoinCap API 提供全面的加密货币分析服务。该服务器通过用户友好的界面,提供实时价格数据、市场分析以及历史趋势数据。

精选
TypeScript
MCP PubMed Search

MCP PubMed Search

用于搜索 PubMed 的服务器(PubMed 是一个免费的在线数据库,用户可以在其中搜索生物医学和生命科学文献)。 我是在 MCP 发布当天创建的,但当时正在度假。 我看到有人在您的数据库中发布了类似的服务器,但还是决定发布我的。

精选
Python
MCP DuckDB Knowledge Graph Memory Server

MCP DuckDB Knowledge Graph Memory Server

一个为 Claude 设计的记忆服务器,它使用 DuckDB 存储和检索知识图谱数据,从而增强了对话的性能和查询能力,并能持久保存用户信息。

精选
TypeScript
mixpanel

mixpanel

连接到您的 Mixpanel 数据。从 Mixpanel 分析查询事件、留存和漏斗数据。

精选
TypeScript
Airtable MCP Server

Airtable MCP Server

一个模型上下文协议(Model Context Protocol,MCP)服务器,通过 Claude Desktop 或其他 MCP 客户端,为以编程方式管理 Airtable 数据库、表格、字段和记录提供工具。

精选
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

这个服务器通过将复杂问题分解为顺序步骤来促进结构化的问题解决,支持修订,并通过完整的 MCP 集成来实现多条解决方案路径。

精选
Python
Verodat MCP Server

Verodat MCP Server

一个 MCP 服务器,集成了 Verodat 的数据管理功能和像 Claude Desktop 这样的人工智能系统,使用户能够管理账户、工作区和数据集,并能对他们的数据执行人工智能驱动的查询。

官方
本地
TypeScript
Supavec MCP Server

Supavec MCP Server

官方
TypeScript
Ragie Model Context Protocol Server

Ragie Model Context Protocol Server

一个 MCP 服务器,它允许 AI 模型通过一个简单的“检索”工具从 Ragie 的知识库中检索信息。

官方
JavaScript