Gemini Thinking Server

Gemini Thinking Server

An MCP server implementation that leverages Google's Gemini API to provide analytical problem-solving capabilities through sequential thinking steps without code generation.

bartekke8it56w2

Research & Data
Knowledge & Memory
Visit Server

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

Model Context Protocol - Gemini Thinking Server

This is an implementation of the Model Context Protocol (MCP) that integrates with Google's Gemini API to provide analytical thinking capabilities without code generation.

Overview

The Gemini Thinking Server is a specialized MCP server that leverages Google's Gemini model to provide sequential thinking and problem-solving capabilities. It allows for:

  • 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

Features

  • Gemini-Powered Thinking: Utilizes Gemini's analytical capabilities to generate thoughtful responses
  • Meta-Commentary: Provides insights into the reasoning process
  • Confidence Levels: Indicates how confident Gemini is in its analysis
  • Alternative Paths: Suggests different approaches to the problem
  • Branching Thoughts: Allows exploration of different thought paths
  • Revision Capability: Supports revising previous thoughts
  • Session Persistence: Save and resume analysis sessions

Installation

# Clone the repository
git clone <repository-url>

# Install dependencies
npm install

# Build the project
npm run build

Usage

Environment Setup

Before running the server, you need to set up your Gemini API key:

export GEMINI_API_KEY=your_api_key_here

Running the Server

node dist/gemini-index.js

Tool Parameters

The geminithinking tool accepts the following parameters:

  • query (required): The question or problem to analyze
  • context (optional): Additional context information
  • approach (optional): Suggested approach to the problem
  • previousThoughts (optional): Array of previous thoughts for context
  • thought (optional): Your current thinking step (if empty, will be generated by Gemini)
  • nextThoughtNeeded (required): Whether another thought step is needed
  • thoughtNumber (required): Current thought number
  • totalThoughts (required): Estimated total thoughts needed
  • isRevision (optional): Whether this revises previous thinking
  • revisesThought (optional): Which thought is being reconsidered
  • branchFromThought (optional): Branching point thought number
  • branchId (optional): Branch identifier
  • needsMoreThoughts (optional): If more thoughts are needed

Session Management

The tool also supports session management commands:

  • sessionCommand: Command to manage sessions ('save', 'load', 'getState')
  • sessionPath: Path to save or load the session file (required for 'save' and 'load' commands)

Example: Saving a Session

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

Example: Loading a Session

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

Example: Getting Session State

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

Example

Here's an example of how to use the tool:

{
  "query": "How might we design a sustainable urban transportation system?",
  "context": "The city has 500,000 residents and currently relies heavily on personal vehicles.",
  "approach": "Consider environmental, economic, and social factors.",
  "thoughtNumber": 1,
  "totalThoughts": 5,
  "nextThoughtNeeded": true
}

Response Format

The server responds with:

{
  "thought": "The generated thought from Gemini",
  "thoughtNumber": 1,
  "totalThoughts": 5,
  "nextThoughtNeeded": true,
  "branches": [],
  "thoughtHistoryLength": 1,
  "metaComments": "Meta-commentary about the reasoning",
  "confidenceLevel": 0.85,
  "alternativePaths": ["Alternative approach 1", "Alternative approach 2"]
}

Example Clients

Several example clients are provided to demonstrate different use cases:

  • sample-client.js: Basic client example
  • example-usage.js: Specific usage example
  • codebase-analysis-example.js: Example for codebase analysis
  • session-example.js: Example demonstrating session persistence
  • advanced-filtering-example.js: Example demonstrating advanced semantic filtering

To run the session example:

node dist/session-example.js

To run the advanced filtering example:

node dist/advanced-filtering-example.js

License

MIT

Recommended Servers

graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
MCP PubMed Search

MCP PubMed Search

Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.

Featured
Python
MCP DuckDB Knowledge Graph Memory Server

MCP DuckDB Knowledge Graph Memory Server

A memory server for Claude that stores and retrieves knowledge graph data in DuckDB, enhancing performance and query capabilities for conversations with persistent user information.

Featured
TypeScript
dbt Semantic Layer MCP Server

dbt Semantic Layer MCP Server

A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.

Featured
TypeScript
mixpanel

mixpanel

Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Featured
TypeScript
Airtable MCP Server

Airtable MCP Server

A Model Context Protocol server that provides tools for programmatically managing Airtable bases, tables, fields, and records through Claude Desktop or other MCP clients.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python
Verodat MCP Server

Verodat MCP Server

An MCP server that integrates Verodat's data management capabilities with AI systems like Claude Desktop, enabling users to manage accounts, workspaces, and datasets, as well as perform AI-powered queries on their data.

Official
Local
TypeScript
Supavec MCP Server

Supavec MCP Server

Official
TypeScript