From 6b8331c1aba61e40655c2874d70d879ba17a7813 Mon Sep 17 00:00:00 2001 From: Patryk Ciechanski Date: Thu, 12 Jun 2025 11:57:50 +0200 Subject: [PATCH] docs: Add advanced Docker configuration options to README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added comprehensive configuration section with optional environment variables: Docker Configuration Features: - Advanced configuration example with all available env vars - Complete table of environment variables with descriptions - Practical examples for common configuration scenarios - Clear documentation of config.py options for Docker users Available Configuration Options: - DEFAULT_MODEL: Choose between Pro (quality) vs Flash (speed) - DEFAULT_THINKING_MODE_THINKDEEP: Control token costs with thinking depth - LOG_LEVEL: Debug logging for troubleshooting - MCP_PROJECT_ROOT: Security sandbox for file access - REDIS_URL: Custom Redis configuration Benefits: - Users can customize server behavior without rebuilding images - Better cost control through model and thinking mode selection - Enhanced security through project root restrictions - Improved debugging capabilities with configurable logging - Complete transparency of available configuration options This addresses user request for exposing config.py parameters via Docker environment variables. 🤖 Generated with Claude Code Co-Authored-By: Claude --- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/README.md b/README.md index 64e99f0..5300b9a 100644 --- a/README.md +++ b/README.md @@ -206,6 +206,63 @@ docker pull ghcr.io/patrykiti/gemini-mcp-server:latest } ``` +**Advanced Configuration (Optional Parameters):** + +You can customize the server behavior by adding additional environment variables: + +```json +{ + "mcpServers": { + "gemini": { + "command": "docker", + "args": [ + "run", "--rm", "-i", + "-e", "GEMINI_API_KEY", + "-e", "DEFAULT_MODEL", + "-e", "DEFAULT_THINKING_MODE_THINKDEEP", + "-e", "LOG_LEVEL", + "-e", "MCP_PROJECT_ROOT", + "ghcr.io/patrykiti/gemini-mcp-server:latest" + ], + "env": { + "GEMINI_API_KEY": "your-gemini-api-key-here", + "DEFAULT_MODEL": "gemini-2.0-flash-exp", + "DEFAULT_THINKING_MODE_THINKDEEP": "medium", + "LOG_LEVEL": "INFO", + "MCP_PROJECT_ROOT": "/Users/yourusername/your-project" + } + } + } +} +``` + +**Available Configuration Options:** + +| Environment Variable | Default Value | Description | +|---------------------|---------------|-------------| +| `GEMINI_API_KEY` | *Required* | Your Google AI Studio API key | +| `DEFAULT_MODEL` | `gemini-2.5-pro-preview-06-05` | Default model: `gemini-2.5-pro-preview-06-05` (Pro) or `gemini-2.0-flash-exp` (Flash) | +| `DEFAULT_THINKING_MODE_THINKDEEP` | `high` | Default thinking depth: `minimal`, `low`, `medium`, `high`, `max` | +| `LOG_LEVEL` | `INFO` | Logging verbosity: `DEBUG`, `INFO`, `WARNING`, `ERROR` | +| `MCP_PROJECT_ROOT` | *Home directory* | Restrict file access to specific project directory | +| `REDIS_URL` | `redis://localhost:6379/0` | Redis connection for conversation threading | + +**Examples:** + +```bash +# Use faster Flash model by default +"DEFAULT_MODEL": "gemini-2.0-flash-exp" + +# Use lower thinking mode to save tokens +"DEFAULT_THINKING_MODE_THINKDEEP": "medium" + +# Enable debug logging for troubleshooting +"LOG_LEVEL": "DEBUG" + +# Restrict file access to your project directory +"MCP_PROJECT_ROOT": "/Users/yourusername/my-project" +``` + **Benefits of using published image:** - ✅ **No local build required** - Download and run immediately - ✅ **Always latest stable version** - Automatically updated with releases