
mcp gemini server
Google Gemini AI integration for Claude CLI via MCP protocol
Repository Info
About This Server
Google Gemini AI integration for Claude CLI via MCP protocol
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Gemini AI MCP Server
This project integrates Google's Gemini AI models with Claude CLI via the MCP protocol.
Core Features
- MCP Protocol Integration: Seamless integration with Claude CLI through standardized MCP protocol
- Multiple Model Support: Compatible with various Gemini AI models including 2.5 Pro and 1.5 series
- JSON Response Format: Structured JSON responses for reliable parsing and integration
- Error Handling: Robust error handling with informative error messages
- Command-line Arguments: Flexible command-line interface with optional parameters
- Environment Configuration: Simple API key configuration through environment variables
Setup
-
Ensure you have the Google Generative AI Python package installed:
pip install google-generativeai -
Set your Google API key as an environment variable:
export GOOGLE_API_KEY=your_api_key -
Make sure the shell script is executable:
chmod +x gemini.sh
Usage with Claude CLI
-
Configure Claude CLI to use this MCP server by adding the directory to your MCP search path
-
Use the Gemini command through Claude CLI:
claude mcp gemini --prompt "Your prompt here" -
Optionally specify a different Gemini model:
claude mcp gemini --prompt "Your prompt here" --model "gemini-1.5-pro"
Testing the Server Directly
You can test the server directly without Claude CLI:
./gemini.sh gemini --prompt "Explain quantum physics simply"
Available Models
- gemini-2.5-pro-preview-03-25 (default)
- gemini-1.5-pro
- gemini-1.5-flash
MCP Integration
This server implements the MCP protocol for seamless integration with Claude CLI. The mcp.json file defines the available commands and parameters.
Architecture
gemini_server/
├── mcp.json # MCP protocol definition
├── gemini_server.py # Core server implementation
├── gemini.sh # Shell wrapper script
├── genai.py # Original implementation (reference)
├── README.md # Documentation
└── changes.log # Implementation changes log
Quick Start
Clone the repository
git clone https://github.com/tonycai/mcp-gemini-serverInstall dependencies
cd mcp-gemini-server
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.