From 149a58d0427a291a8d82a8245e669ca6989e4ebb Mon Sep 17 00:00:00 2001 From: Fahad Date: Sun, 8 Jun 2025 20:18:18 +0400 Subject: [PATCH] feat: Simplify configuration with run_gemini scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- README.md | 19 +++++++++++++++---- claude_config_example.json | 3 +-- run_gemini.bat | 9 +++++++++ run_gemini.sh | 10 +++++++--- 4 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 run_gemini.bat diff --git a/README.md b/README.md index 3309a1a..4a16e6e 100644 --- a/README.md +++ b/README.md @@ -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" } diff --git a/claude_config_example.json b/claude_config_example.json index 6683529..bf85cb2 100644 --- a/claude_config_example.json +++ b/claude_config_example.json @@ -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" } diff --git a/run_gemini.bat b/run_gemini.bat new file mode 100644 index 0000000..b0e3ca5 --- /dev/null +++ b/run_gemini.bat @@ -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" \ No newline at end of file diff --git a/run_gemini.sh b/run_gemini.sh index 55976bc..aef5a72 100755 --- a/run_gemini.sh +++ b/run_gemini.sh @@ -1,4 +1,8 @@ #!/bin/bash -cd "$(dirname "$0")" -source venv/bin/activate -python gemini_server.py "$@" \ No newline at end of file + +# 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" \ No newline at end of file