@tuannvm/gemini-mcp-server 1.0.4 → 1.1.1
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 +71 -295
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/tools/analyze-media.tool.d.ts.map +1 -1
- package/dist/tools/analyze-media.tool.js +15 -8
- package/dist/tools/analyze-media.tool.js.map +1 -1
- package/dist/tools/ask-gemini.tool.d.ts.map +1 -1
- package/dist/tools/ask-gemini.tool.js +30 -14
- package/dist/tools/ask-gemini.tool.js.map +1 -1
- package/dist/tools/brainstorm.tool.d.ts.map +1 -1
- package/dist/tools/brainstorm.tool.js +28 -18
- package/dist/tools/brainstorm.tool.js.map +1 -1
- package/dist/tools/fetch-chunk.tool.d.ts.map +1 -1
- package/dist/tools/fetch-chunk.tool.js +11 -4
- package/dist/tools/fetch-chunk.tool.js.map +1 -1
- package/dist/tools/registry.d.ts +2 -0
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +1 -0
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/search.tool.d.ts.map +1 -1
- package/dist/tools/search.tool.js +13 -6
- package/dist/tools/search.tool.js.map +1 -1
- package/dist/tools/shell.tool.d.ts.map +1 -1
- package/dist/tools/shell.tool.js +15 -8
- package/dist/tools/shell.tool.js.map +1 -1
- package/dist/tools/simple-tools.d.ts.map +1 -1
- package/dist/tools/simple-tools.js +14 -0
- package/dist/tools/simple-tools.js.map +1 -1
- package/dist/tools/timeout-test.tool.d.ts.map +1 -1
- package/dist/tools/timeout-test.tool.js +7 -0
- package/dist/tools/timeout-test.tool.js.map +1 -1
- package/dist/types.d.ts +8 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/chunkCache.js.map +1 -1
- package/dist/utils/geminiExecutor.d.ts +1 -1
- package/dist/utils/geminiExecutor.d.ts.map +1 -1
- package/dist/utils/geminiExecutor.js +9 -4
- package/dist/utils/geminiExecutor.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,28 +4,24 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/@tuannvm/gemini-mcp-server)
|
|
5
5
|
[](https://www.npmjs.com/package/@tuannvm/gemini-mcp-server)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Give Claude superpowers with Gemini's massive context window. Analyze entire codebases, search the web, process images, and brainstorm ideas—all through MCP.
|
|
8
8
|
|
|
9
9
|
```mermaid
|
|
10
10
|
graph LR
|
|
11
11
|
A[Claude Code] --> B[Gemini MCP Server]
|
|
12
|
-
|
|
13
|
-
B -->
|
|
14
|
-
B --> S[search]
|
|
12
|
+
B --> C[gemini]
|
|
13
|
+
B --> S[web-search]
|
|
15
14
|
B --> M[analyze-media]
|
|
16
15
|
B --> SH[shell]
|
|
17
16
|
B --> D[brainstorm]
|
|
18
|
-
B --> E[fetch-chunk]
|
|
19
|
-
B --> F[ping]
|
|
20
|
-
B --> G[help]
|
|
21
|
-
|
|
22
17
|
C --> H[Gemini CLI]
|
|
23
18
|
S --> H
|
|
24
19
|
M --> H
|
|
25
20
|
SH --> H
|
|
26
21
|
D --> H
|
|
27
|
-
|
|
28
|
-
E -->
|
|
22
|
+
H --> E[Extensions]
|
|
23
|
+
E --> W[Google Workspace]
|
|
24
|
+
E --> X[Custom Extensions]
|
|
29
25
|
|
|
30
26
|
style A fill:#FF6B35
|
|
31
27
|
style B fill:#4A90E2
|
|
@@ -34,49 +30,39 @@ graph LR
|
|
|
34
30
|
style M fill:#00D4AA
|
|
35
31
|
style SH fill:#00D4AA
|
|
36
32
|
style D fill:#00D4AA
|
|
37
|
-
style E fill:#00D4AA
|
|
38
|
-
style F fill:#00D4AA
|
|
39
|
-
style G fill:#00D4AA
|
|
40
33
|
style H fill:#4285F4
|
|
41
|
-
style
|
|
34
|
+
style E fill:#FBBC05
|
|
35
|
+
style W fill:#34A853
|
|
36
|
+
style X fill:#EA4335
|
|
42
37
|
```
|
|
43
38
|
|
|
44
|
-
##
|
|
39
|
+
## Quick Start
|
|
45
40
|
|
|
46
|
-
|
|
47
|
-
- Install: `npm install -g @google/gemini-cli`
|
|
48
|
-
- Authenticate: Run `gemini` and login with Google (free tier: 60 req/min, 1000 req/day)
|
|
49
|
-
- Or set API key: `export GEMINI_API_KEY="YOUR_API_KEY"`
|
|
50
|
-
- **Recommended**: Set default model to Gemini 3 Pro (see [Model Configuration](#model-configuration))
|
|
51
|
-
- **Node.js v18+** installed
|
|
52
|
-
- **Claude Code** or compatible MCP client
|
|
41
|
+
### Prerequisites
|
|
53
42
|
|
|
54
|
-
|
|
43
|
+
1. **Install Gemini CLI**: `npm install -g @google/gemini-cli`
|
|
44
|
+
2. **Authenticate**: Run `gemini` and login with Google (free: 60 req/min, 1000 req/day)
|
|
45
|
+
3. **Set default model** (recommended): `export GEMINI_MODEL="gemini-3-pro-preview"`
|
|
55
46
|
|
|
56
|
-
###
|
|
47
|
+
### Install
|
|
57
48
|
|
|
58
|
-
####
|
|
59
|
-
[](https://vscode.dev/redirect/mcp/install?name=gemini-cli&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40tuannvm%2Fgemini-mcp-server%22%5D%7D)
|
|
49
|
+
#### One-Click
|
|
60
50
|
|
|
61
|
-
|
|
62
|
-
[](https://vscode.dev/redirect/mcp/install?name=gemini-cli&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40tuannvm%2Fgemini-mcp-server%22%5D%7D)
|
|
52
|
+
[](https://insiders.vscode.dev/redirect/mcp/install?name=gemini-cli&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40tuannvm%2Fgemini-mcp-server%22%5D%7D)
|
|
53
|
+
[](https://cursor.com/en/install-mcp?name=gemini-cli&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IC15IEB0dWFubnZtL2dlbWluaS1tY3Atc2VydmVyIiwiZW52Ijp7fX0=)
|
|
63
54
|
|
|
64
|
-
####
|
|
65
|
-
[](https://cursor.com/en/install-mcp?name=gemini-cli&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IC15IEB0dWFubnZtL2dlbWluaS1tY3Atc2VydmVyIiwiZW52Ijp7fX0=)
|
|
55
|
+
#### Manual
|
|
66
56
|
|
|
67
|
-
### Manual Installation
|
|
68
|
-
|
|
69
|
-
#### Claude Code
|
|
70
57
|
```bash
|
|
58
|
+
# Claude Code
|
|
71
59
|
claude mcp add gemini-cli -- npx -y @tuannvm/gemini-mcp-server
|
|
72
60
|
```
|
|
73
61
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
62
|
+
<details>
|
|
63
|
+
<summary>Claude Desktop</summary>
|
|
78
64
|
|
|
79
|
-
|
|
65
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%/Claude/claude_desktop_config.json` (Windows):
|
|
80
66
|
|
|
81
67
|
```json
|
|
82
68
|
{
|
|
@@ -88,294 +74,84 @@ Add to your Claude Desktop configuration file:
|
|
|
88
74
|
}
|
|
89
75
|
}
|
|
90
76
|
```
|
|
77
|
+
</details>
|
|
91
78
|
|
|
92
|
-
##
|
|
79
|
+
## What You Can Do
|
|
93
80
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
**
|
|
100
|
-
|
|
101
|
-
Use ask-gemini to analyze @src/main.js and explain what it does
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
**Advanced Usage:**
|
|
105
|
-
```
|
|
106
|
-
# Model selection (defaults to gemini-3-pro-preview)
|
|
107
|
-
Use ask-gemini with model "gemini-3-flash-preview" to quickly summarize @package.json
|
|
108
|
-
|
|
109
|
-
# Sandbox mode for safe code execution
|
|
110
|
-
Use ask-gemini with sandbox true to test @script.py safely
|
|
111
|
-
|
|
112
|
-
# Change mode for structured edits
|
|
113
|
-
Use ask-gemini with changeMode true to refactor @src/utils.ts
|
|
114
|
-
```
|
|
81
|
+
| Tool | What it does |
|
|
82
|
+
|------|--------------|
|
|
83
|
+
| **gemini** | Analyze files and codebases with Gemini's 1M+ token context |
|
|
84
|
+
| **web-search** | Search the web with Google Search grounding |
|
|
85
|
+
| **analyze-media** | Process images, PDFs, and screenshots |
|
|
86
|
+
| **shell** | Generate and execute shell commands |
|
|
87
|
+
| **brainstorm** | Creative ideation with structured methodologies |
|
|
115
88
|
|
|
116
|
-
|
|
117
|
-
- `prompt` (required): Your question or analysis request. Use `@` syntax for file references
|
|
118
|
-
- `model` (optional): Model to use (`gemini-3-pro-preview` or `gemini-3-flash-preview`)
|
|
119
|
-
- `sandbox` (optional): Enable sandbox mode for safe execution
|
|
120
|
-
- `changeMode` (optional): Enable structured edit mode for code changes
|
|
89
|
+
## Gemini CLI Extensions
|
|
121
90
|
|
|
122
|
-
|
|
123
|
-
Search the web using Gemini with Google Search grounding for real-time information.
|
|
124
|
-
|
|
125
|
-
**Basic Usage:**
|
|
126
|
-
```
|
|
127
|
-
Use search to find the latest React 19 features
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
**Advanced Usage:**
|
|
131
|
-
```
|
|
132
|
-
# Get raw results without summarization
|
|
133
|
-
Use search with query "kubernetes security best practices 2025" and summarize false
|
|
134
|
-
|
|
135
|
-
# Use specific model
|
|
136
|
-
Use search with query "latest AI news" and model "gemini-3-pro-preview"
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
**Parameters:**
|
|
140
|
-
- `query` (required): Search query
|
|
141
|
-
- `summarize` (optional): Summarize results (default: true)
|
|
142
|
-
- `model` (optional): Model to use (default: gemini-3-flash-preview for speed)
|
|
143
|
-
|
|
144
|
-
### `analyze-media` - Multimodal Analysis
|
|
145
|
-
Analyze images, PDFs, screenshots, and diagrams using Gemini's multimodal capabilities.
|
|
146
|
-
|
|
147
|
-
**Basic Usage:**
|
|
148
|
-
```
|
|
149
|
-
Use analyze-media with filePath "@screenshot.png" and prompt "describe this UI"
|
|
150
|
-
```
|
|
91
|
+
Enable access to Gmail, Drive, Sheets, Docs, Calendar, and more through Gemini CLI extensions.
|
|
151
92
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
Use analyze-media with filePath "@architecture.pdf" and prompt "explain the system design" and detailed true
|
|
156
|
-
|
|
157
|
-
# Quick analysis with Flash model
|
|
158
|
-
Use analyze-media with filePath "@error.png" and prompt "what's the error?" and model "gemini-3-flash-preview"
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
**Parameters:**
|
|
162
|
-
- `filePath` (required): Path to media file (use `@` syntax)
|
|
163
|
-
- `prompt` (required): What to analyze or extract
|
|
164
|
-
- `model` (optional): Model to use (default: gemini-3-pro-preview for multimodal)
|
|
165
|
-
- `detailed` (optional): Provide detailed analysis
|
|
166
|
-
|
|
167
|
-
### `shell` - Shell Command Generation
|
|
168
|
-
Generate and optionally execute shell commands using Gemini.
|
|
169
|
-
|
|
170
|
-
**Basic Usage:**
|
|
171
|
-
```
|
|
172
|
-
Use shell with task "find all TypeScript files larger than 100KB"
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
**Advanced Usage:**
|
|
176
|
-
```
|
|
177
|
-
# Dry run (default) - explains commands without executing
|
|
178
|
-
Use shell with task "clean up node_modules and rebuild" and dryRun true
|
|
179
|
-
|
|
180
|
-
# Execute in sandbox (safe)
|
|
181
|
-
Use shell with task "run the test suite" and dryRun false
|
|
182
|
-
|
|
183
|
-
# With working directory
|
|
184
|
-
Use shell with task "list all TODO comments" and workingDirectory "@src/"
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
**Parameters:**
|
|
188
|
-
- `task` (required): Description of the shell task
|
|
189
|
-
- `dryRun` (optional): If true, explains commands without executing (default: true)
|
|
190
|
-
- `workingDirectory` (optional): Working directory for execution
|
|
191
|
-
- `model` (optional): Model to use (default: gemini-3-flash-preview)
|
|
192
|
-
|
|
193
|
-
### `brainstorm` - Creative Ideation
|
|
194
|
-
Generate ideas using various brainstorming methodologies.
|
|
195
|
-
|
|
196
|
-
**Basic Usage:**
|
|
197
|
-
```
|
|
198
|
-
Use brainstorm to generate ideas for improving user onboarding
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
**Advanced Usage:**
|
|
202
|
-
```
|
|
203
|
-
# Specific methodology
|
|
204
|
-
Use brainstorm with methodology "SCAMPER" to improve the checkout flow
|
|
205
|
-
|
|
206
|
-
# Domain-specific brainstorming
|
|
207
|
-
Use brainstorm with domain "mobile" and ideaCount 10 for app features
|
|
208
|
-
|
|
209
|
-
# With analysis
|
|
210
|
-
Use brainstorm with includeAnalysis true to evaluate idea feasibility
|
|
93
|
+
```bash
|
|
94
|
+
# Install the Google Workspace extension
|
|
95
|
+
gemini extensions install https://github.com/gemini-cli-extensions/workspace
|
|
211
96
|
```
|
|
212
97
|
|
|
213
|
-
|
|
214
|
-
- `prompt` (required): The brainstorming topic
|
|
215
|
-
- `methodology` (optional): Framework to use (`divergent`, `convergent`, `SCAMPER`, `design-thinking`, `lateral`, `auto`)
|
|
216
|
-
- `domain` (optional): Domain context for specialized ideas
|
|
217
|
-
- `constraints` (optional): Known limitations or requirements
|
|
218
|
-
- `ideaCount` (optional): Target number of ideas to generate
|
|
219
|
-
- `includeAnalysis` (optional): Include feasibility and impact analysis
|
|
220
|
-
|
|
221
|
-
### `fetch-chunk` - Retrieve Cached Chunks
|
|
222
|
-
Retrieve cached chunks from large changeMode responses.
|
|
98
|
+
Then use with `yolo: true` to auto-approve extension tool calls:
|
|
223
99
|
|
|
224
|
-
**Parameters:**
|
|
225
|
-
- `cacheKey` (required): Cache key from previous response
|
|
226
|
-
- `chunkIndex` (required): Chunk index to retrieve (1-based)
|
|
227
|
-
|
|
228
|
-
### `ping` - Connection Test
|
|
229
|
-
Test if the MCP server is working properly.
|
|
230
|
-
|
|
231
|
-
### `help` - Gemini CLI Help
|
|
232
|
-
Get information about Gemini CLI capabilities and commands.
|
|
233
|
-
|
|
234
|
-
## Example Workflows
|
|
235
|
-
|
|
236
|
-
**Large Codebase Analysis:**
|
|
237
|
-
```
|
|
238
|
-
Use ask-gemini to analyze @. and provide an architecture overview
|
|
239
100
|
```
|
|
101
|
+
# Search your Google Drive
|
|
102
|
+
Use gemini with yolo=true to search my Google Drive for Q4 reports
|
|
240
103
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
Use ask-gemini to compare @src/old.ts and @src/new.ts and explain the differences
|
|
244
|
-
```
|
|
104
|
+
# Read a Google Sheet
|
|
105
|
+
Use gemini with yolo=true to read the first sheet from "Budget 2025"
|
|
245
106
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
Use ask-gemini with changeMode true to refactor @src/utils.ts for better error handling
|
|
107
|
+
# Access Gmail
|
|
108
|
+
Use gemini with yolo=true to summarize my last 10 unread emails
|
|
249
109
|
```
|
|
250
110
|
|
|
251
|
-
**
|
|
252
|
-
```
|
|
253
|
-
Use brainstorm with methodology "design-thinking" to improve the user dashboard experience
|
|
254
|
-
```
|
|
111
|
+
> **Note:** Any Gemini CLI extension can be used. Pass the full GitHub URL or local path to `gemini extensions install`.
|
|
255
112
|
|
|
256
|
-
|
|
257
|
-
```
|
|
258
|
-
Use search to find the latest security vulnerabilities in npm packages
|
|
259
|
-
```
|
|
113
|
+
## Examples
|
|
260
114
|
|
|
261
|
-
**Screenshot Analysis:**
|
|
262
|
-
```
|
|
263
|
-
Use analyze-media with filePath "@error-screenshot.png" and prompt "explain this error and suggest a fix"
|
|
264
115
|
```
|
|
116
|
+
# Analyze an entire codebase
|
|
117
|
+
Use gemini to analyze @. and provide an architecture overview
|
|
265
118
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
Use shell with task "find all files modified in the last 24 hours" and dryRun false
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
## Advanced Features
|
|
272
|
-
|
|
273
|
-
### Large File Handling
|
|
274
|
-
- Gemini's massive context window handles large files that would exceed other models' limits
|
|
275
|
-
- Use `@` syntax to reference files: `@src/main.js`, `@.` (current directory)
|
|
276
|
-
- Automatic chunking for very large responses with cache retrieval
|
|
277
|
-
|
|
278
|
-
### Change Mode (Structured Edits)
|
|
279
|
-
When `changeMode` is enabled, responses are formatted as structured edits that can be automatically applied:
|
|
280
|
-
- Parses `**FILE: path:line**` format with `OLD/NEW` blocks
|
|
281
|
-
- Chunks large edit responses for manageable processing
|
|
282
|
-
- 10-minute cache TTL for chunk retrieval
|
|
283
|
-
|
|
284
|
-
### Model Fallback
|
|
285
|
-
- Automatically falls back from `gemini-3-pro-preview` to `gemini-3-flash-preview` when quota is exceeded
|
|
286
|
-
- Transparent retry with status notification
|
|
119
|
+
# Compare files
|
|
120
|
+
Use gemini to compare @src/old.ts and @src/new.ts
|
|
287
121
|
|
|
288
|
-
|
|
289
|
-
|
|
122
|
+
# Search the web
|
|
123
|
+
Use web-search to find the latest React 19 features
|
|
290
124
|
|
|
291
|
-
|
|
125
|
+
# Analyze a screenshot
|
|
126
|
+
Use analyze-media with filePath "@error.png" and prompt "what's this error?"
|
|
292
127
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
You can configure the default Gemini model using three methods (in order of precedence):
|
|
296
|
-
|
|
297
|
-
**1. Environment Variable (Recommended)**
|
|
298
|
-
```bash
|
|
299
|
-
export GEMINI_MODEL="gemini-3-pro-preview"
|
|
128
|
+
# Brainstorm ideas
|
|
129
|
+
Use brainstorm with methodology "design-thinking" to improve user onboarding
|
|
300
130
|
```
|
|
301
131
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
Create `~/.gemini/settings.json` (user-level) or `.gemini/settings.json` (project-level):
|
|
305
|
-
```json
|
|
306
|
-
{
|
|
307
|
-
"model": {
|
|
308
|
-
"name": "gemini-3-pro-preview"
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
**3. Command-Line Flag**
|
|
314
|
-
```bash
|
|
315
|
-
gemini -m gemini-3-pro-preview
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
### Available Models
|
|
319
|
-
|
|
320
|
-
| Model | ID | Best For |
|
|
321
|
-
|-------|-----|----------|
|
|
322
|
-
| **Gemini 3 Pro** (default) | `gemini-3-pro-preview` | Most capable, complex reasoning |
|
|
323
|
-
| **Gemini 3 Flash** | `gemini-3-flash-preview` | Fast responses, good quality |
|
|
324
|
-
| Gemini 2.5 Flash-Lite | `gemini-2.5-flash-lite` | Fastest, lightweight |
|
|
325
|
-
|
|
326
|
-
### Configuration Precedence
|
|
327
|
-
|
|
328
|
-
Settings are applied in order (highest priority last):
|
|
329
|
-
1. Default values
|
|
330
|
-
2. User settings file (`~/.gemini/settings.json`)
|
|
331
|
-
3. Project settings file (`.gemini/settings.json`)
|
|
332
|
-
4. Environment variables (`GEMINI_MODEL`)
|
|
333
|
-
5. Command-line arguments (`-m`)
|
|
334
|
-
6. MCP tool `model` parameter (overrides all)
|
|
335
|
-
|
|
336
|
-
### Recommended Setup
|
|
337
|
-
|
|
338
|
-
For best results, set Gemini 3 Pro as your default:
|
|
339
|
-
|
|
340
|
-
```bash
|
|
341
|
-
# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
|
|
342
|
-
export GEMINI_MODEL="gemini-3-pro-preview"
|
|
343
|
-
```
|
|
132
|
+
## Documentation
|
|
344
133
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
echo '{"model": {"name": "gemini-3-pro-preview"}}' > ~/.gemini/settings.json
|
|
349
|
-
```
|
|
134
|
+
- **[API Reference](docs/api-reference.md)** — Full tool parameters and options
|
|
135
|
+
- **[Gemini CLI Integration](docs/gemini-cli-integration.md)** — Setup, models, and troubleshooting
|
|
136
|
+
- **[Documentation Site](https://tuannvm.github.io/gemini-mcp-server/)**
|
|
350
137
|
|
|
351
138
|
## Development
|
|
352
139
|
|
|
353
140
|
```bash
|
|
354
|
-
# Install dependencies
|
|
355
|
-
npm
|
|
356
|
-
|
|
357
|
-
#
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
# Build
|
|
361
|
-
npm run build
|
|
141
|
+
npm install # Install dependencies
|
|
142
|
+
npm run dev # Development mode
|
|
143
|
+
npm run build # Build
|
|
144
|
+
npm test # Run tests
|
|
145
|
+
```
|
|
362
146
|
|
|
363
|
-
|
|
364
|
-
npm test
|
|
147
|
+
## Acknowledgments
|
|
365
148
|
|
|
366
|
-
|
|
367
|
-
npm run lint
|
|
368
|
-
npm run format
|
|
369
|
-
```
|
|
149
|
+
Inspired by [gemini-mcp-tool](https://github.com/jamubc/gemini-mcp-tool).
|
|
370
150
|
|
|
371
|
-
##
|
|
151
|
+
## Related Projects
|
|
372
152
|
|
|
373
|
-
- [
|
|
374
|
-
- [Gemini CLI Integration](docs/gemini-cli-integration.md)
|
|
375
|
-
- [Full Documentation Site](https://tuannvm.github.io/gemini-mcp-server/)
|
|
153
|
+
- **[codex-mcp-server](https://github.com/tuannvm/codex-mcp-server)** — MCP server for OpenAI Codex CLI with AI-powered code analysis and review
|
|
376
154
|
|
|
377
155
|
## License
|
|
378
156
|
|
|
379
|
-
MIT
|
|
380
|
-
|
|
381
|
-
**Disclaimer:** This is an unofficial, third-party tool and is not affiliated with, endorsed, or sponsored by Google.
|
|
157
|
+
MIT — This is an unofficial tool, not affiliated with Google.
|
package/dist/constants.d.ts
CHANGED
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGnD,eAAO,MAAM,UAAU,WAAW,CAAC;AAGnC,eAAO,MAAM,cAAc;;;;;CAOjB,CAAC;AAGX,eAAO,MAAM,eAAe;;;;;;;;;CAUlB,CAAC;AAGX,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;CAkBX,CAAC;AAGX,eAAO,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGnD,eAAO,MAAM,UAAU,WAAW,CAAC;AAGnC,eAAO,MAAM,cAAc;;;;;CAOjB,CAAC;AAGX,eAAO,MAAM,eAAe;;;;;;;;;CAUlB,CAAC;AAGX,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;CAkBX,CAAC;AAGX,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;CAiBN,CAAC"}
|
package/dist/constants.js
CHANGED
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,6CAA6C;AAC7C,OAAO,EAAiB,MAAM,EAAE,MAAM,YAAY,CAAC;AAEnD,UAAU;AACV,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC;AAEnC,iBAAiB;AACjB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,cAAc,EAAE,yDAAyD;IACzE,oBAAoB,EAClB,sFAAsF;IACxF,cAAc,EAAE,uBAAuB;IACvC,kBAAkB,EAChB,6IAA6I;CACvI,CAAC;AAEX,kBAAkB;AAClB,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,eAAe,EAAE,0DAA0D;IAC3E,WAAW,EAAE,iCAAiC;IAC9C,aAAa,EAAE,oCAAoC;IACnD,iBAAiB,EAAE,iDAAiD;IACpE,eAAe,EAAE,kBAAkB;IACnC,gBAAgB,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iDAAiD;IACpE,eAAe,EAAE,kBAAkB;IACnC,gBAAgB,EACd,+DAA+D;IACjE,mBAAmB,EAAE,uDAAuD;IAC5E,mBAAmB,EAAE,iCAAiC;CAC9C,CAAC;AAEX,yBAAyB;AACzB,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,WAAW;KACvB;IACD,aAAa,EAAE;QACb,IAAI,EAAE,MAAM;KACb;IACD,MAAM,EAAE;QACN,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,QAAQ;KACjB;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,wBAAwB;KACnC;IACD,kBAAkB,EAAE,KAAK;CACjB,CAAC;AAEX,gBAAgB;AAChB,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,QAAQ,EAAE;QACR,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,MAAM;KACb;IACD,KAAK,EAAE;QACL,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;KACf;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,MAAM;QACpB,aAAa,EAAE,OAAO;KACvB;CACO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-media.tool.d.ts","sourceRoot":"","sources":["../../src/tools/analyze-media.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"analyze-media.tool.d.ts","sourceRoot":"","sources":["../../src/tools/analyze-media.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAgC5C,eAAO,MAAM,gBAAgB,EAAE,WAgH9B,CAAC"}
|
|
@@ -6,43 +6,50 @@ const analyzeMediaArgsSchema = z.object({
|
|
|
6
6
|
filePath: z
|
|
7
7
|
.string()
|
|
8
8
|
.min(1)
|
|
9
|
-
.describe('Path to the
|
|
9
|
+
.describe('Path to the media file to analyze. REQUIRED. Use @ prefix for file reference (e.g., @screenshot.png, @diagram.pdf, @photo.jpg). Supports: PNG, JPG, JPEG, GIF, WebP, PDF. Relative paths work from current working directory.'),
|
|
10
10
|
prompt: z
|
|
11
11
|
.string()
|
|
12
12
|
.min(1)
|
|
13
|
-
.describe('What to analyze or extract from the media
|
|
13
|
+
.describe('What to analyze or extract from the media. REQUIRED. Be specific (e.g., "extract all text from this screenshot", "describe the UI components", "summarize this PDF document", "identify objects and their positions").'),
|
|
14
14
|
model: z
|
|
15
15
|
.string()
|
|
16
16
|
.optional()
|
|
17
|
-
.describe(
|
|
17
|
+
.describe("Gemini model to use. DEFAULT: 'gemini-3-pro-preview' (best multimodal understanding). Use 'gemini-3-flash-preview' for faster but less detailed analysis. Pro recommended for complex images or documents."),
|
|
18
18
|
detailed: z
|
|
19
19
|
.boolean()
|
|
20
20
|
.default(false)
|
|
21
|
-
.describe('
|
|
21
|
+
.describe('Enable comprehensive analysis mode. DEFAULT: false. Set to true for structured output with overview, key elements, technical details, observations, and recommendations. Use for complex analysis tasks.'),
|
|
22
22
|
});
|
|
23
23
|
export const analyzeMediaTool = {
|
|
24
24
|
name: 'analyze-media',
|
|
25
25
|
description: 'Analyze images, PDFs, or other media files using Gemini multimodal capabilities. Supports screenshots, diagrams, documents, and more.',
|
|
26
26
|
zodSchema: analyzeMediaArgsSchema,
|
|
27
|
+
annotations: {
|
|
28
|
+
title: 'Analyze Media',
|
|
29
|
+
readOnlyHint: true,
|
|
30
|
+
destructiveHint: false,
|
|
31
|
+
idempotentHint: false,
|
|
32
|
+
openWorldHint: true,
|
|
33
|
+
},
|
|
27
34
|
inputSchema: {
|
|
28
35
|
type: 'object',
|
|
29
36
|
properties: {
|
|
30
37
|
filePath: {
|
|
31
38
|
type: 'string',
|
|
32
|
-
description: 'Path to the
|
|
39
|
+
description: 'Path to the media file to analyze. REQUIRED. Use @ prefix (e.g., @screenshot.png, @diagram.pdf). Supports: PNG, JPG, JPEG, GIF, WebP, PDF.',
|
|
33
40
|
},
|
|
34
41
|
prompt: {
|
|
35
42
|
type: 'string',
|
|
36
|
-
description: 'What to analyze or extract from the media
|
|
43
|
+
description: 'What to analyze or extract from the media. REQUIRED. Be specific (e.g., "extract all text", "describe UI components", "summarize document").',
|
|
37
44
|
},
|
|
38
45
|
model: {
|
|
39
46
|
type: 'string',
|
|
40
|
-
description:
|
|
47
|
+
description: "Gemini model to use. DEFAULT: 'gemini-3-pro-preview' (best multimodal). Use 'gemini-3-flash-preview' for faster but less detailed analysis.",
|
|
41
48
|
},
|
|
42
49
|
detailed: {
|
|
43
50
|
type: 'boolean',
|
|
44
51
|
default: false,
|
|
45
|
-
description: '
|
|
52
|
+
description: 'Enable comprehensive analysis mode. DEFAULT: false. Set to true for structured output with overview, key elements, and recommendations.',
|
|
46
53
|
},
|
|
47
54
|
},
|
|
48
55
|
required: ['filePath', 'prompt'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-media.tool.js","sourceRoot":"","sources":["../../src/tools/analyze-media.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,
|
|
1
|
+
{"version":3,"file":"analyze-media.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C,0BAA0B,YAAY,EAAE,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ask-gemini.tool.d.ts","sourceRoot":"","sources":["../../src/tools/ask-gemini.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ask-gemini.tool.d.ts","sourceRoot":"","sources":["../../src/tools/ask-gemini.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAoD5C,eAAO,MAAM,aAAa,EAAE,WAuG3B,CAAC"}
|