@houtini/gemini-mcp 1.0.0 → 1.0.2
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 +546 -442
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +2 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/types.d.ts +1 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/services/gemini/index.d.ts.map +1 -1
- package/dist/services/gemini/index.js +22 -8
- package/dist/services/gemini/index.js.map +1 -1
- package/dist/services/gemini/types.d.ts +3 -0
- package/dist/services/gemini/types.d.ts.map +1 -1
- package/dist/tools/gemini-chat.d.ts.map +1 -1
- package/dist/tools/gemini-chat.js +7 -1
- package/dist/tools/gemini-chat.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,442 +1,546 @@
|
|
|
1
|
-
# Gemini MCP Server
|
|
2
|
-
|
|
3
|
-
[](https://badge.fury.io/js/@houtini/gemini-mcp)
|
|
4
|
-
[](https://opensource.org/licenses/MIT)
|
|
5
|
-
[](https://www.typescriptlang.org/)
|
|
6
|
-
|
|
7
|
-
A professional, production-ready Model Context Protocol (MCP) server that provides seamless integration with Google's Gemini AI models. Built with TypeScript and designed for enterprise use, this package offers robust error handling, comprehensive logging, and easy deployment.
|
|
8
|
-
|
|
9
|
-
## 🚀 Quick Start
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
```bash
|
|
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
|
-
```json
|
|
149
|
-
{
|
|
150
|
-
"mcpServers": {
|
|
151
|
-
"gemini": {
|
|
152
|
-
"command": "node",
|
|
153
|
-
"args": ["
|
|
154
|
-
"env": {
|
|
155
|
-
"GEMINI_API_KEY": "your-api-key-here"
|
|
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
|
-
2.
|
|
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
|
-
npm
|
|
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
|
-
|
|
1
|
+
# Gemini MCP Server
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/js/@houtini/gemini-mcp)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
|
|
7
|
+
A professional, production-ready Model Context Protocol (MCP) server that provides seamless integration with Google's Gemini AI models. Built with TypeScript and designed for enterprise use, this package offers robust error handling, comprehensive logging, and easy deployment.
|
|
8
|
+
|
|
9
|
+
## 🚀 Quick Start
|
|
10
|
+
|
|
11
|
+
The easiest way to get started is using `npx` - no installation required:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Get your API key from Google AI Studio
|
|
15
|
+
# https://makersuite.google.com/app/apikey
|
|
16
|
+
|
|
17
|
+
# Test the server (optional)
|
|
18
|
+
npx @houtini/gemini-mcp
|
|
19
|
+
|
|
20
|
+
# Add to Claude Desktop (see configuration below)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 📋 Table of Contents
|
|
24
|
+
|
|
25
|
+
- [Features](#-features)
|
|
26
|
+
- [Installation](#-installation)
|
|
27
|
+
- [Configuration](#-configuration)
|
|
28
|
+
- [Usage Examples](#-usage-examples)
|
|
29
|
+
- [API Reference](#-api-reference)
|
|
30
|
+
- [Development](#-development)
|
|
31
|
+
- [Troubleshooting](#-troubleshooting)
|
|
32
|
+
- [Contributing](#-contributing)
|
|
33
|
+
|
|
34
|
+
## ✨ Features
|
|
35
|
+
|
|
36
|
+
### Core Functionality
|
|
37
|
+
- **🤖 Multi-Model Support** - Access to 6 Gemini models including the latest Gemini 2.5 Flash
|
|
38
|
+
- **💬 Chat Interface** - Advanced chat functionality with customisable parameters
|
|
39
|
+
- **🌐 Google Search Grounding** - Real-time web search integration enabled by default for current information
|
|
40
|
+
- **📊 Model Information** - Detailed model capabilities and specifications
|
|
41
|
+
- **🎛️ Fine-Grained Control** - Temperature, token limits, and system prompts
|
|
42
|
+
|
|
43
|
+
### Enterprise Features
|
|
44
|
+
- **🏗️ Professional Architecture** - Modular services-based design
|
|
45
|
+
- **🛡️ Robust Error Handling** - Comprehensive error handling with detailed logging
|
|
46
|
+
- **📝 Winston Logging** - Production-ready logging with file rotation
|
|
47
|
+
- **🔒 Security Focused** - No hardcoded credentials, environment-based configuration
|
|
48
|
+
- **🏷️ Full TypeScript** - Complete type safety and IntelliSense support
|
|
49
|
+
- **⚡ High Performance** - Optimised for minimal latency and resource usage
|
|
50
|
+
|
|
51
|
+
## 📦 Installation
|
|
52
|
+
|
|
53
|
+
### Prerequisites
|
|
54
|
+
|
|
55
|
+
- **Node.js** v24.0.0
|
|
56
|
+
- **Google AI Studio API Key** ([Get your key here](https://makersuite.google.com/app/apikey))
|
|
57
|
+
|
|
58
|
+
### Recommended: No Installation Required
|
|
59
|
+
|
|
60
|
+
The simplest approach uses `npx` to run the latest version automatically:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# No installation needed - npx handles everything
|
|
64
|
+
npx @houtini/gemini-mcp
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Alternative Installation Methods
|
|
68
|
+
|
|
69
|
+
#### Global Installation
|
|
70
|
+
```bash
|
|
71
|
+
# Install once, use anywhere
|
|
72
|
+
npm install -g @houtini/gemini-mcp
|
|
73
|
+
gemini-mcp
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### Local Project Installation
|
|
77
|
+
```bash
|
|
78
|
+
# Install in your project
|
|
79
|
+
npm install @houtini/gemini-mcp
|
|
80
|
+
|
|
81
|
+
# Run with npx
|
|
82
|
+
npx @houtini/gemini-mcp
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
#### From Source (Developers)
|
|
86
|
+
```bash
|
|
87
|
+
git clone https://github.com/houtini-ai/gemini-mcp.git
|
|
88
|
+
cd gemini-mcp
|
|
89
|
+
npm install
|
|
90
|
+
npm run build
|
|
91
|
+
npm start
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## ⚙️ Configuration
|
|
95
|
+
|
|
96
|
+
### Step 1: Get Your API Key
|
|
97
|
+
|
|
98
|
+
Visit [Google AI Studio](https://makersuite.google.com/app/apikey) to create your free API key.
|
|
99
|
+
|
|
100
|
+
### Step 2: Configure Claude Desktop
|
|
101
|
+
|
|
102
|
+
Add this configuration to your Claude Desktop config file:
|
|
103
|
+
|
|
104
|
+
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
105
|
+
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
106
|
+
|
|
107
|
+
#### ✅ Recommended Configuration (using npx)
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"mcpServers": {
|
|
112
|
+
"gemini": {
|
|
113
|
+
"command": "npx",
|
|
114
|
+
"args": ["@houtini/gemini-mcp"],
|
|
115
|
+
"env": {
|
|
116
|
+
"GEMINI_API_KEY": "your-api-key-here"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Benefits of this approach:**
|
|
124
|
+
- ✅ No global installation required
|
|
125
|
+
- ✅ Always uses the latest version
|
|
126
|
+
- ✅ Cleaner system (no global packages)
|
|
127
|
+
- ✅ Works out of the box
|
|
128
|
+
|
|
129
|
+
#### Alternative: Global Installation
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"mcpServers": {
|
|
134
|
+
"gemini": {
|
|
135
|
+
"command": "gemini-mcp",
|
|
136
|
+
"env": {
|
|
137
|
+
"GEMINI_API_KEY": "your-api-key-here"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
*Note: Requires `npm install -g @houtini/gemini-mcp` first*
|
|
145
|
+
|
|
146
|
+
#### Alternative: Local Installation
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"mcpServers": {
|
|
151
|
+
"gemini": {
|
|
152
|
+
"command": "node",
|
|
153
|
+
"args": ["./node_modules/@houtini/gemini-mcp/dist/index.js"],
|
|
154
|
+
"env": {
|
|
155
|
+
"GEMINI_API_KEY": "your-api-key-here"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
*Note: Only works if installed locally in the current directory*
|
|
163
|
+
|
|
164
|
+
### Step 3: Restart Claude Desktop
|
|
165
|
+
|
|
166
|
+
After updating the configuration file, restart Claude Desktop to load the new MCP server.
|
|
167
|
+
|
|
168
|
+
### Optional Configuration
|
|
169
|
+
|
|
170
|
+
You can add additional environment variables for more control:
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"mcpServers": {
|
|
175
|
+
"gemini": {
|
|
176
|
+
"command": "npx",
|
|
177
|
+
"args": ["@houtini/gemini-mcp"],
|
|
178
|
+
"env": {
|
|
179
|
+
"GEMINI_API_KEY": "your-api-key-here",
|
|
180
|
+
"LOG_LEVEL": "info"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Available Environment Variables:**
|
|
188
|
+
|
|
189
|
+
| Variable | Default | Description |
|
|
190
|
+
|----------|---------|-------------|
|
|
191
|
+
| `GEMINI_API_KEY` | *required* | Your Google AI Studio API key |
|
|
192
|
+
| `LOG_LEVEL` | `info` | Logging level: `debug`, `info`, `warn`, `error` |
|
|
193
|
+
|
|
194
|
+
### Using .env File (Development)
|
|
195
|
+
|
|
196
|
+
For development or testing, create a `.env` file:
|
|
197
|
+
|
|
198
|
+
```env
|
|
199
|
+
# Google Gemini Configuration
|
|
200
|
+
GEMINI_API_KEY=your-api-key-here
|
|
201
|
+
|
|
202
|
+
# Logging Configuration (optional)
|
|
203
|
+
LOG_LEVEL=info
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## 💡 Usage Examples
|
|
207
|
+
|
|
208
|
+
### Basic Chat
|
|
209
|
+
|
|
210
|
+
Ask Claude to use Gemini:
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
Can you help me understand quantum computing using Gemini?
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Claude will automatically use the `gemini_chat` tool to get a response from Gemini.
|
|
217
|
+
|
|
218
|
+
### Creative Writing
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
Use Gemini to write a short story about artificial intelligence discovering creativity.
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Technical Analysis
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
Can you use Gemini Pro to explain the differences between various machine learning algorithms?
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Model Selection
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
Use Gemini 1.5 Pro to analyse this code and suggest improvements.
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Getting Model Information
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
Show me all available Gemini models and their capabilities.
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## 🌐 Google Search Grounding
|
|
243
|
+
|
|
244
|
+
This server includes **Google Search grounding** enabled by default, providing Gemini models with real-time access to current web information. This powerful feature enhances responses with up-to-date facts, recent developments, and current events that wouldn't be available in the model's training data.
|
|
245
|
+
|
|
246
|
+
### How It Works
|
|
247
|
+
|
|
248
|
+
Google Search grounding automatically supplements Gemini's responses with:
|
|
249
|
+
- **Real-time information** - Current news, stock prices, weather, and events
|
|
250
|
+
- **Factual accuracy** - Reduces hallucinations by grounding responses in web sources
|
|
251
|
+
- **Source citations** - Provides metadata about search queries and sources used
|
|
252
|
+
- **Seamless integration** - Works transparently without changing your workflow
|
|
253
|
+
|
|
254
|
+
### Usage Examples
|
|
255
|
+
|
|
256
|
+
Ask questions that benefit from current information:
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
What are the latest developments in renewable energy this month?
|
|
260
|
+
What's the current stock price of major tech companies?
|
|
261
|
+
What are the recent breakthroughs in quantum computing?
|
|
262
|
+
What's happening in the 2025 climate summit?
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Controlling Grounding
|
|
266
|
+
|
|
267
|
+
**Default behaviour**: Grounding is **enabled by default** for optimal results.
|
|
268
|
+
|
|
269
|
+
**To disable grounding** for a specific request (useful for creative tasks):
|
|
270
|
+
```
|
|
271
|
+
Use Gemini without web search to write a fictional story about space exploration.
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**Technical control**: When using the API directly, set `grounding: false` to disable:
|
|
275
|
+
```json
|
|
276
|
+
{
|
|
277
|
+
"message": "Write a creative poem about dreams",
|
|
278
|
+
"grounding": false
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
## 🔧 API Reference
|
|
282
|
+
|
|
283
|
+
### Available Tools
|
|
284
|
+
|
|
285
|
+
#### `gemini_chat`
|
|
286
|
+
|
|
287
|
+
Chat with Gemini models to generate text responses.
|
|
288
|
+
|
|
289
|
+
**Parameters:**
|
|
290
|
+
|
|
291
|
+
| Parameter | Type | Required | Default | Description |
|
|
292
|
+
|-----------|------|----------|---------|-------------|
|
|
293
|
+
| `message` | string | ✅ | - | The message to send to Gemini |
|
|
294
|
+
| `model` | string | ❌ | "gemini-2.5-flash" | Model to use |
|
|
295
|
+
| `temperature` | number | ❌ | 0.7 | Controls randomness (0.0-1.0) |
|
|
296
|
+
| `max_tokens` | integer | ❌ | 2048 | Maximum tokens in response (1-8192) |
|
|
297
|
+
| `system_prompt` | string | ❌ | - | System instruction to guide the model |
|
|
298
|
+
| `grounding` | boolean | ❌ | true | Enable Google Search grounding for real-time information |
|
|
299
|
+
|
|
300
|
+
**Example:**
|
|
301
|
+
```json
|
|
302
|
+
{
|
|
303
|
+
"message": "What are the latest developments in quantum computing?",
|
|
304
|
+
"model": "gemini-1.5-pro",
|
|
305
|
+
"temperature": 0.5,
|
|
306
|
+
"max_tokens": 1000,
|
|
307
|
+
"system_prompt": "You are a helpful technology expert. Provide current, factual information with sources where possible.",
|
|
308
|
+
"grounding": true
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
#### `gemini_list_models`
|
|
313
|
+
|
|
314
|
+
Retrieve information about all available Gemini models.
|
|
315
|
+
|
|
316
|
+
**Parameters:** None required
|
|
317
|
+
|
|
318
|
+
**Example:**
|
|
319
|
+
```json
|
|
320
|
+
{}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
**Response includes:**
|
|
324
|
+
- Model names and display names
|
|
325
|
+
- Descriptions of each model's strengths
|
|
326
|
+
- Recommended use cases
|
|
327
|
+
|
|
328
|
+
### Available Models
|
|
329
|
+
|
|
330
|
+
| Model | Best For | Description |
|
|
331
|
+
|-------|----------|-------------|
|
|
332
|
+
| **gemini-2.5-flash** | General use, latest features | Latest Gemini 2.5 Flash - Fast, versatile performance |
|
|
333
|
+
| **gemini-2.0-flash** | Speed-optimised tasks | Gemini 2.0 Flash - Fast, efficient model |
|
|
334
|
+
| **gemini-1.5-flash** | Quick responses | Gemini 1.5 Flash - Fast, efficient model |
|
|
335
|
+
| **gemini-1.5-pro** | Complex reasoning | Gemini 1.5 Pro - Advanced reasoning capabilities |
|
|
336
|
+
| **gemini-pro** | Balanced performance | Gemini Pro - Balanced performance for most tasks |
|
|
337
|
+
| **gemini-pro-vision** | Multimodal tasks | Gemini Pro Vision - Text and image understanding |
|
|
338
|
+
|
|
339
|
+
## 🛠️ Development
|
|
340
|
+
|
|
341
|
+
### Building from Source
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
# Clone the repository
|
|
345
|
+
git clone https://github.com/houtini-ai/gemini-mcp.git
|
|
346
|
+
cd gemini-mcp
|
|
347
|
+
|
|
348
|
+
# Install dependencies
|
|
349
|
+
npm install
|
|
350
|
+
|
|
351
|
+
# Build the project
|
|
352
|
+
npm run build
|
|
353
|
+
|
|
354
|
+
# Run in development mode
|
|
355
|
+
npm run dev
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Scripts
|
|
359
|
+
|
|
360
|
+
| Command | Description |
|
|
361
|
+
|---------|-------------|
|
|
362
|
+
| `npm run build` | Compile TypeScript to JavaScript |
|
|
363
|
+
| `npm run dev` | Run in development mode with live reload |
|
|
364
|
+
| `npm start` | Run the compiled server |
|
|
365
|
+
| `npm test` | Run test suite |
|
|
366
|
+
| `npm run lint` | Check code style |
|
|
367
|
+
| `npm run lint:fix` | Fix linting issues automatically |
|
|
368
|
+
|
|
369
|
+
### Project Structure
|
|
370
|
+
|
|
371
|
+
```
|
|
372
|
+
src/
|
|
373
|
+
├── config/ # Configuration management
|
|
374
|
+
│ ├── index.ts # Main configuration
|
|
375
|
+
│ └── types.ts # Configuration types
|
|
376
|
+
├── services/ # Core business logic
|
|
377
|
+
│ ├── base-service.ts
|
|
378
|
+
│ └── gemini/ # Gemini service implementation
|
|
379
|
+
│ ├── index.ts
|
|
380
|
+
│ └── types.ts
|
|
381
|
+
├── tools/ # MCP tool implementations
|
|
382
|
+
│ ├── gemini-chat.ts
|
|
383
|
+
│ └── gemini-list-models.ts
|
|
384
|
+
├── utils/ # Utility functions
|
|
385
|
+
│ ├── logger.ts # Winston logging setup
|
|
386
|
+
│ └── error-handler.ts
|
|
387
|
+
├── cli.ts # CLI entry point
|
|
388
|
+
└── index.ts # Main server implementation
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Architecture
|
|
392
|
+
|
|
393
|
+
The server follows a clean, layered architecture:
|
|
394
|
+
|
|
395
|
+
1. **CLI Layer** (`cli.ts`) - Command-line interface
|
|
396
|
+
2. **Server Layer** (`index.ts`) - MCP protocol handling
|
|
397
|
+
3. **Tools Layer** (`tools/`) - MCP tool implementations
|
|
398
|
+
4. **Service Layer** (`services/`) - Business logic and API integration
|
|
399
|
+
5. **Utility Layer** (`utils/`) - Cross-cutting concerns
|
|
400
|
+
|
|
401
|
+
## 🐛 Troubleshooting
|
|
402
|
+
|
|
403
|
+
### Common Issues
|
|
404
|
+
|
|
405
|
+
#### "GEMINI_API_KEY environment variable not set"
|
|
406
|
+
|
|
407
|
+
**Solution:**
|
|
408
|
+
```bash
|
|
409
|
+
# Make sure your API key is set in the Claude Desktop configuration
|
|
410
|
+
# See the Configuration section above
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
#### Server not appearing in Claude Desktop
|
|
414
|
+
|
|
415
|
+
**Solutions:**
|
|
416
|
+
1. **Restart Claude Desktop** after updating configuration
|
|
417
|
+
2. **Check your configuration file path**:
|
|
418
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
419
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
420
|
+
3. **Verify JSON syntax** - use a JSON validator if needed
|
|
421
|
+
4. **Ensure your API key is valid** - test at [Google AI Studio](https://makersuite.google.com/app/apikey)
|
|
422
|
+
|
|
423
|
+
#### "Module not found" errors with npx
|
|
424
|
+
|
|
425
|
+
**Solutions:**
|
|
426
|
+
```bash
|
|
427
|
+
# Clear npx cache and try again
|
|
428
|
+
npx --yes @houtini/gemini-mcp
|
|
429
|
+
|
|
430
|
+
# Or install globally if preferred
|
|
431
|
+
npm install -g @houtini/gemini-mcp
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
#### Node.js version issues
|
|
435
|
+
|
|
436
|
+
**Solution:**
|
|
437
|
+
```bash
|
|
438
|
+
# Check your Node.js version
|
|
439
|
+
node --version
|
|
440
|
+
|
|
441
|
+
# Should be v24.0.0 or higher
|
|
442
|
+
# Install latest Node.js from https://nodejs.org
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
### Debug Mode
|
|
446
|
+
|
|
447
|
+
Enable detailed logging by setting `LOG_LEVEL=debug` in your Claude Desktop configuration:
|
|
448
|
+
|
|
449
|
+
```json
|
|
450
|
+
{
|
|
451
|
+
"mcpServers": {
|
|
452
|
+
"gemini": {
|
|
453
|
+
"command": "npx",
|
|
454
|
+
"args": ["@houtini/gemini-mcp"],
|
|
455
|
+
"env": {
|
|
456
|
+
"GEMINI_API_KEY": "your-api-key-here",
|
|
457
|
+
"LOG_LEVEL": "debug"
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
### Log Files
|
|
465
|
+
|
|
466
|
+
Logs are written to:
|
|
467
|
+
- **Console output** (visible in Claude Desktop developer tools)
|
|
468
|
+
- **`logs/combined.log`** - All log levels
|
|
469
|
+
- **`logs/error.log`** - Error logs only
|
|
470
|
+
|
|
471
|
+
### Testing Your Setup
|
|
472
|
+
|
|
473
|
+
Test the server with these Claude queries:
|
|
474
|
+
|
|
475
|
+
1. **Basic connectivity**: "Can you list the available Gemini models?"
|
|
476
|
+
2. **Simple chat**: "Use Gemini to explain photosynthesis."
|
|
477
|
+
3. **Advanced features**: "Use Gemini 1.5 Pro with temperature 0.9 to write a creative poem about coding."
|
|
478
|
+
|
|
479
|
+
### Performance Tuning
|
|
480
|
+
|
|
481
|
+
For better performance:
|
|
482
|
+
|
|
483
|
+
1. **Adjust token limits** based on your use case
|
|
484
|
+
2. **Use appropriate models** (Flash for speed, Pro for complex tasks)
|
|
485
|
+
3. **Monitor logs** for rate limiting or API issues
|
|
486
|
+
4. **Set reasonable temperature values** (0.7 for balanced, 0.3 for focused, 0.9 for creative)
|
|
487
|
+
|
|
488
|
+
## 🤝 Contributing
|
|
489
|
+
|
|
490
|
+
Contributions are welcome! Please follow these steps:
|
|
491
|
+
|
|
492
|
+
1. **Fork the repository**
|
|
493
|
+
2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
|
|
494
|
+
3. **Make your changes** and add tests if applicable
|
|
495
|
+
4. **Ensure all tests pass**: `npm test`
|
|
496
|
+
5. **Lint your code**: `npm run lint:fix`
|
|
497
|
+
6. **Build the project**: `npm run build`
|
|
498
|
+
7. **Commit your changes**: `git commit -m 'Add amazing feature'`
|
|
499
|
+
8. **Push to the branch**: `git push origin feature/amazing-feature`
|
|
500
|
+
9. **Open a Pull Request**
|
|
501
|
+
|
|
502
|
+
### Development Guidelines
|
|
503
|
+
|
|
504
|
+
- **Follow TypeScript best practices**
|
|
505
|
+
- **Add tests for new functionality**
|
|
506
|
+
- **Update documentation as needed**
|
|
507
|
+
- **Use conventional commit messages**
|
|
508
|
+
- **Ensure backwards compatibility**
|
|
509
|
+
|
|
510
|
+
## 📄 License
|
|
511
|
+
|
|
512
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
513
|
+
|
|
514
|
+
## 🆘 Support
|
|
515
|
+
|
|
516
|
+
- **GitHub Issues**: [Report bugs or request features](https://github.com/houtini-ai/gemini-mcp/issues)
|
|
517
|
+
- **GitHub Discussions**: [Ask questions or share ideas](https://github.com/houtini-ai/gemini-mcp/discussions)
|
|
518
|
+
|
|
519
|
+
## 📈 Changelog
|
|
520
|
+
|
|
521
|
+
### v1.0.2
|
|
522
|
+
|
|
523
|
+
**Google Search Grounding**
|
|
524
|
+
- Added Google Search grounding functionality enabled by default
|
|
525
|
+
- Real-time web search integration for current information and facts
|
|
526
|
+
- Grounding metadata in responses with source citations
|
|
527
|
+
- Configurable grounding parameter in chat requests
|
|
528
|
+
- Enhanced accuracy for current events, news, and factual queries
|
|
529
|
+
|
|
530
|
+
### v1.0.0
|
|
531
|
+
|
|
532
|
+
**Initial Release**
|
|
533
|
+
- Complete Node.js/TypeScript rewrite from Python
|
|
534
|
+
- Professional modular architecture with services pattern
|
|
535
|
+
- Comprehensive error handling and logging system
|
|
536
|
+
- Full MCP protocol compliance
|
|
537
|
+
- Support for 6 Gemini models
|
|
538
|
+
- NPM package distribution ready
|
|
539
|
+
- Enterprise-grade configuration management
|
|
540
|
+
- Production-ready build system
|
|
541
|
+
|
|
542
|
+
---
|
|
543
|
+
|
|
544
|
+
**Built with ❤️ for the Model Context Protocol community**
|
|
545
|
+
|
|
546
|
+
For more information about MCP, visit [modelcontextprotocol.io](https://modelcontextprotocol.io)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAMjC,eAAO,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAMjC,eAAO,MAAM,MAAM,EAAE,MAkCpB,CAAC;AAEF,wBAAgB,cAAc,IAAI,IAAI,CAOrC"}
|
package/dist/config/index.js
CHANGED
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,wCAOC;AAhDD,+CAAiC;AAEjC,6BAA6B;AAC7B,MAAM,CAAC,MAAM,EAAE,CAAC;AAEH,QAAA,MAAM,GAAW;IAC5B,MAAM,EAAE;QACN,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc;QAClC,cAAc,EAAE;YACd;gBACE,QAAQ,EAAE,0BAA0B;gBACpC,SAAS,EAAE,YAAY;aACxB;YACD;gBACE,QAAQ,EAAE,2BAA2B;gBACrC,SAAS,EAAE,YAAY;aACxB;YACD;gBACE,QAAQ,EAAE,iCAAiC;gBAC3C,SAAS,EAAE,YAAY;aACxB;YACD;gBACE,QAAQ,EAAE,iCAAiC;gBAC3C,SAAS,EAAE,YAAY;aACxB;SACF;QACD,YAAY,EAAE,kBAAkB;QAChC,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,GAAG;QAChB,gBAAgB,EAAE,IAAI;KACvB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,OAAO;KACjB;IACD,OAAO,EAAE;QACP,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,MAAM;QACtC,MAAM,EAAE,UAAU;KACnB;CACF,CAAC;AAEF,SAAgB,cAAc;IAC5B,IAAI,CAAC,cAAM,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,+CAA+C;YAC/C,yEAAyE,CAC1E,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/config/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/gemini/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,kBAAkB,EAGnB,MAAM,SAAS,CAAC;AAGjB,qBAAa,aAAc,SAAQ,WAAW;IAC5C,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,MAAM,CAAe;IAG7B,OAAO,CAAC,QAAQ,CAAC,eAAe,CA+B9B;gBAEU,MAAM,EAAE,YAAY;IAY1B,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/gemini/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,kBAAkB,EAGnB,MAAM,SAAS,CAAC;AAGjB,qBAAa,aAAc,SAAQ,WAAW;IAC5C,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,MAAM,CAAe;IAG7B,OAAO,CAAC,QAAQ,CAAC,eAAe,CA+B9B;gBAEU,MAAM,EAAE,YAAY;IAY1B,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IA+GjD,UAAU,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAazC,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAwBxC,OAAO,CAAC,iBAAiB;IAqBzB,kBAAkB,IAAI,MAAM,EAAE;CAG/B"}
|
|
@@ -51,22 +51,30 @@ class GeminiService extends base_service_1.BaseService {
|
|
|
51
51
|
}
|
|
52
52
|
async chat(request) {
|
|
53
53
|
try {
|
|
54
|
-
|
|
54
|
+
// Determine if grounding should be used
|
|
55
|
+
const shouldUseGrounding = request.grounding ?? this.config.defaultGrounding;
|
|
56
|
+
const modelName = request.model || this.config.defaultModel;
|
|
57
|
+
this.logInfo(`Chat request to ${modelName}`, {
|
|
55
58
|
messageLength: request.message.length,
|
|
56
|
-
hasSystemPrompt: !!request.systemPrompt
|
|
59
|
+
hasSystemPrompt: !!request.systemPrompt,
|
|
60
|
+
grounding: shouldUseGrounding
|
|
57
61
|
});
|
|
58
|
-
const modelName = request.model || this.config.defaultModel;
|
|
59
62
|
// Configure generation parameters
|
|
60
63
|
const generationConfig = {
|
|
61
64
|
temperature: request.temperature ?? this.config.temperature,
|
|
62
65
|
maxOutputTokens: request.maxTokens ?? this.config.maxTokens
|
|
63
66
|
};
|
|
64
|
-
// Initialize model with safety settings
|
|
65
|
-
const
|
|
67
|
+
// Initialize model with safety settings and optional grounding
|
|
68
|
+
const modelConfig = {
|
|
66
69
|
model: modelName,
|
|
67
70
|
safetySettings: this.mapSafetySettings(),
|
|
68
71
|
generationConfig
|
|
69
|
-
}
|
|
72
|
+
};
|
|
73
|
+
// Add grounding tool if enabled
|
|
74
|
+
if (shouldUseGrounding) {
|
|
75
|
+
modelConfig.tools = [{ googleSearch: {} }];
|
|
76
|
+
}
|
|
77
|
+
const model = this.genAI.getGenerativeModel(modelConfig);
|
|
70
78
|
// Prepare prompt
|
|
71
79
|
const prompt = request.systemPrompt
|
|
72
80
|
? `${request.systemPrompt}\n\nUser: ${request.message}\n\nAssistant:`
|
|
@@ -103,16 +111,22 @@ class GeminiService extends base_service_1.BaseService {
|
|
|
103
111
|
}
|
|
104
112
|
throw new error_handler_1.GeminiError('No text content in response. The model may have filtered the content.');
|
|
105
113
|
}
|
|
114
|
+
// Extract grounding metadata if available
|
|
115
|
+
const candidate = response.candidates?.[0];
|
|
116
|
+
const groundingMetadata = candidate?.groundingMetadata;
|
|
106
117
|
const chatResponse = {
|
|
107
118
|
content: responseText,
|
|
108
119
|
model: modelName,
|
|
109
120
|
timestamp: new Date().toISOString(),
|
|
110
|
-
finishReason: response.candidates?.[0]?.finishReason?.toString()
|
|
121
|
+
finishReason: response.candidates?.[0]?.finishReason?.toString(),
|
|
122
|
+
groundingMetadata
|
|
111
123
|
};
|
|
112
124
|
this.logInfo('Chat response generated successfully', {
|
|
113
125
|
model: modelName,
|
|
114
126
|
responseLength: responseText.length,
|
|
115
|
-
finishReason: chatResponse.finishReason
|
|
127
|
+
finishReason: chatResponse.finishReason,
|
|
128
|
+
hasGroundingMetadata: !!groundingMetadata,
|
|
129
|
+
searchQueries: groundingMetadata?.webSearchQueries?.length || 0
|
|
116
130
|
});
|
|
117
131
|
return chatResponse;
|
|
118
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/gemini/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/gemini/index.ts"],"names":[],"mappings":";;;AAAA,yDAAgH;AAChH,kDAA8C;AAS9C,6DAAwD;AAExD,MAAa,aAAc,SAAQ,0BAAW;IACpC,KAAK,CAAqB;IAC1B,MAAM,CAAe;IAE7B,2BAA2B;IACV,eAAe,GAAgB;QAC9C;YACE,IAAI,EAAE,kBAAkB;YACxB,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,uDAAuD;SACrE;Q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rD,OAAO,IAAI,CAAC;QAEd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,QAAQ,CAAC,iCAAiC,EAAE,KAAc,CAAC,CAAC;YACjE,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAEO,iBAAiB;QACvB,MAAM,qBAAqB,GAAuC;YAChE,YAAY,EAAE,kCAAkB,CAAC,UAAU;YAC3C,qBAAqB,EAAE,kCAAkB,CAAC,mBAAmB;YAC7D,wBAAwB,EAAE,kCAAkB,CAAC,sBAAsB;YACnE,iBAAiB,EAAE,kCAAkB,CAAC,eAAe;SACtD,CAAC;QAEF,MAAM,eAAe,GAAiC;YACpD,0BAA0B,EAAE,4BAAY,CAAC,wBAAwB;YACjE,2BAA2B,EAAE,4BAAY,CAAC,yBAAyB;YACnE,iCAAiC,EAAE,4BAAY,CAAC,+BAA+B;YAC/E,iCAAiC,EAAE,4BAAY,CAAC,+BAA+B;SAChF,CAAC;QAEF,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAChD,QAAQ,EAAE,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC;YAC3C,SAAS,EAAE,qBAAqB,CAAC,OAAO,CAAC,SAAS,CAAC;SACpD,CAAC,CAAC,CAAC;IACN,CAAC;IAED,kBAAkB;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC;CACF;AA9ND,sCA8NC"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import { GroundingMetadata } from '@google/generative-ai';
|
|
1
2
|
export interface ChatRequest {
|
|
2
3
|
message: string;
|
|
3
4
|
model?: string;
|
|
4
5
|
temperature?: number;
|
|
5
6
|
maxTokens?: number;
|
|
6
7
|
systemPrompt?: string;
|
|
8
|
+
grounding?: boolean;
|
|
7
9
|
}
|
|
8
10
|
export interface ChatResponse {
|
|
9
11
|
content: string;
|
|
10
12
|
model: string;
|
|
11
13
|
timestamp: string;
|
|
12
14
|
finishReason?: string;
|
|
15
|
+
groundingMetadata?: GroundingMetadata;
|
|
13
16
|
}
|
|
14
17
|
export interface ModelInfo {
|
|
15
18
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/gemini/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/gemini/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gemini-chat.d.ts","sourceRoot":"","sources":["../../src/tools/gemini-chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,WAAW,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAInD,qBAAa,cAAc;IACb,OAAO,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAEhD,aAAa,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"gemini-chat.d.ts","sourceRoot":"","sources":["../../src/tools/gemini-chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,WAAW,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAInD,qBAAa,cAAc;IACb,OAAO,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAEhD,aAAa,IAAI,IAAI;IA8Cf,OAAO,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CAgCjD"}
|
|
@@ -45,6 +45,11 @@ class GeminiChatTool {
|
|
|
45
45
|
system_prompt: {
|
|
46
46
|
type: 'string',
|
|
47
47
|
description: 'Optional system instruction'
|
|
48
|
+
},
|
|
49
|
+
grounding: {
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
default: true,
|
|
52
|
+
description: 'Enable Google Search grounding for real-time information'
|
|
48
53
|
}
|
|
49
54
|
},
|
|
50
55
|
required: ['message']
|
|
@@ -65,7 +70,8 @@ class GeminiChatTool {
|
|
|
65
70
|
model: args.model,
|
|
66
71
|
temperature: args.temperature,
|
|
67
72
|
maxTokens: args.max_tokens,
|
|
68
|
-
systemPrompt: args.system_prompt
|
|
73
|
+
systemPrompt: args.system_prompt,
|
|
74
|
+
grounding: args.grounding
|
|
69
75
|
});
|
|
70
76
|
return (0, error_handler_1.createToolResult)(true, response.content);
|
|
71
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gemini-chat.js","sourceRoot":"","sources":["../../src/tools/gemini-chat.ts"],"names":[],"mappings":";;;;;;AAEA,0DAAoE;AACpE,6DAAqC;AAErC,MAAa,cAAc;IACL;IAApB,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAEpD,aAAa;QACX,OAAO;YACL,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,gCAAgC;YAC7C,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,qBAAqB;qBACnC;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,kBAAkB;wBAC3B,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,kBAAkB,EAAE;wBAC7C,WAAW,EAAE,cAAc;qBAC5B;oBACD,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,GAAG;wBACZ,OAAO,EAAE,GAAG;wBACZ,OAAO,EAAE,GAAG;wBACZ,WAAW,EAAE,kCAAkC;qBAChD;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE,CAAC;wBACV,OAAO,EAAE,IAAI;wBACb,WAAW,EAAE,4BAA4B;qBAC1C;oBACD,aAAa,EAAE;wBACb,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,6BAA6B;qBAC3C;i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AgB,EAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAElD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,gBAAM,CAAC,KAAK,CAAC,mCAAmC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;YAE7D,IAAI,KAAK,YAAY,wBAAQ,EAAE,CAAC;gBAC9B,OAAO,IAAA,gCAAgB,EAAC,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YACvD,CAAC;YAED,OAAO,IAAA,gCAAgB,EAAC,KAAK,EAAE,qBAAsB,KAAe,CAAC,OAAO,EAAE,EAAE,KAAc,CAAC,CAAC;QAClG,CAAC;IACH,CAAC;CACF;AAjFD,wCAiFC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@houtini/gemini-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Professional Model Context Protocol server for Google Gemini AI models with enterprise-grade features",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"typescript": "^5.5.0"
|
|
74
74
|
},
|
|
75
75
|
"engines": {
|
|
76
|
-
"node": ">=
|
|
77
|
-
"npm": ">=
|
|
76
|
+
"node": ">=24.0.0",
|
|
77
|
+
"npm": ">=10.0.0"
|
|
78
78
|
},
|
|
79
79
|
"files": [
|
|
80
80
|
"dist/**/*",
|