feat: Simplify configuration with run_gemini scripts

- Added run_gemini.sh for macOS/Linux
- Added run_gemini.bat for Windows
- Scripts handle virtual environment activation automatically
- Updated README and config examples to use the simpler command
- No need to specify Python path or script arguments anymore

This makes the setup much cleaner and less error-prone for users.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Fahad
2025-06-08 20:18:18 +04:00
parent 25849d16e9
commit 149a58d042
4 changed files with 32 additions and 9 deletions

View File

@@ -18,14 +18,25 @@ This server acts as a developer assistant that augments Claude Code when you nee
Add to your Claude Desktop configuration file:
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"gemini": {
"command": "/path/to/gemini-mcp-server/venv/bin/python",
"args": ["/path/to/gemini-mcp-server/gemini_server.py"],
"command": "/path/to/gemini-mcp-server/run_gemini.sh",
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here"
}
}
}
}
```
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"gemini": {
"command": "C:\\path\\to\\gemini-mcp-server\\run_gemini.bat",
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here"
}

View File

@@ -1,8 +1,7 @@
{
"mcpServers": {
"gemini": {
"command": "/path/to/gemini-mcp-server/venv/bin/python",
"args": ["/path/to/gemini-mcp-server/gemini_server.py"],
"command": "/path/to/gemini-mcp-server/run_gemini.sh",
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here"
}

9
run_gemini.bat Normal file
View File

@@ -0,0 +1,9 @@
@echo off
REM Windows batch script to run Gemini MCP server
REM Get the directory where this script is located
set SCRIPT_DIR=%~dp0
REM Activate the virtual environment and run the server
call "%SCRIPT_DIR%venv\Scripts\activate.bat"
python "%SCRIPT_DIR%gemini_server.py"

View File

@@ -1,4 +1,8 @@
#!/bin/bash
cd "$(dirname "$0")"
source venv/bin/activate
python gemini_server.py "$@"
# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Activate the virtual environment and run the server
source "$SCRIPT_DIR/venv/bin/activate"
python "$SCRIPT_DIR/gemini_server.py"