# Gemini MCP Server
MCP (Model Context Protocol) Server with Google Gemini CLI integration for AI second opinions and validation in development workflows.
## Features
- 🤖 **AI Second Opinions**: Get alternative perspectives from Google's Gemini AI
- 🔍 **Automatic Uncertainty Detection**: Triggers consultations when uncertainty is detected
- ⚡ **Rate Limiting**: Built-in rate limiting to prevent API abuse
- 🛡️ **Configurable Models**: Support for different Gemini models
- 📊 **Consultation Logging**: Track all AI consultations with timestamps
## Quick Start
### Using uvx (Recommended)
Run directly without installation:
```bash
# Run in current directory
uvx gemini-mcp-server
# Run with specific project root
uvx gemini-mcp-server --project-root /path/to/project
```
### Local Development
```bash
# Clone the repository
git clone https://github.com/taehun-kmu/gemini-mcp-server
cd gemini-mcp-server
# Install with uv
uv pip install -e .
# Run the server
gemini-mcp-server
```
## Prerequisites
1. **Node.js 18+** - Required for Gemini CLI
2. **Python 3.8+** - Required for MCP server
3. **Gemini CLI** - Install and authenticate:
```bash
# Install Gemini CLI
npm install -g @google/gemini-cli
# Authenticate (run once)
gemini
```
## Configuration
Create a `gemini-config.json` file in your project root:
```json
{
"enabled": true,
"auto_consult": true,
"cli_command": "gemini",
"timeout": 60,
"rate_limit_delay": 2.0,
"model": "gemini-2.5-flash",
"log_consultations": true
}
```
### Environment Variables
Override configuration with environment variables:
- `GEMINI_ENABLED`: Enable/disable integration
- `GEMINI_AUTO_CONSULT`: Enable/disable automatic consultation
- `GEMINI_CLI_COMMAND`: CLI command (default: "gemini")
- `GEMINI_TIMEOUT`: Command timeout in seconds
- `GEMINI_RATE_LIMIT`: Delay between consultations
- `GEMINI_MODEL`: Model to use (default: "gemini-2.5-flash")
## MCP Tools
The server exposes three MCP tools:
1. **consult_gemini**: Get second opinions from Gemini
- `query`: The question or topic
- `context`: Additional context
- `comparison_mode`: Request structured comparison format
2. **gemini_status**: Check integration status and statistics
3. **toggle_gemini_auto_consult**: Enable/disable automatic consultation
- `enable`: true/false or omit to toggle
## Claude Code Integration
Configure Claude Code to use this MCP server by adding to your MCP configuration:
```json
{
"mcpServers": {
"gemini": {
"command": "uvx",
"args": ["gemini-mcp-server"],
"env": {
"GEMINI_ENABLED": "true"
}
}
}
}
```
Note: Add `"--project-root", "/path/to/project"` to args if you need to specify a different project directory.
## Development
### Project Structure
```
gemini-mcp-server/
├── gemini_mcp/
│ ├── __init__.py
│ ├── __main__.py # CLI entry point
│ ├── gemini_integration.py # Gemini integration logic
│ └── server.py # MCP server implementation
├── pyproject.toml # Package configuration
├── README.md # This file
├── LICENSE # MIT License
├── setup-gemini-integration.sh # Setup script
└── gemini-config.json # Example configuration
```
### Running Tests
```bash
# Install dev dependencies
uv pip install -e ".[dev]"
# Run tests
pytest
# Format code
black gemini_mcp
ruff check gemini_mcp
```
## License
MIT License - see LICENSE file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "gemini-mcp-server",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "ai, development-tools, gemini, mcp, second-opinion",
"author": null,
"author_email": "taehun-kmu <taehun-kmu@kookmin.ac.kr>",
"download_url": "https://files.pythonhosted.org/packages/af/6c/a5bfe935f2b10183765c3cef327276d46e889c96bb68f6d3c8dcd2d6868d/gemini_mcp_server-0.0.1.tar.gz",
"platform": null,
"description": "# Gemini MCP Server\n\nMCP (Model Context Protocol) Server with Google Gemini CLI integration for AI second opinions and validation in development workflows.\n\n## Features\n\n- \ud83e\udd16 **AI Second Opinions**: Get alternative perspectives from Google's Gemini AI\n- \ud83d\udd0d **Automatic Uncertainty Detection**: Triggers consultations when uncertainty is detected\n- \u26a1 **Rate Limiting**: Built-in rate limiting to prevent API abuse\n- \ud83d\udee1\ufe0f **Configurable Models**: Support for different Gemini models\n- \ud83d\udcca **Consultation Logging**: Track all AI consultations with timestamps\n\n## Quick Start\n\n### Using uvx (Recommended)\n\nRun directly without installation:\n\n```bash\n# Run in current directory\nuvx gemini-mcp-server\n\n# Run with specific project root\nuvx gemini-mcp-server --project-root /path/to/project\n```\n\n### Local Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/taehun-kmu/gemini-mcp-server\ncd gemini-mcp-server\n\n# Install with uv\nuv pip install -e .\n\n# Run the server\ngemini-mcp-server\n```\n\n## Prerequisites\n\n1. **Node.js 18+** - Required for Gemini CLI\n2. **Python 3.8+** - Required for MCP server\n3. **Gemini CLI** - Install and authenticate:\n\n```bash\n# Install Gemini CLI\nnpm install -g @google/gemini-cli\n\n# Authenticate (run once)\ngemini\n```\n\n## Configuration\n\nCreate a `gemini-config.json` file in your project root:\n\n```json\n{\n \"enabled\": true,\n \"auto_consult\": true,\n \"cli_command\": \"gemini\",\n \"timeout\": 60,\n \"rate_limit_delay\": 2.0,\n \"model\": \"gemini-2.5-flash\",\n \"log_consultations\": true\n}\n```\n\n### Environment Variables\n\nOverride configuration with environment variables:\n\n- `GEMINI_ENABLED`: Enable/disable integration\n- `GEMINI_AUTO_CONSULT`: Enable/disable automatic consultation\n- `GEMINI_CLI_COMMAND`: CLI command (default: \"gemini\")\n- `GEMINI_TIMEOUT`: Command timeout in seconds\n- `GEMINI_RATE_LIMIT`: Delay between consultations\n- `GEMINI_MODEL`: Model to use (default: \"gemini-2.5-flash\")\n\n## MCP Tools\n\nThe server exposes three MCP tools:\n\n1. **consult_gemini**: Get second opinions from Gemini\n - `query`: The question or topic\n - `context`: Additional context\n - `comparison_mode`: Request structured comparison format\n\n2. **gemini_status**: Check integration status and statistics\n\n3. **toggle_gemini_auto_consult**: Enable/disable automatic consultation\n - `enable`: true/false or omit to toggle\n\n## Claude Code Integration\n\nConfigure Claude Code to use this MCP server by adding to your MCP configuration:\n\n```json\n{\n \"mcpServers\": {\n \"gemini\": {\n \"command\": \"uvx\",\n \"args\": [\"gemini-mcp-server\"],\n \"env\": {\n \"GEMINI_ENABLED\": \"true\"\n }\n }\n }\n}\n```\n\nNote: Add `\"--project-root\", \"/path/to/project\"` to args if you need to specify a different project directory.\n\n## Development\n\n### Project Structure\n\n```\ngemini-mcp-server/\n\u251c\u2500\u2500 gemini_mcp/\n\u2502 \u251c\u2500\u2500 __init__.py\n\u2502 \u251c\u2500\u2500 __main__.py # CLI entry point\n\u2502 \u251c\u2500\u2500 gemini_integration.py # Gemini integration logic\n\u2502 \u2514\u2500\u2500 server.py # MCP server implementation\n\u251c\u2500\u2500 pyproject.toml # Package configuration\n\u251c\u2500\u2500 README.md # This file\n\u251c\u2500\u2500 LICENSE # MIT License\n\u251c\u2500\u2500 setup-gemini-integration.sh # Setup script\n\u2514\u2500\u2500 gemini-config.json # Example configuration\n```\n\n### Running Tests\n\n```bash\n# Install dev dependencies\nuv pip install -e \".[dev]\"\n\n# Run tests\npytest\n\n# Format code\nblack gemini_mcp\nruff check gemini_mcp\n```\n\n## License\n\nMIT License - see LICENSE file for details.",
"bugtrack_url": null,
"license": "MIT",
"summary": "MCP Server with Google Gemini CLI integration for AI second opinions",
"version": "0.0.1",
"project_urls": {
"Documentation": "https://github.com/taehun-kmu/gemini-mcp-server#readme",
"Homepage": "https://github.com/taehun-kmu/gemini-mcp-server",
"Issues": "https://github.com/taehun-kmu/gemini-mcp-server/issues",
"Repository": "https://github.com/taehun-kmu/gemini-mcp-server.git"
},
"split_keywords": [
"ai",
" development-tools",
" gemini",
" mcp",
" second-opinion"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e5451861120413e0ef2890add251750f5873a763b3843aa392dc16f7b51068cf",
"md5": "08d384b926f9aa375efc6e4a03690f4f",
"sha256": "456407d0a88c5d49f1ed6780915b140454b7b4ecb8626e1cafebfb8674976636"
},
"downloads": -1,
"filename": "gemini_mcp_server-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "08d384b926f9aa375efc6e4a03690f4f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10206,
"upload_time": "2025-07-10T06:05:56",
"upload_time_iso_8601": "2025-07-10T06:05:56.956861Z",
"url": "https://files.pythonhosted.org/packages/e5/45/1861120413e0ef2890add251750f5873a763b3843aa392dc16f7b51068cf/gemini_mcp_server-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "af6ca5bfe935f2b10183765c3cef327276d46e889c96bb68f6d3c8dcd2d6868d",
"md5": "a5af1ba76a59c9860995bb30785907bc",
"sha256": "4b05ec4f4acc1893c79eb9d9d861d8407e9753b1df8acca6f3fe4fa0014f1747"
},
"downloads": -1,
"filename": "gemini_mcp_server-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "a5af1ba76a59c9860995bb30785907bc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 11382,
"upload_time": "2025-07-10T06:07:40",
"upload_time_iso_8601": "2025-07-10T06:07:40.962636Z",
"url": "https://files.pythonhosted.org/packages/af/6c/a5bfe935f2b10183765c3cef327276d46e889c96bb68f6d3c8dcd2d6868d/gemini_mcp_server-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-10 06:07:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "taehun-kmu",
"github_project": "gemini-mcp-server#readme",
"github_not_found": true,
"lcname": "gemini-mcp-server"
}