OG

orzcls/gemini-mcp-tool-windows-fixed

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

10 stars 3 forks 质量 67 趋势 18MIT

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 powershellPath parameter allowing users to customize PowerShell executable path
  • ✅ Fixed PowerShell Execution Error - Resolved spawn powershell.exe ENOENT issue
  • ✅ Improved Windows Compatibility - Automatic detection of available PowerShell versions
  • ✅ Fixed Undefined Variable Error - Fixed args variable issue in executeCommandWithPipedInput function
  • ✅ 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 @filename syntax
  • 🔒 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:

  1. Node.js (v16.0.0 or higher)
    node --version  # Should be v16+
在 GitHub 查看完整 README

安装

npx -y [email protected]
新手?先看 mcpskill.org 教程 →

配置

{ "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" } } }