feat: enhance chat tool discovery for collaborative thinking
- Update chat tool description to emphasize collaborative thinking capabilities - Add explicit triggers for brainstorming and sharing ideas with Gemini - Enhance prompt parameter description to include "current thinking" - Update README to highlight chat as a thinking partner - Update MCP_DISCOVERY.md with current tool names and enhanced examples - Bump version to 2.5.0 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -10,37 +10,65 @@ When you configure an MCP server in Claude Desktop, Claude automatically discove
|
|||||||
|
|
||||||
## How This Gemini Server Appears in Claude
|
## How This Gemini Server Appears in Claude
|
||||||
|
|
||||||
Once configured, this Gemini MCP server provides three tools that Claude can use:
|
Once configured, this Gemini MCP server provides these powerful tools:
|
||||||
|
|
||||||
### 1. `gemini_chat`
|
### 1. `chat` - Collaborative Thinking Partner
|
||||||
- Claude sees this as a way to chat with Gemini
|
- Claude sees this as a way to collaborate with Gemini on thinking and problem-solving
|
||||||
- You can invoke it naturally: "Ask Gemini about...", "Use Gemini to..."
|
- Perfect for: brainstorming, getting second opinions, validating approaches
|
||||||
|
- Triggered by: "Brainstorm with Gemini", "Share my thinking with Gemini", "Get Gemini's opinion"
|
||||||
|
|
||||||
### 2. `gemini_analyze_code`
|
### 2. `think_deeper` - Extended Reasoning
|
||||||
- Claude recognizes this for code analysis tasks
|
- Challenges assumptions and explores alternatives
|
||||||
- Triggered by: "Use Gemini to analyze this file", "Have Gemini review this code"
|
- Triggered by: "Use Gemini to think deeper", "Extend my analysis with Gemini"
|
||||||
|
|
||||||
### 3. `gemini_list_models`
|
### 3. `analyze` - Code & File Analysis
|
||||||
- Lists available models
|
- Analyzes files and directories for patterns, architecture, and insights
|
||||||
- Usually called automatically when needed
|
- Triggered by: "Use Gemini to analyze", "Get Gemini to examine this code"
|
||||||
|
|
||||||
|
### 4. `review_code` - Professional Code Review
|
||||||
|
- Provides prioritized feedback on code quality and issues
|
||||||
|
- Triggered by: "Use Gemini to review", "Get Gemini to check for bugs"
|
||||||
|
|
||||||
|
### 5. `debug_issue` - Expert Debugging
|
||||||
|
- Root cause analysis for complex problems
|
||||||
|
- Triggered by: "Use Gemini to debug", "Get Gemini to trace this error"
|
||||||
|
|
||||||
|
### 6. `list_models` & `get_version`
|
||||||
|
- Utility tools for configuration and model info
|
||||||
|
|
||||||
## Natural Language Usage
|
## Natural Language Usage
|
||||||
|
|
||||||
Claude is smart about understanding your intent. You don't need special syntax:
|
Claude is smart about understanding your intent. You don't need special syntax:
|
||||||
|
|
||||||
### Examples that work:
|
### Examples that work:
|
||||||
- "Ask Gemini what it thinks about quantum computing"
|
|
||||||
- "Use Gemini to analyze the file /path/to/large/file.py"
|
**Collaborative Thinking:**
|
||||||
|
- "Share my authentication design with Gemini and get their opinion"
|
||||||
|
- "Brainstorm with Gemini about scaling strategies"
|
||||||
|
- "I'm thinking of using microservices - discuss this with Gemini"
|
||||||
|
- "Get Gemini's perspective on my implementation plan"
|
||||||
|
|
||||||
|
**Deep Analysis:**
|
||||||
|
- "Use Gemini to think deeper about edge cases in my design"
|
||||||
|
- "Get Gemini to analyze the entire src/ directory architecture"
|
||||||
- "Have Gemini review this code for security issues"
|
- "Have Gemini review this code for security issues"
|
||||||
- "Get Gemini's opinion on this architecture"
|
- "Use Gemini to debug why this test is failing"
|
||||||
- "Pass this to Gemini for extended analysis"
|
|
||||||
|
**General Development:**
|
||||||
|
- "Ask Gemini to explain async/await in Python"
|
||||||
|
- "Get Gemini to compare Redis vs Memcached"
|
||||||
|
- "Use Gemini to suggest optimization strategies"
|
||||||
|
|
||||||
### What happens behind the scenes:
|
### What happens behind the scenes:
|
||||||
1. Claude recognizes keywords like "Gemini", "analyze", "review"
|
1. Claude recognizes keywords like "Gemini", "brainstorm", "discuss", "opinion", "analyze", "review", "debug"
|
||||||
2. Claude determines which tool to use based on context
|
2. Claude determines which tool to use based on context:
|
||||||
3. Claude extracts parameters (files, questions, etc.) from your request
|
- Collaborative thinking → `chat`
|
||||||
4. Claude calls the appropriate MCP tool
|
- Deep analysis → `think_deeper`
|
||||||
5. Claude presents the response back to you
|
- Code examination → `analyze` or `review_code`
|
||||||
|
- Problem solving → `debug_issue`
|
||||||
|
3. Claude extracts parameters (files, questions, context) from your request
|
||||||
|
4. Claude calls the appropriate MCP tool with your context
|
||||||
|
5. Claude integrates Gemini's response into the conversation
|
||||||
|
|
||||||
## Configuration in Claude Desktop
|
## Configuration in Claude Desktop
|
||||||
|
|
||||||
@@ -75,7 +103,11 @@ Add to `%APPDATA%\Claude\claude_desktop_config.json`
|
|||||||
To verify the server is connected:
|
To verify the server is connected:
|
||||||
1. Look for the MCP icon in Claude's interface
|
1. Look for the MCP icon in Claude's interface
|
||||||
2. Ask Claude: "What MCP tools are available?"
|
2. Ask Claude: "What MCP tools are available?"
|
||||||
3. Claude should list the Gemini tools
|
3. Claude should list the Gemini tools including:
|
||||||
|
- `chat` for collaborative thinking
|
||||||
|
- `think_deeper` for extended analysis
|
||||||
|
- `analyze`, `review_code`, `debug_issue` for development tasks
|
||||||
|
4. Try: "Brainstorm with Gemini about improving code performance"
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
@@ -88,6 +120,10 @@ If Claude doesn't recognize Gemini commands:
|
|||||||
## Integration with Claude Code
|
## Integration with Claude Code
|
||||||
|
|
||||||
In Claude Code, the integration is even more seamless:
|
In Claude Code, the integration is even more seamless:
|
||||||
|
- Claude can use Gemini as a thinking partner during complex tasks
|
||||||
|
- Share your implementation plans with Gemini for validation
|
||||||
|
- Get second opinions on architectural decisions
|
||||||
|
- Collaborate on debugging tricky issues
|
||||||
- Large file handling is automatic
|
- Large file handling is automatic
|
||||||
- Claude will suggest using Gemini when hitting token limits
|
- Claude will suggest using Gemini when hitting token limits
|
||||||
- File paths are resolved relative to your workspace
|
- File paths are resolved relative to your workspace
|
||||||
16
README.md
16
README.md
@@ -109,7 +109,7 @@ Just ask Claude naturally:
|
|||||||
- **Code needs review?** → `review_code` (bugs, security, performance issues)
|
- **Code needs review?** → `review_code` (bugs, security, performance issues)
|
||||||
- **Something's broken?** → `debug_issue` (root cause analysis, error tracing)
|
- **Something's broken?** → `debug_issue` (root cause analysis, error tracing)
|
||||||
- **Want to understand code?** → `analyze` (architecture, patterns, dependencies)
|
- **Want to understand code?** → `analyze` (architecture, patterns, dependencies)
|
||||||
- **General questions?** → `chat` (explanations, comparisons, advice)
|
- **Need a thinking partner?** → `chat` (brainstorm ideas, get second opinions, validate approaches)
|
||||||
- **Check models?** → `list_models` (see available Gemini models)
|
- **Check models?** → `list_models` (see available Gemini models)
|
||||||
- **Server info?** → `get_version` (version and configuration details)
|
- **Server info?** → `get_version` (version and configuration details)
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ Just ask Claude naturally:
|
|||||||
2. [`review_code`](#2-review_code---professional-code-review) - Professional code review with severity levels
|
2. [`review_code`](#2-review_code---professional-code-review) - Professional code review with severity levels
|
||||||
3. [`debug_issue`](#3-debug_issue---expert-debugging-assistant) - Root cause analysis and debugging
|
3. [`debug_issue`](#3-debug_issue---expert-debugging-assistant) - Root cause analysis and debugging
|
||||||
4. [`analyze`](#4-analyze---smart-file-analysis) - General-purpose file and code analysis
|
4. [`analyze`](#4-analyze---smart-file-analysis) - General-purpose file and code analysis
|
||||||
5. [`chat`](#5-chat---general-development-chat) - General development conversations
|
5. [`chat`](#5-chat---general-development-chat--collaborative-thinking) - Collaborative thinking and development conversations
|
||||||
6. [`list_models`](#6-list_models---see-available-gemini-models) - List available Gemini models
|
6. [`list_models`](#6-list_models---see-available-gemini-models) - List available Gemini models
|
||||||
7. [`get_version`](#7-get_version---server-information) - Get server version and configuration
|
7. [`get_version`](#7-get_version---server-information) - Get server version and configuration
|
||||||
|
|
||||||
@@ -227,8 +227,8 @@ Just ask Claude naturally:
|
|||||||
|
|
||||||
**Triggers:** analyze, examine, look at, understand, inspect
|
**Triggers:** analyze, examine, look at, understand, inspect
|
||||||
|
|
||||||
### 5. `chat` - General Development Chat
|
### 5. `chat` - General Development Chat & Collaborative Thinking
|
||||||
**For everything else - explanations, comparisons, brainstorming**
|
**Your thinking partner - bounce ideas, get second opinions, brainstorm collaboratively**
|
||||||
|
|
||||||
#### Example Prompts:
|
#### Example Prompts:
|
||||||
|
|
||||||
@@ -236,6 +236,8 @@ Just ask Claude naturally:
|
|||||||
```
|
```
|
||||||
"Use gemini to explain how async/await works in Python"
|
"Use gemini to explain how async/await works in Python"
|
||||||
"Get gemini to compare Redis vs Memcached for session storage"
|
"Get gemini to compare Redis vs Memcached for session storage"
|
||||||
|
"Share my authentication design with gemini and get their opinion"
|
||||||
|
"Brainstorm with gemini about scaling strategies for our API"
|
||||||
```
|
```
|
||||||
|
|
||||||
**Collaborative Workflow:**
|
**Collaborative Workflow:**
|
||||||
@@ -246,12 +248,16 @@ Just ask Claude naturally:
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Key Features:**
|
**Key Features:**
|
||||||
|
- Collaborative thinking partner for your analysis and planning
|
||||||
|
- Get second opinions on your designs and approaches
|
||||||
|
- Brainstorm solutions and explore alternatives together
|
||||||
|
- Validate your checklists and implementation plans
|
||||||
- General development questions and explanations
|
- General development questions and explanations
|
||||||
- Technology comparisons and best practices
|
- Technology comparisons and best practices
|
||||||
- Architecture and design discussions
|
- Architecture and design discussions
|
||||||
- Can reference files for context: `"Use gemini to explain this algorithm with context from algorithm.py"`
|
- Can reference files for context: `"Use gemini to explain this algorithm with context from algorithm.py"`
|
||||||
|
|
||||||
**Triggers:** ask, explain, compare, suggest, what about
|
**Triggers:** ask, explain, compare, suggest, what about, brainstorm, discuss, share my thinking, get opinion
|
||||||
|
|
||||||
### 6. `list_models` - See Available Gemini Models
|
### 6. `list_models` - See Available Gemini Models
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Configuration and constants for Gemini MCP Server
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# Version and metadata
|
# Version and metadata
|
||||||
__version__ = "2.4.2"
|
__version__ = "2.5.0"
|
||||||
__updated__ = "2025-06-09"
|
__updated__ = "2025-06-09"
|
||||||
__author__ = "Fahad Gilani"
|
__author__ = "Fahad Gilani"
|
||||||
|
|
||||||
|
|||||||
11
server.py
11
server.py
@@ -67,16 +67,19 @@ async def handle_list_tools() -> List[Tool]:
|
|||||||
Tool(
|
Tool(
|
||||||
name="chat",
|
name="chat",
|
||||||
description=(
|
description=(
|
||||||
"GENERAL CHAT - Have a conversation with Gemini about any development topic. "
|
"GENERAL CHAT & COLLABORATIVE THINKING - Use Gemini as your thinking partner! "
|
||||||
"Use for explanations, brainstorming, or general questions. "
|
"Perfect for: bouncing ideas during your own analysis, getting second opinions on your plans, "
|
||||||
"Triggers: 'ask gemini', 'explain', 'what is', 'how do I'."
|
"collaborative brainstorming, validating your checklists and approaches, exploring alternatives. "
|
||||||
|
"Also great for: explanations, comparisons, general development questions. "
|
||||||
|
"Triggers: 'ask gemini', 'brainstorm with gemini', 'get gemini's opinion', 'discuss with gemini', "
|
||||||
|
"'share my thinking with gemini', 'explain', 'what is', 'how do I'."
|
||||||
),
|
),
|
||||||
inputSchema={
|
inputSchema={
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"prompt": {
|
"prompt": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Your question or topic",
|
"description": "Your question, topic, or current thinking to discuss with Gemini",
|
||||||
},
|
},
|
||||||
"context_files": {
|
"context_files": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -14,7 +14,7 @@ if readme_path.exists():
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="gemini-mcp-server",
|
name="gemini-mcp-server",
|
||||||
version="2.3.0",
|
version="2.5.0",
|
||||||
description="Model Context Protocol server for Google Gemini",
|
description="Model Context Protocol server for Google Gemini",
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
|
|||||||
Reference in New Issue
Block a user