gemini-bridge 1.0.1__py3-none-any.whl → 1.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gemini-bridge
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: Lightweight MCP server bridging Claude Code to Google's Gemini AI via official CLI
5
5
  Author-email: Shelakh <info@shelakh.com>
6
6
  License-Expression: MIT
@@ -29,7 +29,9 @@ Dynamic: license-file
29
29
  ![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)
30
30
  ![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)
31
31
  ![MCP Compatible](https://img.shields.io/badge/MCP-compatible-green.svg)
32
- A lightweight MCP (Model Context Protocol) server that enables Claude Code to interact with Google's Gemini AI through the official CLI. Designed for simplicity, reliability, and seamless integration.
32
+ ![Gemini CLI](https://img.shields.io/badge/Gemini-CLI-blue.svg)
33
+
34
+ A lightweight MCP (Model Context Protocol) server that enables AI coding assistants to interact with Google's Gemini AI through the official CLI. Works with Claude Code, Cursor, VS Code, and other MCP-compatible clients. Designed for simplicity, reliability, and seamless integration.
33
35
 
34
36
  ## ✨ Features
35
37
 
@@ -39,6 +41,7 @@ A lightweight MCP (Model Context Protocol) server that enables Claude Code to in
39
41
  - **Production Ready**: Robust error handling with configurable 60-second timeouts
40
42
  - **Minimal Dependencies**: Only requires `mcp>=1.0.0` and Gemini CLI
41
43
  - **Easy Deployment**: Support for both uvx and traditional pip installation
44
+ - **Universal MCP Compatibility**: Works with any MCP-compatible AI coding assistant
42
45
 
43
46
  ## 🚀 Quick Start
44
47
 
@@ -95,6 +98,313 @@ pip install -e .
95
98
  claude mcp add gemini-bridge-dev -s user -- python -m src
96
99
  ```
97
100
 
101
+ ## 🌐 Multi-Client Support
102
+
103
+ **Gemini Bridge works with any MCP-compatible AI coding assistant** - the same server supports multiple clients through different configuration methods.
104
+
105
+ ### Supported MCP Clients
106
+ - **Claude Code** ✅ (Default)
107
+ - **Cursor** ✅
108
+ - **VS Code** ✅
109
+ - **Windsurf** ✅
110
+ - **Cline** ✅
111
+ - **Void** ✅
112
+ - **Cherry Studio** ✅
113
+ - **Augment** ✅
114
+ - **Roo Code** ✅
115
+ - **Zencoder** ✅
116
+ - **Any MCP-compatible client** ✅
117
+
118
+ ### Configuration Examples
119
+
120
+ <details>
121
+ <summary><strong>Claude Code</strong> (Default)</summary>
122
+
123
+ ```bash
124
+ # Recommended installation
125
+ claude mcp add gemini-bridge -s user -- uvx gemini-bridge
126
+
127
+ # Development installation
128
+ claude mcp add gemini-bridge-dev -s user -- python -m src
129
+ ```
130
+
131
+ </details>
132
+
133
+ <details>
134
+ <summary><strong>Cursor</strong></summary>
135
+
136
+ **Global Configuration** (`~/.cursor/mcp.json`):
137
+ ```json
138
+ {
139
+ "mcpServers": {
140
+ "gemini-bridge": {
141
+ "command": "uvx",
142
+ "args": ["gemini-bridge"],
143
+ "env": {}
144
+ }
145
+ }
146
+ }
147
+ ```
148
+
149
+ **Project-Specific** (`.cursor/mcp.json` in your project):
150
+ ```json
151
+ {
152
+ "mcpServers": {
153
+ "gemini-bridge": {
154
+ "command": "uvx",
155
+ "args": ["gemini-bridge"],
156
+ "env": {}
157
+ }
158
+ }
159
+ }
160
+ ```
161
+
162
+ Go to: `Settings` → `Cursor Settings` → `MCP` → `Add new global MCP server`
163
+
164
+ </details>
165
+
166
+ <details>
167
+ <summary><strong>VS Code</strong></summary>
168
+
169
+ **Configuration** (`.vscode/mcp.json` in your workspace):
170
+ ```json
171
+ {
172
+ "servers": {
173
+ "gemini-bridge": {
174
+ "type": "stdio",
175
+ "command": "uvx",
176
+ "args": ["gemini-bridge"]
177
+ }
178
+ }
179
+ }
180
+ ```
181
+
182
+ **Alternative: Through Extensions**
183
+ 1. Open Extensions view (Ctrl+Shift+X)
184
+ 2. Search for MCP extensions
185
+ 3. Add custom server with command: `uvx gemini-bridge`
186
+
187
+ </details>
188
+
189
+ <details>
190
+ <summary><strong>Windsurf</strong></summary>
191
+
192
+ Add to your Windsurf MCP configuration:
193
+ ```json
194
+ {
195
+ "mcpServers": {
196
+ "gemini-bridge": {
197
+ "command": "uvx",
198
+ "args": ["gemini-bridge"],
199
+ "env": {}
200
+ }
201
+ }
202
+ }
203
+ ```
204
+
205
+ </details>
206
+
207
+ <details>
208
+ <summary><strong>Cline</strong> (VS Code Extension)</summary>
209
+
210
+ 1. Open Cline and click **MCP Servers** in the top navigation
211
+ 2. Select **Installed** tab → **Advanced MCP Settings**
212
+ 3. Add to `cline_mcp_settings.json`:
213
+
214
+ ```json
215
+ {
216
+ "mcpServers": {
217
+ "gemini-bridge": {
218
+ "command": "uvx",
219
+ "args": ["gemini-bridge"],
220
+ "env": {}
221
+ }
222
+ }
223
+ }
224
+ ```
225
+
226
+ </details>
227
+
228
+ <details>
229
+ <summary><strong>Void</strong></summary>
230
+
231
+ Go to: `Settings` → `MCP` → `Add MCP Server`
232
+
233
+ ```json
234
+ {
235
+ "mcpServers": {
236
+ "gemini-bridge": {
237
+ "command": "uvx",
238
+ "args": ["gemini-bridge"],
239
+ "env": {}
240
+ }
241
+ }
242
+ }
243
+ ```
244
+
245
+ </details>
246
+
247
+ <details>
248
+ <summary><strong>Cherry Studio</strong></summary>
249
+
250
+ 1. Navigate to **Settings → MCP Servers → Add Server**
251
+ 2. Fill in the server details:
252
+ - **Name**: `gemini-bridge`
253
+ - **Type**: `STDIO`
254
+ - **Command**: `uvx`
255
+ - **Arguments**: `["gemini-bridge"]`
256
+ 3. Save the configuration
257
+
258
+ </details>
259
+
260
+ <details>
261
+ <summary><strong>Augment</strong></summary>
262
+
263
+ **Using the UI:**
264
+ 1. Click hamburger menu → **Settings** → **Tools**
265
+ 2. Click **+ Add MCP** button
266
+ 3. Enter command: `uvx gemini-bridge`
267
+ 4. Name: **Gemini Bridge**
268
+
269
+ **Manual Configuration:**
270
+ ```json
271
+ "augment.advanced": {
272
+ "mcpServers": [
273
+ {
274
+ "name": "gemini-bridge",
275
+ "command": "uvx",
276
+ "args": ["gemini-bridge"],
277
+ "env": {}
278
+ }
279
+ ]
280
+ }
281
+ ```
282
+
283
+ </details>
284
+
285
+ <details>
286
+ <summary><strong>Roo Code</strong></summary>
287
+
288
+ 1. Go to **Settings → MCP Servers → Edit Global Config**
289
+ 2. Add to `mcp_settings.json`:
290
+
291
+ ```json
292
+ {
293
+ "mcpServers": {
294
+ "gemini-bridge": {
295
+ "command": "uvx",
296
+ "args": ["gemini-bridge"],
297
+ "env": {}
298
+ }
299
+ }
300
+ }
301
+ ```
302
+
303
+ </details>
304
+
305
+ <details>
306
+ <summary><strong>Zencoder</strong></summary>
307
+
308
+ 1. Go to Zencoder menu (...) → **Tools** → **Add Custom MCP**
309
+ 2. Add configuration:
310
+
311
+ ```json
312
+ {
313
+ "command": "uvx",
314
+ "args": ["gemini-bridge"],
315
+ "env": {}
316
+ }
317
+ ```
318
+
319
+ 3. Hit the **Install** button
320
+
321
+ </details>
322
+
323
+ <details>
324
+ <summary><strong>Alternative Installation Methods</strong></summary>
325
+
326
+ **For pip-based installations:**
327
+ ```json
328
+ {
329
+ "command": "gemini-bridge",
330
+ "args": [],
331
+ "env": {}
332
+ }
333
+ ```
334
+
335
+ **For development/local testing:**
336
+ ```json
337
+ {
338
+ "command": "python",
339
+ "args": ["-m", "src"],
340
+ "env": {},
341
+ "cwd": "/path/to/gemini-bridge"
342
+ }
343
+ ```
344
+
345
+ **For npm-style installation** (if needed):
346
+ ```json
347
+ {
348
+ "command": "npx",
349
+ "args": ["gemini-bridge"],
350
+ "env": {}
351
+ }
352
+ ```
353
+
354
+ </details>
355
+
356
+ ### Universal Usage
357
+
358
+ Once configured with any client, use the same two tools:
359
+
360
+ 1. **Ask general questions**: "What authentication patterns are used in this codebase?"
361
+ 2. **Analyze specific files**: "Review these auth files for security issues"
362
+
363
+ **The server implementation is identical** - only the client configuration differs!
364
+
365
+ ## ⚙️ Configuration
366
+
367
+ ### Timeout Configuration
368
+
369
+ By default, Gemini Bridge uses a 60-second timeout for all CLI operations. For longer queries (large files, complex analysis), you can configure a custom timeout using the `GEMINI_BRIDGE_TIMEOUT` environment variable.
370
+
371
+ **Example configurations:**
372
+
373
+ <details>
374
+ <summary><strong>Claude Code</strong></summary>
375
+
376
+ ```bash
377
+ # Add with custom timeout (120 seconds)
378
+ claude mcp add gemini-bridge -s user --env GEMINI_BRIDGE_TIMEOUT=120 -- uvx gemini-bridge
379
+ ```
380
+
381
+ </details>
382
+
383
+ <details>
384
+ <summary><strong>Manual Configuration (mcp_settings.json)</strong></summary>
385
+
386
+ ```json
387
+ {
388
+ "mcpServers": {
389
+ "gemini-bridge": {
390
+ "command": "uvx",
391
+ "args": ["gemini-bridge"],
392
+ "env": {
393
+ "GEMINI_BRIDGE_TIMEOUT": "120"
394
+ }
395
+ }
396
+ }
397
+ }
398
+ ```
399
+
400
+ </details>
401
+
402
+ **Timeout Options:**
403
+ - **Default**: 60 seconds (if not configured)
404
+ - **Range**: Any positive integer (seconds)
405
+ - **Recommended**: 120-300 seconds for large file analysis
406
+ - **Invalid values**: Fall back to 60 seconds with warning
407
+
98
408
  ## 🛠️ Available Tools
99
409
 
100
410
  ### `consult_gemini`
@@ -0,0 +1,9 @@
1
+ gemini_bridge-1.0.2.dist-info/licenses/LICENSE,sha256=yTz_R8ocWu64Eubxr6vdZCKRS0dB_Pi3RbjUNn4qPxQ,1063
2
+ src/__init__.py,sha256=XwIQ60BQ748HOAFYiRvDP4HWUonSZfGNvNv6-YnuKgc,190
3
+ src/__main__.py,sha256=12FoIYCXYYKu2_BYX1GS_h9E9qO41Q26B8zedRIDPBs,149
4
+ src/mcp_server.py,sha256=vYykaYMSNtkwOB94VZPvnJ2fuBZkKgnqcoYL12ZM20k,7722
5
+ gemini_bridge-1.0.2.dist-info/METADATA,sha256=UF7tWNaTxoCL6unvjkWKnjwp8cFzrz1X6k3dDfWKOu4,13798
6
+ gemini_bridge-1.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ gemini_bridge-1.0.2.dist-info/entry_points.txt,sha256=ygWf0B23Gygq8mW_GzPx8rxIA19RR_RH4RG2I15lU3E,43
8
+ gemini_bridge-1.0.2.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
9
+ gemini_bridge-1.0.2.dist-info/RECORD,,
src/__init__.py CHANGED
@@ -5,5 +5,5 @@ Version 1.0.0 - Production ready, radically simplified.
5
5
 
6
6
  from .mcp_server import main
7
7
 
8
- __version__ = "1.0.1"
8
+ __version__ = "1.0.2"
9
9
  __all__ = ["main"]
src/mcp_server.py CHANGED
@@ -1,11 +1,12 @@
1
1
  #!/usr/bin/env python3
2
2
  """
3
3
  Gemini MCP Server - Simple CLI Bridge
4
- Version 1.0.0
4
+ Version 1.0.2
5
5
  A minimal MCP server to interface with Gemini AI via the gemini CLI.
6
6
  Created by @shelakh/elyin
7
7
  """
8
8
 
9
+ import logging
9
10
  import os
10
11
  import shutil
11
12
  import subprocess
@@ -40,6 +41,29 @@ def _normalize_model_name(model: Optional[str]) -> str:
40
41
  return "gemini-2.5-flash"
41
42
 
42
43
 
44
+ def _get_timeout() -> int:
45
+ """
46
+ Get the timeout value from environment variable GEMINI_BRIDGE_TIMEOUT.
47
+ Defaults to 60 seconds if not set or invalid.
48
+
49
+ Returns:
50
+ Timeout value in seconds (positive integer)
51
+ """
52
+ timeout_str = os.getenv("GEMINI_BRIDGE_TIMEOUT")
53
+ if not timeout_str:
54
+ return 60
55
+
56
+ try:
57
+ timeout = int(timeout_str)
58
+ if timeout <= 0:
59
+ logging.warning("Invalid GEMINI_BRIDGE_TIMEOUT value '%s' (must be positive). Using default 60 seconds.", timeout_str)
60
+ return 60
61
+ return timeout
62
+ except ValueError:
63
+ logging.warning("Invalid GEMINI_BRIDGE_TIMEOUT value '%s' (must be integer). Using default 60 seconds.", timeout_str)
64
+ return 60
65
+
66
+
43
67
  def execute_gemini_simple(query: str, directory: str = ".", model: Optional[str] = None) -> str:
44
68
  """
45
69
  Execute gemini CLI command for simple queries without file attachments.
@@ -65,13 +89,14 @@ def execute_gemini_simple(query: str, directory: str = ".", model: Optional[str]
65
89
  cmd = ["gemini", "-m", selected_model]
66
90
 
67
91
  # Execute CLI command - simple timeout, no retries
92
+ timeout = _get_timeout()
68
93
  try:
69
94
  result = subprocess.run(
70
95
  cmd,
71
96
  cwd=directory,
72
97
  capture_output=True,
73
98
  text=True,
74
- timeout=60,
99
+ timeout=timeout,
75
100
  input=query
76
101
  )
77
102
 
@@ -81,7 +106,7 @@ def execute_gemini_simple(query: str, directory: str = ".", model: Optional[str]
81
106
  return f"Gemini CLI Error: {result.stderr.strip()}"
82
107
 
83
108
  except subprocess.TimeoutExpired:
84
- return "Error: Gemini CLI command timed out after 60 seconds"
109
+ return f"Error: Gemini CLI command timed out after {timeout} seconds"
85
110
  except Exception as e:
86
111
  return f"Error executing Gemini CLI: {str(e)}"
87
112
 
@@ -136,13 +161,14 @@ def execute_gemini_with_files(query: str, directory: str = ".", files: Optional[
136
161
  stdin_content = "\n\n".join(file_contents) + "\n\n" + query
137
162
 
138
163
  # Execute CLI command - simple timeout, no retries
164
+ timeout = _get_timeout()
139
165
  try:
140
166
  result = subprocess.run(
141
167
  cmd,
142
168
  cwd=directory,
143
169
  capture_output=True,
144
170
  text=True,
145
- timeout=60,
171
+ timeout=timeout,
146
172
  input=stdin_content
147
173
  )
148
174
 
@@ -152,7 +178,7 @@ def execute_gemini_with_files(query: str, directory: str = ".", files: Optional[
152
178
  return f"Gemini CLI Error: {result.stderr.strip()}"
153
179
 
154
180
  except subprocess.TimeoutExpired:
155
- return "Error: Gemini CLI command timed out after 60 seconds"
181
+ return f"Error: Gemini CLI command timed out after {timeout} seconds"
156
182
  except Exception as e:
157
183
  return f"Error executing Gemini CLI: {str(e)}"
158
184
 
@@ -1,9 +0,0 @@
1
- gemini_bridge-1.0.1.dist-info/licenses/LICENSE,sha256=yTz_R8ocWu64Eubxr6vdZCKRS0dB_Pi3RbjUNn4qPxQ,1063
2
- src/__init__.py,sha256=4DkVQMA4JJ2eUEDNpi3sMJh94joDfaG_52p7Dro6cQI,190
3
- src/__main__.py,sha256=12FoIYCXYYKu2_BYX1GS_h9E9qO41Q26B8zedRIDPBs,149
4
- src/mcp_server.py,sha256=SGdrmNMvpCvJseSvvMlBGvDS71RkwWS7yM4JnSPg_Yg,6871
5
- gemini_bridge-1.0.1.dist-info/METADATA,sha256=C6gVIb1Z2OHpAPHA8F2_Ub42E6InC3ROjZTYEfqjONI,7825
6
- gemini_bridge-1.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- gemini_bridge-1.0.1.dist-info/entry_points.txt,sha256=ygWf0B23Gygq8mW_GzPx8rxIA19RR_RH4RG2I15lU3E,43
8
- gemini_bridge-1.0.1.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
9
- gemini_bridge-1.0.1.dist-info/RECORD,,