
Gemini MCP Tool - Windows Fixed Version for Trae AI and Claude Desktop
概览
- Fixed cross-terminal compatibility issues and fetch-chunk format errors A Model Context Protocol (MCP) server that enables AI assistants to interact with Google's Gemini CLI. This is a fixed version specifically designed to work seamlessly on Windows environments with PowerShell support. : This is an enhanced version of the original gemini-mcp-tool with Windows-specific fixes and improvements. - 🔧 - Resolved Node.js path not found issues in different terminal environments - 📦 - Fixed MCP protocol format mismatch in chunked responses - 🛡️ - Automatically adds common Node.js installation paths - ✅ - Supports PowerShell, CMD, VS Code Terminal, Trae AI, CherryStudio, etc. - 🚀 - Better error messages and debug output - 🆕 - Added optional powershellPath parameter allowing users to customize PowerShell executable path - ✅ - Resolved spawn powershell.
README
以下为原文 README 节选,完整内容请查看原文。
🚀 Gemini MCP Tool - Windows Fixed Version
Latest Version v1.0.21 - Fixed cross-terminal compatibility issues and fetch-chunk format errors
A Windows-compatible Model Context Protocol (MCP) server that enables AI assistants to interact with Google’s Gemini CLI. This is a fixed version specifically designed to work seamlessly on Windows environments with PowerShell support.
Note: This is an enhanced version of the original gemini-mcp-tool with Windows-specific fixes and improvements.
🆕 Latest Updates (v1.0.21)
- 🔧 Fixed Cross-Terminal Compatibility - Resolved Node.js path not found issues in different terminal environments
- 📦 Fixed fetch-chunk Format Error - Fixed MCP protocol format mismatch in chunked responses
- 🛡️ Enhanced PATH Environment Variable Handling - Automatically adds common Node.js installation paths
- ✅ Full Compatibility with All Terminals - Supports PowerShell, CMD, VS Code Terminal, Trae AI, CherryStudio, etc.
- 🚀 Improved Error Handling - Better error messages and debug output
v1.0.3 Updates
- 🆕 PowerShell Path Parameter Support - Added optional
powershellPathparameter allowing users to customize PowerShell executable path - ✅ Fixed PowerShell Execution Error - Resolved
spawn powershell.exe ENOENTissue - ✅ Improved Windows Compatibility - Automatic detection of available PowerShell versions
- ✅ Fixed Undefined Variable Error - Fixed
argsvariable issue inexecuteCommandWithPipedInputfunction - ✅ Enhanced Error Handling - Better error messages and debug output
- ✅ Backward Compatibility - Existing configurations require no modification, automatically uses default detection logic
✨ Features
- 🪟 Windows Compatible: Full PowerShell support with Windows-specific path handling
- 📊 Large Context Window: Leverage Gemini’s massive token window for analyzing entire codebases
- 📁 File Analysis: Analyze files using
@filenamesyntax - 🔒 Sandbox Mode: Safe code execution environment
- 🔗 MCP Integration: Seamless integration with MCP-compatible AI assistants (Trae AI, Claude Desktop)
- ⚡ NPX Ready: Easy installation and usage with NPX
- 🔧 Environment Variable Support: Flexible API key configuration
This Windows-fixed version resolves:
- PowerShell parameter passing issues
- Character encoding problems with Chinese/Unicode text
- Command line argument escaping on Windows
- Environment variable handling
📋 Prerequisites
Before using this tool, ensure you have:
- Node.js (v16.0.0 or higher)
node --version # Should be v16+
安装
npx -y [email protected]配置
{
"mcpServers": {
"gemini-cli": {
"name": "gemini-cli",
"description": "Windows-compatible Gemini MCP Tool",
"baseUrl": "",
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"GEMINI_API_KEY": "YOUR_ACTUAL_API_KEY_HERE"
},
"isActive": true,
"providerUrl": "https://github.com/orzcls/gemini-mcp-tool-windows-fixed"
}
}
}