@houtini/gemini-mcp 1.3.1 → 1.3.3
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.
- package/README.md +784 -940
- package/dist/cli.js +5 -10
- package/dist/cli.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +4 -41
- package/dist/config/index.js.map +1 -1
- package/dist/config/types.js +1 -2
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +182 -90
- package/dist/index.js.map +1 -1
- package/dist/services/base-service.js +3 -10
- package/dist/services/base-service.js.map +1 -1
- package/dist/services/gemini/index.d.ts +3 -3
- package/dist/services/gemini/index.d.ts.map +1 -1
- package/dist/services/gemini/index.js +20 -24
- package/dist/services/gemini/index.js.map +1 -1
- package/dist/services/gemini/types.js +1 -2
- package/dist/tools/gemini-chat.d.ts +1 -1
- package/dist/tools/gemini-chat.d.ts.map +1 -1
- package/dist/tools/gemini-chat.js +10 -17
- package/dist/tools/gemini-chat.js.map +1 -1
- package/dist/tools/gemini-deep-research.d.ts +1 -1
- package/dist/tools/gemini-deep-research.d.ts.map +1 -1
- package/dist/tools/gemini-deep-research.js +24 -31
- package/dist/tools/gemini-deep-research.js.map +1 -1
- package/dist/tools/gemini-list-models.d.ts +1 -1
- package/dist/tools/gemini-list-models.d.ts.map +1 -1
- package/dist/tools/gemini-list-models.js +7 -14
- package/dist/tools/gemini-list-models.js.map +1 -1
- package/dist/utils/error-handler.js +7 -18
- package/dist/utils/error-handler.js.map +1 -1
- package/dist/utils/logger.js +4 -39
- package/dist/utils/logger.js.map +1 -1
- package/package.json +7 -5
- package/dist/tools/gemini-describe-video.d.ts +0 -38
- package/dist/tools/gemini-describe-video.d.ts.map +0 -1
- package/dist/tools/gemini-describe-video.js +0 -196
- package/dist/tools/gemini-describe-video.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,940 +1,784 @@
|
|
|
1
|
-
# Gemini MCP Server
|
|
2
|
-
|
|
3
|
-
[![
|
|
4
|
-
[![
|
|
5
|
-
[![
|
|
6
|
-
[![
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
npx
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
###
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
-
|
|
280
|
-
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
-
|
|
408
|
-
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
Use
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
```
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
###
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
```
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
###
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
}
|
|
615
|
-
```
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
**
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
"command": "npx",
|
|
786
|
-
"args": ["@houtini/gemini-mcp"],
|
|
787
|
-
"env": {
|
|
788
|
-
"GEMINI_API_KEY": "your-api-key-here",
|
|
789
|
-
"LOG_LEVEL": "debug"
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
```
|
|
795
|
-
|
|
796
|
-
### Log Files
|
|
797
|
-
|
|
798
|
-
Logs are written to:
|
|
799
|
-
- **Console output** (visible in Claude Desktop developer tools)
|
|
800
|
-
- **`logs/combined.log`** - All log levels
|
|
801
|
-
- **`logs/error.log`** - Error logs only
|
|
802
|
-
|
|
803
|
-
### Testing Your Setup
|
|
804
|
-
|
|
805
|
-
Test the server with these Claude queries:
|
|
806
|
-
|
|
807
|
-
1. **Basic connectivity**: "Can you list the available Gemini models?"
|
|
808
|
-
2. **Simple chat**: "Use Gemini to explain photosynthesis."
|
|
809
|
-
3. **Advanced features**: "Use Gemini 1.5 Pro with temperature 0.9 to write a creative poem about coding."
|
|
810
|
-
|
|
811
|
-
### Performance Tuning
|
|
812
|
-
|
|
813
|
-
For better performance:
|
|
814
|
-
|
|
815
|
-
1. **Adjust token limits** based on your use case
|
|
816
|
-
2. **Use appropriate models** (Flash for speed, Pro for complex tasks)
|
|
817
|
-
3. **Monitor logs** for rate limiting or API issues
|
|
818
|
-
4. **Set reasonable temperature values** (0.7 for balanced, 0.3 for focused, 0.9 for creative)
|
|
819
|
-
|
|
820
|
-
## Contributing
|
|
821
|
-
|
|
822
|
-
Contributions are welcome! Please follow these steps:
|
|
823
|
-
|
|
824
|
-
1. **Fork the repository**
|
|
825
|
-
2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
|
|
826
|
-
3. **Make your changes** and add tests if applicable
|
|
827
|
-
4. **Ensure all tests pass**: `npm test`
|
|
828
|
-
5. **Lint your code**: `npm run lint:fix`
|
|
829
|
-
6. **Build the project**: `npm run build`
|
|
830
|
-
7. **Commit your changes**: `git commit -m 'Add amazing feature'`
|
|
831
|
-
8. **Push to the branch**: `git push origin feature/amazing-feature`
|
|
832
|
-
9. **Open a Pull Request**
|
|
833
|
-
|
|
834
|
-
### Development Guidelines
|
|
835
|
-
|
|
836
|
-
- Follow TypeScript best practices
|
|
837
|
-
- Add tests for new functionality
|
|
838
|
-
- Update documentation as needed
|
|
839
|
-
- Use conventional commit messages
|
|
840
|
-
- Ensure backwards compatibility
|
|
841
|
-
|
|
842
|
-
## License
|
|
843
|
-
|
|
844
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
845
|
-
|
|
846
|
-
## Disclaimer and Important Information
|
|
847
|
-
|
|
848
|
-
**Use at Your Own Risk**: This software is provided "as is" without warranty of any kind, express or implied. The authors and contributors accept no responsibility for any damages, data loss, security breaches, or other issues arising from the use of this software.
|
|
849
|
-
|
|
850
|
-
**Content Safety**: This MCP server interfaces with Google's Gemini AI models. Whilst the server implements content safety settings, the quality and appropriateness of AI-generated content cannot be guaranteed. Users are responsible for:
|
|
851
|
-
- Reviewing AI-generated content before use
|
|
852
|
-
- Ensuring compliance with applicable laws and regulations
|
|
853
|
-
- Implementing additional safety measures as needed for their use case
|
|
854
|
-
|
|
855
|
-
**API Key Security**: Your Google Gemini API key is sensitive credential information. Users are responsible for:
|
|
856
|
-
- Keeping API keys confidential and secure
|
|
857
|
-
- Not committing API keys to version control
|
|
858
|
-
- Rotating keys if exposure is suspected
|
|
859
|
-
- Managing API usage and associated costs
|
|
860
|
-
|
|
861
|
-
**Data Privacy**: This server processes data sent through the Model Context Protocol. Users should:
|
|
862
|
-
- Avoid sending sensitive, personal, or confidential information
|
|
863
|
-
- Review Google's privacy policy and terms of service
|
|
864
|
-
- Understand that data may be processed by Google's services
|
|
865
|
-
- Implement appropriate data handling policies
|
|
866
|
-
|
|
867
|
-
**Production Use**: Whilst designed with professional standards, users deploying this in production environments should:
|
|
868
|
-
- Conduct their own security audits
|
|
869
|
-
- Implement appropriate monitoring and logging
|
|
870
|
-
- Have incident response procedures
|
|
871
|
-
- Regularly update dependencies
|
|
872
|
-
|
|
873
|
-
**Third-Party Services**: This software relies on external services (Google Gemini API, npm packages). Service availability, pricing, and functionality may change without notice.
|
|
874
|
-
|
|
875
|
-
**No Professional Advice**: Content generated by AI models should not be considered professional advice (legal, medical, financial, etc.) without proper verification by qualified professionals.
|
|
876
|
-
|
|
877
|
-
By using this software, you acknowledge that you have read this disclaimer and agree to use the software at your own risk.
|
|
878
|
-
|
|
879
|
-
## Support
|
|
880
|
-
|
|
881
|
-
- **GitHub Issues**: [Report bugs or request features](https://github.com/houtini-ai/gemini-mcp/issues)
|
|
882
|
-
- **GitHub Discussions**: [Ask questions or share ideas](https://github.com/houtini-ai/gemini-mcp/discussions)
|
|
883
|
-
|
|
884
|
-
## Changelog
|
|
885
|
-
|
|
886
|
-
### v1.0.4
|
|
887
|
-
|
|
888
|
-
**Security and Dependency Updates**
|
|
889
|
-
- Updated @google/generative-ai to v0.24.1 (from v0.21.0)
|
|
890
|
-
- Updated @modelcontextprotocol/sdk to v1.19.1 (from v1.18.1)
|
|
891
|
-
- Updated winston, typescript, and other development dependencies
|
|
892
|
-
- Changed default safety settings from BLOCK_NONE to BLOCK_MEDIUM_AND_ABOVE for better content safety
|
|
893
|
-
- Added comprehensive disclaimer section covering usage risks, API security, and data privacy
|
|
894
|
-
- All dependencies audited with zero vulnerabilities
|
|
895
|
-
|
|
896
|
-
### v1.1.0
|
|
897
|
-
|
|
898
|
-
**Deep Research & Enhanced Model Discovery**
|
|
899
|
-
- Added deep research capability for iterative multi-step analysis
|
|
900
|
-
- Enhanced model discovery with better filtering
|
|
901
|
-
- Improved default model selection logic
|
|
902
|
-
- Better handling of experimental vs stable models
|
|
903
|
-
- Documentation updates to reflect dynamic discovery
|
|
904
|
-
|
|
905
|
-
### v1.0.3
|
|
906
|
-
|
|
907
|
-
**Enhanced Google Search Grounding**
|
|
908
|
-
- Fixed grounding metadata field name issues for improved reliability
|
|
909
|
-
- Enhanced source citation processing and display
|
|
910
|
-
- Verified compatibility with latest Google Generative AI SDK (v0.21.0)
|
|
911
|
-
- Comprehensive grounding documentation and usage examples
|
|
912
|
-
- Resolved field naming inconsistencies in grounding response handling
|
|
913
|
-
- Improved grounding metadata debugging and error handling
|
|
914
|
-
|
|
915
|
-
### v1.0.2
|
|
916
|
-
|
|
917
|
-
**Google Search Grounding Introduction**
|
|
918
|
-
- Added Google Search grounding functionality enabled by default
|
|
919
|
-
- Real-time web search integration for current information and facts
|
|
920
|
-
- Grounding metadata in responses with source citations
|
|
921
|
-
- Configurable grounding parameter in chat requests
|
|
922
|
-
- Enhanced accuracy for current events, news, and factual queries
|
|
923
|
-
|
|
924
|
-
### v1.0.0
|
|
925
|
-
|
|
926
|
-
**Initial Release**
|
|
927
|
-
- Complete Node.js/TypeScript rewrite from Python
|
|
928
|
-
- Professional modular architecture with services pattern
|
|
929
|
-
- Comprehensive error handling and logging system
|
|
930
|
-
- Full MCP protocol compliance
|
|
931
|
-
- Support for multiple Gemini models
|
|
932
|
-
- NPM package distribution ready
|
|
933
|
-
- Enterprise-grade configuration management
|
|
934
|
-
- Production-ready build system
|
|
935
|
-
|
|
936
|
-
---
|
|
937
|
-
|
|
938
|
-
**Built with care for the Model Context Protocol community**
|
|
939
|
-
|
|
940
|
-
For more information about MCP, visit [modelcontextprotocol.io](https://modelcontextprotocol.io)
|
|
1
|
+
# Gemini MCP Server
|
|
2
|
+
|
|
3
|
+
[](https://smithery.ai/server/@houtini/gemini-mcp)
|
|
4
|
+
[](https://www.npmjs.com/package/@houtini/gemini-mcp)
|
|
5
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://modelcontextprotocol.io)
|
|
8
|
+
|
|
9
|
+
A production-ready Model Context Protocol server for Google's Gemini AI models. I've built this with TypeScript and the latest MCP SDK (1.25.3), focusing on real-world reliability rather than feature bloat.
|
|
10
|
+
|
|
11
|
+
## What This Does
|
|
12
|
+
|
|
13
|
+
This server connects Claude Desktop (or any MCP client) to Google's Gemini models. The integration is straightforward: chat with Gemini, get model information, and run deep research tasks with Google Search grounding built in.
|
|
14
|
+
|
|
15
|
+
What I think matters here: the server discovers available models automatically from Google's API, which means you're always working with the latest releases without updating configuration files. No hardcoded model lists that go stale.
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
The simplest way to use this is with `npx` - no installation required:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Get your API key from Google AI Studio first
|
|
23
|
+
# https://makersuite.google.com/app/apikey
|
|
24
|
+
|
|
25
|
+
# Test it works (optional)
|
|
26
|
+
npx @houtini/gemini-mcp
|
|
27
|
+
|
|
28
|
+
# Add to Claude Desktop (configuration below)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Installation Options
|
|
32
|
+
|
|
33
|
+
### Recommended: npx (No Installation)
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx @houtini/gemini-mcp
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This approach pulls the latest version automatically. I prefer this because you don't clutter your system with global packages, and updates happen transparently.
|
|
40
|
+
|
|
41
|
+
### Alternative: Global Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install -g @houtini/gemini-mcp
|
|
45
|
+
gemini-mcp
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Alternative: Local Project
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm install @houtini/gemini-mcp
|
|
52
|
+
npx @houtini/gemini-mcp
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### From Source (Developers)
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
git clone https://github.com/houtini-ai/gemini-mcp.git
|
|
59
|
+
cd gemini-mcp
|
|
60
|
+
npm install
|
|
61
|
+
npm run build
|
|
62
|
+
npm start
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Configuration
|
|
66
|
+
|
|
67
|
+
### Step 1: Get Your API Key
|
|
68
|
+
|
|
69
|
+
Visit [Google AI Studio](https://makersuite.google.com/app/apikey) to create a free API key. This takes about 30 seconds.
|
|
70
|
+
|
|
71
|
+
### Step 2: Configure Claude Desktop
|
|
72
|
+
|
|
73
|
+
Add this to your Claude Desktop config file:
|
|
74
|
+
|
|
75
|
+
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
76
|
+
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
77
|
+
|
|
78
|
+
#### Using npx (Recommended)
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"mcpServers": {
|
|
83
|
+
"gemini": {
|
|
84
|
+
"command": "npx",
|
|
85
|
+
"args": ["@houtini/gemini-mcp"],
|
|
86
|
+
"env": {
|
|
87
|
+
"GEMINI_API_KEY": "your-api-key-here"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
#### Using Global Installation
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"mcpServers": {
|
|
99
|
+
"gemini": {
|
|
100
|
+
"command": "gemini-mcp",
|
|
101
|
+
"env": {
|
|
102
|
+
"GEMINI_API_KEY": "your-api-key-here"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Requires `npm install -g @houtini/gemini-mcp` first.
|
|
110
|
+
|
|
111
|
+
#### Using Local Build
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"mcpServers": {
|
|
116
|
+
"gemini": {
|
|
117
|
+
"command": "node",
|
|
118
|
+
"args": ["./node_modules/@houtini/gemini-mcp/dist/index.js"],
|
|
119
|
+
"env": {
|
|
120
|
+
"GEMINI_API_KEY": "your-api-key-here"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Only works if installed locally in the current directory.
|
|
128
|
+
|
|
129
|
+
### Step 3: Restart Claude Desktop
|
|
130
|
+
|
|
131
|
+
After updating the config, restart Claude Desktop. The server loads on startup.
|
|
132
|
+
|
|
133
|
+
### Optional: Additional Configuration
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"mcpServers": {
|
|
138
|
+
"gemini": {
|
|
139
|
+
"command": "npx",
|
|
140
|
+
"args": ["@houtini/gemini-mcp"],
|
|
141
|
+
"env": {
|
|
142
|
+
"GEMINI_API_KEY": "your-api-key-here",
|
|
143
|
+
"LOG_LEVEL": "info",
|
|
144
|
+
"GEMINI_ALLOW_EXPERIMENTAL": "false"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Environment Variables:**
|
|
152
|
+
|
|
153
|
+
| Variable | Default | What It Does |
|
|
154
|
+
|----------|---------|--------------|
|
|
155
|
+
| `GEMINI_API_KEY` | *required* | Your Google AI Studio API key |
|
|
156
|
+
| `LOG_LEVEL` | `info` | Logging detail: `debug`, `info`, `warn`, `error` |
|
|
157
|
+
| `GEMINI_ALLOW_EXPERIMENTAL` | `false` | Include experimental models (set `true` to enable) |
|
|
158
|
+
|
|
159
|
+
## Dynamic Model Discovery
|
|
160
|
+
|
|
161
|
+
The server automatically discovers available Gemini models from Google's API on first use. This happens transparently - you don't need to configure anything.
|
|
162
|
+
|
|
163
|
+
### How It Works
|
|
164
|
+
|
|
165
|
+
1. Server starts instantly with reliable fallback models
|
|
166
|
+
2. First request triggers model discovery from Google's API (adds 1-2 seconds once)
|
|
167
|
+
3. Subsequent requests use the discovered models (no delay)
|
|
168
|
+
4. If discovery fails, fallback models work immediately
|
|
169
|
+
|
|
170
|
+
What I've found: this approach keeps you current with Google's releases whilst maintaining instant startup. The server filters to stable production models by default, which avoids experimental model rate limits.
|
|
171
|
+
|
|
172
|
+
### What Gets Discovered
|
|
173
|
+
|
|
174
|
+
- All available Gemini models (stable and experimental)
|
|
175
|
+
- Accurate context window sizes directly from Google
|
|
176
|
+
- Model capabilities and recommended use cases
|
|
177
|
+
- Latest releases as soon as Google makes them available
|
|
178
|
+
|
|
179
|
+
The default model selection prioritises: stable models over experimental, newest version available, Flash variants for speed, and capability matching for your request type.
|
|
180
|
+
|
|
181
|
+
### Performance Impact
|
|
182
|
+
|
|
183
|
+
- Startup: 0ms (instant)
|
|
184
|
+
- First request: +1-2 seconds (one-time discovery)
|
|
185
|
+
- Subsequent requests: 0ms overhead
|
|
186
|
+
- Discovery failure: 0ms (uses fallback immediately)
|
|
187
|
+
|
|
188
|
+
Check your logs after first request to see what was discovered:
|
|
189
|
+
```
|
|
190
|
+
Models discovered from API (count: 38, defaultModel: gemini-2.5-flash)
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Experimental Models
|
|
194
|
+
|
|
195
|
+
By default, the server uses stable production models. This ensures reliable performance and avoids Google's stricter rate limits on experimental releases.
|
|
196
|
+
|
|
197
|
+
### Stable vs Experimental
|
|
198
|
+
|
|
199
|
+
**Stable Models** (default behaviour):
|
|
200
|
+
- Production-ready
|
|
201
|
+
- Better rate limits
|
|
202
|
+
- Consistent performance
|
|
203
|
+
- Examples: `gemini-2.5-flash`, `gemini-2.5-pro`, `gemini-2.0-flash`
|
|
204
|
+
|
|
205
|
+
**Experimental Models** (opt-in):
|
|
206
|
+
- Latest features before stable release
|
|
207
|
+
- Stricter rate limits
|
|
208
|
+
- Potentially unexpected behaviour
|
|
209
|
+
- Can be deprecated quickly
|
|
210
|
+
- Examples: `gemini-exp-1206`, `gemini-2.0-flash-thinking-exp`
|
|
211
|
+
|
|
212
|
+
### Enabling Experimental Models
|
|
213
|
+
|
|
214
|
+
Set `GEMINI_ALLOW_EXPERIMENTAL=true` in your configuration:
|
|
215
|
+
|
|
216
|
+
```json
|
|
217
|
+
{
|
|
218
|
+
"mcpServers": {
|
|
219
|
+
"gemini": {
|
|
220
|
+
"command": "npx",
|
|
221
|
+
"args": ["@houtini/gemini-mcp"],
|
|
222
|
+
"env": {
|
|
223
|
+
"GEMINI_API_KEY": "your-api-key-here",
|
|
224
|
+
"GEMINI_ALLOW_EXPERIMENTAL": "true"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
This includes experimental models in discovery and makes them eligible as defaults. You can still explicitly request any model regardless of this setting - the flag only affects which models are used automatically.
|
|
232
|
+
|
|
233
|
+
### When to Enable
|
|
234
|
+
|
|
235
|
+
Keep experimental disabled if you need reliable, consistent performance or you're building production applications.
|
|
236
|
+
|
|
237
|
+
Enable experimental if you're testing cutting-edge features, doing research, or you understand the rate limit trade-offs.
|
|
238
|
+
|
|
239
|
+
## Usage Examples
|
|
240
|
+
|
|
241
|
+
### Basic Chat
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
Can you help me understand quantum computing using Gemini?
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Claude automatically uses the `gemini_chat` tool.
|
|
248
|
+
|
|
249
|
+
### Creative Writing
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
Use Gemini to write a short story about artificial intelligence discovering creativity.
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Technical Analysis
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
Use Gemini Pro to explain the differences between various machine learning algorithms.
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Model Selection
|
|
262
|
+
|
|
263
|
+
```
|
|
264
|
+
Use Gemini 1.5 Pro to analyse this code and suggest improvements.
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Getting Model Information
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
Show me all available Gemini models and their capabilities.
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Complete Prompting Guide
|
|
276
|
+
|
|
277
|
+
Check the **[Comprehensive Prompting Guide](PROMPTING_GUIDE.md)** for:
|
|
278
|
+
|
|
279
|
+
- Advanced prompting techniques
|
|
280
|
+
- Model selection strategies
|
|
281
|
+
- Parameter tuning (temperature, tokens, system prompts)
|
|
282
|
+
- Using Google Search grounding
|
|
283
|
+
- Creative workflows and use cases
|
|
284
|
+
- Best practices
|
|
285
|
+
- Troubleshooting
|
|
286
|
+
|
|
287
|
+
**[Read the Prompting Guide](PROMPTING_GUIDE.md)**
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## Google Search Grounding
|
|
292
|
+
|
|
293
|
+
Google Search grounding is built in and enabled by default. This gives Gemini models access to current web information, which significantly improves accuracy for questions requiring up-to-date data.
|
|
294
|
+
|
|
295
|
+
### What It Does
|
|
296
|
+
|
|
297
|
+
When you ask a question that benefits from current information:
|
|
298
|
+
1. Analyses your query to determine if web search helps
|
|
299
|
+
2. Generates relevant search queries automatically
|
|
300
|
+
3. Performs Google searches using targeted queries
|
|
301
|
+
4. Processes results and synthesises information
|
|
302
|
+
5. Provides enhanced response with inline citations
|
|
303
|
+
6. Shows search metadata including queries used
|
|
304
|
+
|
|
305
|
+
### Best Use Cases
|
|
306
|
+
|
|
307
|
+
**Current Events & News**
|
|
308
|
+
```
|
|
309
|
+
What are the latest developments in AI announced this month?
|
|
310
|
+
Recent breakthroughs in quantum computing research?
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
**Real-time Data**
|
|
314
|
+
```
|
|
315
|
+
Current stock prices for major tech companies
|
|
316
|
+
Today's weather forecast for London
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Recent Developments**
|
|
320
|
+
```
|
|
321
|
+
New software releases this week
|
|
322
|
+
Latest scientific discoveries in medicine
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
**Fact Checking**
|
|
326
|
+
```
|
|
327
|
+
Verify recent statements about climate change
|
|
328
|
+
Check the latest statistics on global internet usage
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Controlling Grounding
|
|
332
|
+
|
|
333
|
+
Grounding is enabled by default. Disable it for purely creative or hypothetical responses:
|
|
334
|
+
|
|
335
|
+
```
|
|
336
|
+
Use Gemini without web search to write a fictional story about dragons in space.
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
For API calls, use the `grounding` parameter:
|
|
340
|
+
|
|
341
|
+
```json
|
|
342
|
+
{
|
|
343
|
+
"message": "Write a creative story about time travel",
|
|
344
|
+
"grounding": false
|
|
345
|
+
}
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Understanding Grounded Responses
|
|
349
|
+
|
|
350
|
+
Grounded responses include source citations and search transparency:
|
|
351
|
+
|
|
352
|
+
```
|
|
353
|
+
Sources: (https://example.com/article1) (https://example.com/article2)
|
|
354
|
+
Search queries used: latest AI developments 2025, OpenAI GPT-5 release
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
What I've found: grounding dramatically reduces hallucinations for factual queries whilst maintaining creative flexibility when you need it.
|
|
358
|
+
|
|
359
|
+
## Deep Research
|
|
360
|
+
|
|
361
|
+
The server includes deep research capability that performs iterative multi-step research on complex topics. This synthesises comprehensive reports with proper citations.
|
|
362
|
+
|
|
363
|
+
### How It Works
|
|
364
|
+
|
|
365
|
+
Deep research conducts multiple research iterations:
|
|
366
|
+
|
|
367
|
+
1. Initial broad exploration
|
|
368
|
+
2. Gap analysis identifying what's missing
|
|
369
|
+
3. Targeted research into specific areas
|
|
370
|
+
4. Synthesis into comprehensive report
|
|
371
|
+
5. Iteration until thorough coverage
|
|
372
|
+
|
|
373
|
+
### Using Deep Research
|
|
374
|
+
|
|
375
|
+
```
|
|
376
|
+
Use Gemini deep research to investigate the impact of quantum computing on cybersecurity.
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
With parameters:
|
|
380
|
+
```
|
|
381
|
+
Use Gemini deep research with 7 iterations to create a comprehensive report on renewable energy trends, focusing on solar and wind power adoption rates.
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Research Parameters
|
|
385
|
+
|
|
386
|
+
| Parameter | Type | Default | What It Does |
|
|
387
|
+
|-----------|------|---------|--------------|
|
|
388
|
+
| `research_question` | string | *required* | The topic to investigate |
|
|
389
|
+
| `max_iterations` | integer | 5 | Research cycles (3-10) |
|
|
390
|
+
| `focus_areas` | array | - | Specific aspects to emphasise |
|
|
391
|
+
| `model` | string | *latest stable* | Which model to use |
|
|
392
|
+
|
|
393
|
+
### Best For
|
|
394
|
+
|
|
395
|
+
- Academic research and literature reviews
|
|
396
|
+
- Market analysis and competitive intelligence
|
|
397
|
+
- Technology trend analysis
|
|
398
|
+
- Policy research and impact assessments
|
|
399
|
+
- Multi-faceted business problems
|
|
400
|
+
|
|
401
|
+
### Configuring Iterations by Environment
|
|
402
|
+
|
|
403
|
+
Different AI environments have different timeout tolerances:
|
|
404
|
+
|
|
405
|
+
**Claude Desktop (3-5 iterations recommended)**
|
|
406
|
+
- Timeout: ~4 minutes
|
|
407
|
+
- Safe maximum: 5 iterations
|
|
408
|
+
- Use 3-4 for most tasks
|
|
409
|
+
|
|
410
|
+
**Agent SDK / IDEs (7-10 iterations recommended)**
|
|
411
|
+
- Timeout: 10+ minutes
|
|
412
|
+
- Maximum: 10 iterations
|
|
413
|
+
- Use 7-10 for comprehensive research
|
|
414
|
+
|
|
415
|
+
**AI Platforms like Cline, Roo-Cline (7-10 iterations)**
|
|
416
|
+
- Similar to Agent SDK
|
|
417
|
+
- Can handle longer processes
|
|
418
|
+
|
|
419
|
+
### Handling Timeouts
|
|
420
|
+
|
|
421
|
+
If you hit timeout or thread limits:
|
|
422
|
+
|
|
423
|
+
1. Reduce iterations (start with 3)
|
|
424
|
+
2. Narrow focus using `focus_areas` parameter
|
|
425
|
+
3. Split complex topics into smaller research tasks
|
|
426
|
+
4. Check which environment you're using
|
|
427
|
+
|
|
428
|
+
Example with focused research:
|
|
429
|
+
```
|
|
430
|
+
Use Gemini deep research with 3 iterations focusing on cost analysis and market adoption to examine solar panel technology trends.
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
Deep research takes several minutes. It's designed for comprehensive analysis rather than quick answers.
|
|
434
|
+
|
|
435
|
+
## API Reference
|
|
436
|
+
|
|
437
|
+
### gemini_chat
|
|
438
|
+
|
|
439
|
+
Chat with Gemini models.
|
|
440
|
+
|
|
441
|
+
**Parameters:**
|
|
442
|
+
|
|
443
|
+
| Parameter | Type | Required | Default | What It Does |
|
|
444
|
+
|-----------|------|----------|---------|--------------|
|
|
445
|
+
| `message` | string | Yes | - | The message to send |
|
|
446
|
+
| `model` | string | No | *Latest stable* | Which model to use |
|
|
447
|
+
| `temperature` | number | No | 0.7 | Randomness (0.0-1.0) |
|
|
448
|
+
| `max_tokens` | integer | No | 8192 | Maximum response length (1-32768) |
|
|
449
|
+
| `system_prompt` | string | No | - | System instruction |
|
|
450
|
+
| `grounding` | boolean | No | true | Enable Google Search |
|
|
451
|
+
|
|
452
|
+
**Example:**
|
|
453
|
+
```json
|
|
454
|
+
{
|
|
455
|
+
"message": "What are the latest developments in quantum computing?",
|
|
456
|
+
"model": "gemini-1.5-pro",
|
|
457
|
+
"temperature": 0.5,
|
|
458
|
+
"max_tokens": 1000,
|
|
459
|
+
"system_prompt": "You are a technology expert. Provide current information with sources.",
|
|
460
|
+
"grounding": true
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
### gemini_list_models
|
|
465
|
+
|
|
466
|
+
Retrieve information about discovered Gemini models.
|
|
467
|
+
|
|
468
|
+
**Parameters:** None required
|
|
469
|
+
|
|
470
|
+
**Example:**
|
|
471
|
+
```json
|
|
472
|
+
{}
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
**Response includes:**
|
|
476
|
+
- Model names and display names
|
|
477
|
+
- Descriptions of strengths
|
|
478
|
+
- Context window sizes from Google
|
|
479
|
+
- Recommended use cases
|
|
480
|
+
|
|
481
|
+
### gemini_deep_research
|
|
482
|
+
|
|
483
|
+
Conduct iterative multi-step research.
|
|
484
|
+
|
|
485
|
+
**Parameters:**
|
|
486
|
+
|
|
487
|
+
| Parameter | Type | Required | Default | What It Does |
|
|
488
|
+
|-----------|------|----------|---------|--------------|
|
|
489
|
+
| `research_question` | string | Yes | - | Topic to research |
|
|
490
|
+
| `max_iterations` | integer | No | 5 | Research cycles (3-10) |
|
|
491
|
+
| `focus_areas` | array | No | - | Specific areas to emphasise |
|
|
492
|
+
| `model` | string | No | *Latest stable* | Model to use |
|
|
493
|
+
|
|
494
|
+
**Example:**
|
|
495
|
+
```json
|
|
496
|
+
{
|
|
497
|
+
"research_question": "Impact of AI on healthcare diagnostics",
|
|
498
|
+
"max_iterations": 7,
|
|
499
|
+
"focus_areas": ["accuracy improvements", "cost implications", "regulatory challenges"]
|
|
500
|
+
}
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
### Available Models
|
|
504
|
+
|
|
505
|
+
Models are dynamically discovered from Google's API. Typical available models:
|
|
506
|
+
|
|
507
|
+
| Model | Best For | Description |
|
|
508
|
+
|-------|----------|-------------|
|
|
509
|
+
| **gemini-2.5-flash** | General use | Latest Flash - fast, versatile |
|
|
510
|
+
| **gemini-2.5-pro** | Complex reasoning | Latest Pro - advanced capabilities |
|
|
511
|
+
| **gemini-2.0-flash** | Speed-optimised | Gemini 2.0 Flash - efficient |
|
|
512
|
+
| **gemini-1.5-flash** | Quick responses | Gemini 1.5 Flash - fast |
|
|
513
|
+
| **gemini-1.5-pro** | Large context | 2M token context window |
|
|
514
|
+
|
|
515
|
+
Use `gemini_list_models` to see exact available models with current context limits.
|
|
516
|
+
|
|
517
|
+
## Development
|
|
518
|
+
|
|
519
|
+
### Building from Source
|
|
520
|
+
|
|
521
|
+
```bash
|
|
522
|
+
git clone https://github.com/houtini-ai/gemini-mcp.git
|
|
523
|
+
cd gemini-mcp
|
|
524
|
+
npm install
|
|
525
|
+
npm run build
|
|
526
|
+
npm run dev
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
### Scripts
|
|
530
|
+
|
|
531
|
+
| Command | What It Does |
|
|
532
|
+
|---------|--------------|
|
|
533
|
+
| `npm run build` | Compile TypeScript |
|
|
534
|
+
| `npm run dev` | Development mode with live reload |
|
|
535
|
+
| `npm start` | Run compiled server |
|
|
536
|
+
| `npm test` | Run tests |
|
|
537
|
+
| `npm run lint` | Check code style |
|
|
538
|
+
| `npm run lint:fix` | Fix linting issues |
|
|
539
|
+
|
|
540
|
+
### Project Structure
|
|
541
|
+
|
|
542
|
+
```
|
|
543
|
+
src/
|
|
544
|
+
├── config/ # Configuration management
|
|
545
|
+
├── services/ # Business logic
|
|
546
|
+
│ └── gemini/ # Gemini API integration
|
|
547
|
+
├── tools/ # MCP tool implementations
|
|
548
|
+
├── utils/ # Logger and error handling
|
|
549
|
+
├── cli.ts # CLI entry
|
|
550
|
+
└── index.ts # Main server
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
### Architecture
|
|
554
|
+
|
|
555
|
+
The server follows clean, layered architecture:
|
|
556
|
+
|
|
557
|
+
1. CLI Layer - Command-line interface
|
|
558
|
+
2. Server Layer - MCP protocol handling
|
|
559
|
+
3. Tools Layer - MCP tool implementations
|
|
560
|
+
4. Service Layer - Business logic and API integration
|
|
561
|
+
5. Utility Layer - Logging and error handling
|
|
562
|
+
|
|
563
|
+
## Troubleshooting
|
|
564
|
+
|
|
565
|
+
### "GEMINI_API_KEY environment variable not set"
|
|
566
|
+
|
|
567
|
+
Check your Claude Desktop configuration includes the API key in the `env` section.
|
|
568
|
+
|
|
569
|
+
### Server Not Appearing in Claude Desktop
|
|
570
|
+
|
|
571
|
+
1. Restart Claude Desktop after configuration changes
|
|
572
|
+
2. Verify config file path:
|
|
573
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
574
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
575
|
+
3. Validate JSON syntax
|
|
576
|
+
4. Test your API key at [Google AI Studio](https://makersuite.google.com/app/apikey)
|
|
577
|
+
|
|
578
|
+
### "Module not found" with npx
|
|
579
|
+
|
|
580
|
+
```bash
|
|
581
|
+
# Clear npx cache
|
|
582
|
+
npx --yes @houtini/gemini-mcp
|
|
583
|
+
|
|
584
|
+
# Or install globally
|
|
585
|
+
npm install -g @houtini/gemini-mcp
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
### Node.js Version Issues
|
|
589
|
+
|
|
590
|
+
```bash
|
|
591
|
+
# Check version
|
|
592
|
+
node --version
|
|
593
|
+
|
|
594
|
+
# Should be v18.0.0 or higher
|
|
595
|
+
# Update from https://nodejs.org
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
### Debug Mode
|
|
599
|
+
|
|
600
|
+
Enable detailed logging:
|
|
601
|
+
|
|
602
|
+
```json
|
|
603
|
+
{
|
|
604
|
+
"mcpServers": {
|
|
605
|
+
"gemini": {
|
|
606
|
+
"command": "npx",
|
|
607
|
+
"args": ["@houtini/gemini-mcp"],
|
|
608
|
+
"env": {
|
|
609
|
+
"GEMINI_API_KEY": "your-api-key-here",
|
|
610
|
+
"LOG_LEVEL": "debug"
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
### Log Files
|
|
618
|
+
|
|
619
|
+
Logs are written to:
|
|
620
|
+
- Console output (Claude Desktop developer tools)
|
|
621
|
+
- `logs/combined.log` - All levels
|
|
622
|
+
- `logs/error.log` - Errors only
|
|
623
|
+
|
|
624
|
+
### Testing Your Setup
|
|
625
|
+
|
|
626
|
+
Test with these queries:
|
|
627
|
+
1. "Can you list the available Gemini models?"
|
|
628
|
+
2. "Use Gemini to explain photosynthesis."
|
|
629
|
+
3. "Use Gemini 1.5 Pro with temperature 0.9 to write a creative poem about coding."
|
|
630
|
+
|
|
631
|
+
### Performance Tuning
|
|
632
|
+
|
|
633
|
+
For better performance:
|
|
634
|
+
|
|
635
|
+
- Adjust token limits based on your use case
|
|
636
|
+
- Use appropriate models (Flash for speed, Pro for complexity)
|
|
637
|
+
- Monitor logs for rate limiting issues
|
|
638
|
+
- Set temperature values appropriately (0.7 balanced, 0.3 focused, 0.9 creative)
|
|
639
|
+
|
|
640
|
+
## Contributing
|
|
641
|
+
|
|
642
|
+
Contributions welcome. Follow these steps:
|
|
643
|
+
|
|
644
|
+
1. Fork the repository
|
|
645
|
+
2. Create a feature branch: `git checkout -b feature/amazing-feature`
|
|
646
|
+
3. Make your changes and add tests
|
|
647
|
+
4. Run tests: `npm test`
|
|
648
|
+
5. Lint: `npm run lint:fix`
|
|
649
|
+
6. Build: `npm run build`
|
|
650
|
+
7. Commit: `git commit -m 'Add amazing feature'`
|
|
651
|
+
8. Push: `git push origin feature/amazing-feature`
|
|
652
|
+
9. Open a Pull Request
|
|
653
|
+
|
|
654
|
+
### Development Guidelines
|
|
655
|
+
|
|
656
|
+
- Follow TypeScript best practices
|
|
657
|
+
- Add tests for new functionality
|
|
658
|
+
- Update documentation
|
|
659
|
+
- Use conventional commit messages
|
|
660
|
+
- Maintain backwards compatibility
|
|
661
|
+
|
|
662
|
+
## Technical Details
|
|
663
|
+
|
|
664
|
+
### Migration to MCP SDK 1.25.3
|
|
665
|
+
|
|
666
|
+
This server has been migrated to the latest MCP SDK (1.25.3) with ES modules support. Key technical changes:
|
|
667
|
+
|
|
668
|
+
**SDK Updates:**
|
|
669
|
+
- Migrated from `Server` class to `McpServer` API
|
|
670
|
+
- Tool registration uses `registerTool` with Zod validation
|
|
671
|
+
- ES modules throughout (`"type": "module"`)
|
|
672
|
+
- TypeScript configured for `nodenext` module resolution
|
|
673
|
+
|
|
674
|
+
**Compatibility:**
|
|
675
|
+
- Node.js 18+ (changed from 24+ for broader compatibility)
|
|
676
|
+
- All imports use `.js` extensions for ES module compliance
|
|
677
|
+
- Zod schemas for runtime type validation
|
|
678
|
+
- Modern MCP protocol implementation
|
|
679
|
+
|
|
680
|
+
**Build System:**
|
|
681
|
+
- TypeScript compiles to ES2022 modules
|
|
682
|
+
- Clean separation between business logic and MCP interface
|
|
683
|
+
- Preserved all Gemini API client functionality
|
|
684
|
+
|
|
685
|
+
What this means practically: the server now follows modern Node.js and MCP standards, which should prevent compatibility issues with future Claude Desktop updates whilst maintaining all existing functionality.
|
|
686
|
+
|
|
687
|
+
## Licence
|
|
688
|
+
|
|
689
|
+
This project is licensed under the Apache 2.0 Licence - see the [LICENSE](LICENSE) file for details.
|
|
690
|
+
|
|
691
|
+
## Disclaimer
|
|
692
|
+
|
|
693
|
+
**Use at Your Own Risk**: This software is provided "as is" without warranty. The authors accept no responsibility for damages, data loss, or other issues arising from use.
|
|
694
|
+
|
|
695
|
+
**Content Safety**: This server interfaces with Google's Gemini AI models. Whilst content safety settings are implemented, AI-generated content quality cannot be guaranteed. Users are responsible for reviewing AI output before use and ensuring compliance with applicable laws.
|
|
696
|
+
|
|
697
|
+
**API Key Security**: Your Google Gemini API key is sensitive. Keep it confidential, don't commit it to version control, rotate if exposed, and manage API usage costs.
|
|
698
|
+
|
|
699
|
+
**Data Privacy**: This server processes data through the Model Context Protocol. Avoid sending sensitive or confidential information. Review Google's privacy policy and implement appropriate data handling.
|
|
700
|
+
|
|
701
|
+
**Production Use**: Users deploying in production should conduct security audits, implement monitoring, have incident response procedures, and regularly update dependencies.
|
|
702
|
+
|
|
703
|
+
**Third-Party Services**: This software relies on external services (Google Gemini API, npm packages). Service availability, pricing, and functionality may change.
|
|
704
|
+
|
|
705
|
+
**No Professional Advice**: AI-generated content should not be considered professional advice (legal, medical, financial) without verification by qualified professionals.
|
|
706
|
+
|
|
707
|
+
By using this software, you acknowledge these terms and agree to use at your own risk.
|
|
708
|
+
|
|
709
|
+
## Support
|
|
710
|
+
|
|
711
|
+
- **GitHub Issues**: [Report bugs or request features](https://github.com/houtini-ai/gemini-mcp/issues)
|
|
712
|
+
- **GitHub Discussions**: [Ask questions or share ideas](https://github.com/houtini-ai/gemini-mcp/discussions)
|
|
713
|
+
|
|
714
|
+
## Changelog
|
|
715
|
+
|
|
716
|
+
### v1.3.2 - Node.js 18+ Compatibility & Modern SDK
|
|
717
|
+
|
|
718
|
+
**Breaking Changes:** None (all tool interfaces preserved)
|
|
719
|
+
|
|
720
|
+
**Technical Updates:**
|
|
721
|
+
- Updated to MCP SDK 1.25.3 (from 1.19.1)
|
|
722
|
+
- Migrated to ES modules (`"type": "module"`)
|
|
723
|
+
- Changed Node.js requirement to >=18.0.0 (from >=24.0.0) for broader compatibility
|
|
724
|
+
- Migrated from `Server` to `McpServer` API
|
|
725
|
+
- Implemented Zod schema validation for all tools
|
|
726
|
+
- Updated TypeScript config to `nodenext` module resolution
|
|
727
|
+
|
|
728
|
+
**Fixes:**
|
|
729
|
+
- Resolved Node.js v24 ERR_MODULE_NOT_FOUND errors
|
|
730
|
+
- Fixed TypeScript compilation with DOM types for fetch API
|
|
731
|
+
- All imports now use `.js` extensions for ES module compliance
|
|
732
|
+
|
|
733
|
+
**What This Means:**
|
|
734
|
+
The server now works reliably with Node.js 18, 20, 22, and 24. All existing functionality preserved - this is purely a technical infrastructure update for better compatibility.
|
|
735
|
+
|
|
736
|
+
### v1.1.0 - Deep Research & Enhanced Discovery
|
|
737
|
+
|
|
738
|
+
**New Features:**
|
|
739
|
+
- Added deep research capability for iterative analysis
|
|
740
|
+
- Enhanced model discovery with better filtering
|
|
741
|
+
- Improved default model selection logic
|
|
742
|
+
- Better handling of experimental vs stable models
|
|
743
|
+
|
|
744
|
+
### v1.0.4 - Security & Dependencies
|
|
745
|
+
|
|
746
|
+
**Updates:**
|
|
747
|
+
- Updated @google/generative-ai to v0.24.1
|
|
748
|
+
- Updated @modelcontextprotocol/sdk to v1.19.1
|
|
749
|
+
- Changed safety settings to BLOCK_MEDIUM_AND_ABOVE
|
|
750
|
+
- Added comprehensive disclaimer
|
|
751
|
+
- Zero vulnerabilities in dependencies
|
|
752
|
+
|
|
753
|
+
### v1.0.3 - Enhanced Grounding
|
|
754
|
+
|
|
755
|
+
**Improvements:**
|
|
756
|
+
- Fixed grounding metadata field names
|
|
757
|
+
- Enhanced source citation processing
|
|
758
|
+
- Improved grounding reliability
|
|
759
|
+
- Better error handling for grounding
|
|
760
|
+
|
|
761
|
+
### v1.0.2 - Google Search Grounding
|
|
762
|
+
|
|
763
|
+
**New Features:**
|
|
764
|
+
- Added Google Search grounding (enabled by default)
|
|
765
|
+
- Real-time web search integration
|
|
766
|
+
- Source citations in responses
|
|
767
|
+
- Configurable grounding parameter
|
|
768
|
+
|
|
769
|
+
### v1.0.0 - Initial Release
|
|
770
|
+
|
|
771
|
+
**Core Features:**
|
|
772
|
+
- Complete TypeScript rewrite
|
|
773
|
+
- Professional modular architecture
|
|
774
|
+
- Comprehensive error handling
|
|
775
|
+
- Full MCP protocol compliance
|
|
776
|
+
- Multiple Gemini model support
|
|
777
|
+
- NPM package distribution
|
|
778
|
+
- Production-ready build system
|
|
779
|
+
|
|
780
|
+
---
|
|
781
|
+
|
|
782
|
+
**Built for the Model Context Protocol community**
|
|
783
|
+
|
|
784
|
+
For more about MCP, visit [modelcontextprotocol.io](https://modelcontextprotocol.io)
|