@nerviq/cli 0.0.1 → 0.9.0-beta.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/CHANGELOG.md +181 -0
- package/LICENSE +21 -0
- package/README.md +447 -0
- package/bin/cli.js +749 -0
- package/content/case-study-template.md +91 -0
- package/content/claims-governance.md +37 -0
- package/content/claude-code/audit-repo/SKILL.md +20 -0
- package/content/claude-native-integration.md +60 -0
- package/content/devto-article.json +9 -0
- package/content/launch-posts.md +226 -0
- package/content/pilot-rollout-kit.md +30 -0
- package/content/release-checklist.md +31 -0
- package/package.json +53 -4
- package/src/activity.js +529 -0
- package/src/aider/activity.js +226 -0
- package/src/aider/config-parser.js +166 -0
- package/src/aider/context.js +158 -0
- package/src/aider/deep-review.js +316 -0
- package/src/aider/domain-packs.js +278 -0
- package/src/aider/freshness.js +168 -0
- package/src/aider/governance.js +253 -0
- package/src/aider/interactive.js +334 -0
- package/src/aider/mcp-packs.js +98 -0
- package/src/aider/patch.js +214 -0
- package/src/aider/plans.js +186 -0
- package/src/aider/premium.js +360 -0
- package/src/aider/setup.js +404 -0
- package/src/aider/techniques.js +1323 -0
- package/src/analyze.js +821 -0
- package/src/audit.js +1003 -0
- package/src/badge.js +13 -0
- package/src/benchmark.js +339 -0
- package/src/claudex-sync.json +7 -0
- package/src/codex/activity.js +324 -0
- package/src/codex/config-parser.js +183 -0
- package/src/codex/context.js +221 -0
- package/src/codex/deep-review.js +493 -0
- package/src/codex/domain-packs.js +372 -0
- package/src/codex/freshness.js +167 -0
- package/src/codex/governance.js +192 -0
- package/src/codex/interactive.js +618 -0
- package/src/codex/mcp-packs.js +660 -0
- package/src/codex/patch.js +209 -0
- package/src/codex/plans.js +251 -0
- package/src/codex/premium.js +614 -0
- package/src/codex/setup.js +603 -0
- package/src/codex/techniques.js +2649 -0
- package/src/context.js +272 -0
- package/src/copilot/activity.js +309 -0
- package/src/copilot/config-parser.js +226 -0
- package/src/copilot/context.js +197 -0
- package/src/copilot/deep-review.js +346 -0
- package/src/copilot/domain-packs.js +350 -0
- package/src/copilot/freshness.js +197 -0
- package/src/copilot/governance.js +222 -0
- package/src/copilot/interactive.js +406 -0
- package/src/copilot/mcp-packs.js +572 -0
- package/src/copilot/patch.js +238 -0
- package/src/copilot/plans.js +253 -0
- package/src/copilot/premium.js +450 -0
- package/src/copilot/setup.js +488 -0
- package/src/copilot/techniques.js +1822 -0
- package/src/cursor/activity.js +301 -0
- package/src/cursor/config-parser.js +265 -0
- package/src/cursor/context.js +236 -0
- package/src/cursor/deep-review.js +334 -0
- package/src/cursor/domain-packs.js +346 -0
- package/src/cursor/freshness.js +214 -0
- package/src/cursor/governance.js +229 -0
- package/src/cursor/interactive.js +391 -0
- package/src/cursor/mcp-packs.js +571 -0
- package/src/cursor/patch.js +243 -0
- package/src/cursor/plans.js +254 -0
- package/src/cursor/premium.js +468 -0
- package/src/cursor/setup.js +488 -0
- package/src/cursor/techniques.js +1786 -0
- package/src/deep-review.js +345 -0
- package/src/domain-packs.js +364 -0
- package/src/formatters/sarif.js +115 -0
- package/src/gemini/activity.js +402 -0
- package/src/gemini/config-parser.js +275 -0
- package/src/gemini/context.js +221 -0
- package/src/gemini/deep-review.js +559 -0
- package/src/gemini/domain-packs.js +371 -0
- package/src/gemini/freshness.js +204 -0
- package/src/gemini/governance.js +201 -0
- package/src/gemini/interactive.js +860 -0
- package/src/gemini/mcp-packs.js +658 -0
- package/src/gemini/patch.js +229 -0
- package/src/gemini/plans.js +269 -0
- package/src/gemini/premium.js +759 -0
- package/src/gemini/setup.js +692 -0
- package/src/gemini/techniques.js +2084 -0
- package/src/governance.js +523 -0
- package/src/harmony/advisor.js +383 -0
- package/src/harmony/audit.js +303 -0
- package/src/harmony/canon.js +444 -0
- package/src/harmony/cli.js +331 -0
- package/src/harmony/drift.js +401 -0
- package/src/harmony/governance.js +313 -0
- package/src/harmony/memory.js +238 -0
- package/src/harmony/sync.js +458 -0
- package/src/harmony/watch.js +336 -0
- package/src/index.js +256 -0
- package/src/insights.js +119 -0
- package/src/interactive.js +118 -0
- package/src/mcp-packs.js +597 -0
- package/src/opencode/activity.js +286 -0
- package/src/opencode/config-parser.js +109 -0
- package/src/opencode/context.js +247 -0
- package/src/opencode/deep-review.js +313 -0
- package/src/opencode/domain-packs.js +240 -0
- package/src/opencode/freshness.js +158 -0
- package/src/opencode/governance.js +159 -0
- package/src/opencode/interactive.js +392 -0
- package/src/opencode/mcp-packs.js +474 -0
- package/src/opencode/patch.js +184 -0
- package/src/opencode/plans.js +231 -0
- package/src/opencode/premium.js +413 -0
- package/src/opencode/setup.js +449 -0
- package/src/opencode/techniques.js +1713 -0
- package/src/plans.js +655 -0
- package/src/secret-patterns.js +30 -0
- package/src/setup.js +1274 -0
- package/src/synergy/adaptive.js +261 -0
- package/src/synergy/compensation.js +156 -0
- package/src/synergy/evidence.js +193 -0
- package/src/synergy/learning.js +184 -0
- package/src/synergy/patterns.js +227 -0
- package/src/synergy/ranking.js +83 -0
- package/src/synergy/report.js +163 -0
- package/src/synergy/routing.js +152 -0
- package/src/techniques.js +1354 -0
- package/src/watch.js +229 -0
- package/src/windsurf/activity.js +302 -0
- package/src/windsurf/config-parser.js +267 -0
- package/src/windsurf/context.js +249 -0
- package/src/windsurf/deep-review.js +337 -0
- package/src/windsurf/domain-packs.js +348 -0
- package/src/windsurf/freshness.js +215 -0
- package/src/windsurf/governance.js +231 -0
- package/src/windsurf/interactive.js +388 -0
- package/src/windsurf/mcp-packs.js +535 -0
- package/src/windsurf/patch.js +231 -0
- package/src/windsurf/plans.js +247 -0
- package/src/windsurf/premium.js +467 -0
- package/src/windsurf/setup.js +471 -0
- package/src/windsurf/techniques.js +1758 -0
|
@@ -0,0 +1,658 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gemini CLI MCP Pack System
|
|
3
|
+
*
|
|
4
|
+
* 26 MCP packs with JSON-aware projection, detection,
|
|
5
|
+
* recommendation, merge logic, and trust preflight.
|
|
6
|
+
*
|
|
7
|
+
* Gemini MCP config lives in .gemini/settings.json under mcpServers.<name>.
|
|
8
|
+
* Each server uses JSON format with command/args/env fields.
|
|
9
|
+
*
|
|
10
|
+
* Key differences from Codex:
|
|
11
|
+
* - Config format: JSON (settings.json), not TOML (config.toml)
|
|
12
|
+
* - Tool filtering: excludeTools (deny-list), not enabled_tools (allow-list)
|
|
13
|
+
* - Transports: stdio, sse, httpStreaming
|
|
14
|
+
* - Built-in web search: no need for a separate search MCP pack
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const GEMINI_MCP_PACKS = [
|
|
18
|
+
{
|
|
19
|
+
key: 'context7-docs',
|
|
20
|
+
label: 'Context7 Docs',
|
|
21
|
+
description: 'Live, current framework and library documentation during Gemini CLI sessions.',
|
|
22
|
+
useWhen: 'Repos that use any framework, library, or SDK and benefit from up-to-date docs.',
|
|
23
|
+
adoption: 'Safe default docs pack for most application repos. No auth required.',
|
|
24
|
+
trustLevel: 'high',
|
|
25
|
+
transport: 'stdio',
|
|
26
|
+
requiredAuth: [],
|
|
27
|
+
serverName: 'context7',
|
|
28
|
+
jsonProjection: {
|
|
29
|
+
command: 'npx',
|
|
30
|
+
args: ['-y', '@upstash/context7-mcp@latest'],
|
|
31
|
+
},
|
|
32
|
+
excludeTools: [],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
key: 'github-mcp',
|
|
36
|
+
label: 'GitHub',
|
|
37
|
+
description: 'Issue, PR, and repository context during Gemini CLI sessions.',
|
|
38
|
+
useWhen: 'Repos hosted on GitHub that benefit from issue, PR, and repo context.',
|
|
39
|
+
adoption: 'Recommended for any GitHub-hosted project. Requires GITHUB_PERSONAL_ACCESS_TOKEN.',
|
|
40
|
+
trustLevel: 'medium',
|
|
41
|
+
transport: 'stdio',
|
|
42
|
+
requiredAuth: ['GITHUB_PERSONAL_ACCESS_TOKEN'],
|
|
43
|
+
serverName: 'github',
|
|
44
|
+
jsonProjection: {
|
|
45
|
+
command: 'npx',
|
|
46
|
+
args: ['-y', '@modelcontextprotocol/server-github'],
|
|
47
|
+
env: { GITHUB_PERSONAL_ACCESS_TOKEN: '${GITHUB_PERSONAL_ACCESS_TOKEN}' },
|
|
48
|
+
},
|
|
49
|
+
excludeTools: ['create_repository', 'delete_file', 'push_files'],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: 'playwright-mcp',
|
|
53
|
+
label: 'Playwright Browser',
|
|
54
|
+
description: 'Browser automation, E2E testing, and visual QA.',
|
|
55
|
+
useWhen: 'Frontend repos with E2E tests or browser-based workflows.',
|
|
56
|
+
adoption: 'Recommended for frontend-ui repos with E2E tests. No auth required.',
|
|
57
|
+
trustLevel: 'medium',
|
|
58
|
+
transport: 'stdio',
|
|
59
|
+
requiredAuth: [],
|
|
60
|
+
serverName: 'playwright',
|
|
61
|
+
jsonProjection: {
|
|
62
|
+
command: 'npx',
|
|
63
|
+
args: ['-y', '@playwright/mcp@latest'],
|
|
64
|
+
},
|
|
65
|
+
excludeTools: [],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
key: 'postgres-mcp',
|
|
69
|
+
label: 'PostgreSQL',
|
|
70
|
+
description: 'Schema inspection and query assistance for PostgreSQL databases.',
|
|
71
|
+
useWhen: 'Repos with PostgreSQL databases that benefit from schema and query context.',
|
|
72
|
+
adoption: 'Useful for backend-api and data-pipeline repos. Requires DATABASE_URL.',
|
|
73
|
+
trustLevel: 'low',
|
|
74
|
+
transport: 'stdio',
|
|
75
|
+
requiredAuth: ['DATABASE_URL'],
|
|
76
|
+
serverName: 'postgres',
|
|
77
|
+
jsonProjection: {
|
|
78
|
+
command: 'npx',
|
|
79
|
+
args: ['-y', '@modelcontextprotocol/server-postgres', '${DATABASE_URL}'],
|
|
80
|
+
},
|
|
81
|
+
excludeTools: ['execute_sql'],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
key: 'memory-mcp',
|
|
85
|
+
label: 'Memory / Knowledge Graph',
|
|
86
|
+
description: 'Persistent entity and relationship tracking across Gemini CLI sessions.',
|
|
87
|
+
useWhen: 'Long-running or complex projects with many interconnected concepts.',
|
|
88
|
+
adoption: 'Safe for any repo. Stores data locally. No auth required.',
|
|
89
|
+
trustLevel: 'high',
|
|
90
|
+
transport: 'stdio',
|
|
91
|
+
requiredAuth: [],
|
|
92
|
+
serverName: 'memory',
|
|
93
|
+
jsonProjection: {
|
|
94
|
+
command: 'npx',
|
|
95
|
+
args: ['-y', '@modelcontextprotocol/server-memory'],
|
|
96
|
+
},
|
|
97
|
+
excludeTools: [],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
key: 'sequential-thinking',
|
|
101
|
+
label: 'Sequential Thinking',
|
|
102
|
+
description: 'Structured step-by-step reasoning for complex problem-solving.',
|
|
103
|
+
useWhen: 'Complex problem-solving sessions that benefit from structured reasoning.',
|
|
104
|
+
adoption: 'Safe default for any repo. No auth required.',
|
|
105
|
+
trustLevel: 'high',
|
|
106
|
+
transport: 'stdio',
|
|
107
|
+
requiredAuth: [],
|
|
108
|
+
serverName: 'sequential-thinking',
|
|
109
|
+
jsonProjection: {
|
|
110
|
+
command: 'npx',
|
|
111
|
+
args: ['-y', '@modelcontextprotocol/server-sequential-thinking'],
|
|
112
|
+
},
|
|
113
|
+
excludeTools: [],
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
key: 'filesystem-mcp',
|
|
117
|
+
label: 'Filesystem',
|
|
118
|
+
description: 'Read-only filesystem access for documentation and reference files.',
|
|
119
|
+
useWhen: 'Repos with reference files, docs, or config that Gemini CLI needs to read outside sandbox.',
|
|
120
|
+
adoption: 'Read-only default. Pass allowed directories as args.',
|
|
121
|
+
trustLevel: 'medium',
|
|
122
|
+
transport: 'stdio',
|
|
123
|
+
requiredAuth: [],
|
|
124
|
+
serverName: 'filesystem',
|
|
125
|
+
jsonProjection: {
|
|
126
|
+
command: 'npx',
|
|
127
|
+
args: ['-y', '@modelcontextprotocol/server-filesystem', '.'],
|
|
128
|
+
},
|
|
129
|
+
excludeTools: ['write_file', 'create_directory', 'move_file'],
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
key: 'fetch-mcp',
|
|
133
|
+
label: 'Fetch / HTTP',
|
|
134
|
+
description: 'HTTP access for fetching web pages, APIs, and documentation.',
|
|
135
|
+
useWhen: 'Repos that need HTTP access to external APIs or documentation sources.',
|
|
136
|
+
adoption: 'Useful for repos integrating external services. No auth required.',
|
|
137
|
+
trustLevel: 'medium',
|
|
138
|
+
transport: 'stdio',
|
|
139
|
+
requiredAuth: [],
|
|
140
|
+
serverName: 'fetch',
|
|
141
|
+
jsonProjection: {
|
|
142
|
+
command: 'npx',
|
|
143
|
+
args: ['-y', '@modelcontextprotocol/server-fetch'],
|
|
144
|
+
},
|
|
145
|
+
excludeTools: [],
|
|
146
|
+
},
|
|
147
|
+
// --- Parity expansion: 18 additional packs ---
|
|
148
|
+
{
|
|
149
|
+
key: 'next-devtools',
|
|
150
|
+
label: 'Next.js Devtools',
|
|
151
|
+
description: 'Runtime-aware debugging and framework-specific tooling for Next.js.',
|
|
152
|
+
useWhen: 'Next.js repos that need runtime-aware debugging.',
|
|
153
|
+
adoption: 'Useful companion for frontend-ui repos running Next.js.',
|
|
154
|
+
trustLevel: 'medium',
|
|
155
|
+
transport: 'stdio',
|
|
156
|
+
requiredAuth: [],
|
|
157
|
+
serverName: 'next-devtools',
|
|
158
|
+
jsonProjection: { command: 'npx', args: ['-y', 'next-devtools-mcp@latest'] },
|
|
159
|
+
excludeTools: [],
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
key: 'docker-mcp',
|
|
163
|
+
label: 'Docker',
|
|
164
|
+
description: 'Container management during Gemini CLI sessions.',
|
|
165
|
+
useWhen: 'Repos with containerized workflows.',
|
|
166
|
+
adoption: 'Requires Docker running locally.',
|
|
167
|
+
trustLevel: 'medium',
|
|
168
|
+
transport: 'stdio',
|
|
169
|
+
requiredAuth: [],
|
|
170
|
+
serverName: 'docker',
|
|
171
|
+
jsonProjection: { command: 'npx', args: ['-y', '@hypnosis/docker-mcp-server'] },
|
|
172
|
+
excludeTools: ['remove_container', 'remove_image'],
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
key: 'notion-mcp',
|
|
176
|
+
label: 'Notion',
|
|
177
|
+
description: 'Access Notion documentation and wikis.',
|
|
178
|
+
useWhen: 'Teams using Notion for docs or knowledge bases.',
|
|
179
|
+
adoption: 'Requires NOTION_API_KEY.',
|
|
180
|
+
trustLevel: 'medium',
|
|
181
|
+
transport: 'stdio',
|
|
182
|
+
requiredAuth: ['NOTION_API_KEY'],
|
|
183
|
+
serverName: 'notion',
|
|
184
|
+
jsonProjection: { command: 'npx', args: ['-y', '@notionhq/notion-mcp-server'], env: { NOTION_API_KEY: '${NOTION_API_KEY}' } },
|
|
185
|
+
excludeTools: [],
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
key: 'linear-mcp',
|
|
189
|
+
label: 'Linear',
|
|
190
|
+
description: 'Issue tracking and sprint context.',
|
|
191
|
+
useWhen: 'Teams using Linear for issue tracking.',
|
|
192
|
+
adoption: 'Requires LINEAR_API_KEY.',
|
|
193
|
+
trustLevel: 'medium',
|
|
194
|
+
transport: 'stdio',
|
|
195
|
+
requiredAuth: ['LINEAR_API_KEY'],
|
|
196
|
+
serverName: 'linear',
|
|
197
|
+
jsonProjection: { command: 'npx', args: ['-y', '@mseep/linear-mcp'], env: { LINEAR_API_KEY: '${LINEAR_API_KEY}' } },
|
|
198
|
+
excludeTools: [],
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
key: 'sentry-mcp',
|
|
202
|
+
label: 'Sentry',
|
|
203
|
+
description: 'Error tracking and debugging context.',
|
|
204
|
+
useWhen: 'Repos with Sentry error tracking.',
|
|
205
|
+
adoption: 'Requires SENTRY_AUTH_TOKEN.',
|
|
206
|
+
trustLevel: 'medium',
|
|
207
|
+
transport: 'stdio',
|
|
208
|
+
requiredAuth: ['SENTRY_AUTH_TOKEN'],
|
|
209
|
+
serverName: 'sentry',
|
|
210
|
+
jsonProjection: { command: 'npx', args: ['-y', '@sentry/mcp-server'], env: { SENTRY_AUTH_TOKEN: '${SENTRY_AUTH_TOKEN}' } },
|
|
211
|
+
excludeTools: [],
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
key: 'slack-mcp',
|
|
215
|
+
label: 'Slack',
|
|
216
|
+
description: 'Draft and preview Slack messages.',
|
|
217
|
+
useWhen: 'Teams using Slack for communication.',
|
|
218
|
+
adoption: 'Requires SLACK_BOT_TOKEN.',
|
|
219
|
+
trustLevel: 'low',
|
|
220
|
+
transport: 'stdio',
|
|
221
|
+
requiredAuth: ['SLACK_BOT_TOKEN'],
|
|
222
|
+
serverName: 'slack',
|
|
223
|
+
jsonProjection: { command: 'npx', args: ['-y', 'slack-mcp-server'], env: { SLACK_BOT_TOKEN: '${SLACK_BOT_TOKEN}' } },
|
|
224
|
+
excludeTools: ['delete_message'],
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
key: 'stripe-mcp',
|
|
228
|
+
label: 'Stripe',
|
|
229
|
+
description: 'Payment and billing workflow context.',
|
|
230
|
+
useWhen: 'Repos with Stripe integration.',
|
|
231
|
+
adoption: 'Requires STRIPE_API_KEY.',
|
|
232
|
+
trustLevel: 'low',
|
|
233
|
+
transport: 'stdio',
|
|
234
|
+
requiredAuth: ['STRIPE_API_KEY'],
|
|
235
|
+
serverName: 'stripe',
|
|
236
|
+
jsonProjection: { command: 'npx', args: ['-y', '@stripe/mcp'], env: { STRIPE_API_KEY: '${STRIPE_API_KEY}' } },
|
|
237
|
+
excludeTools: ['create_charge', 'delete_customer'],
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
key: 'figma-mcp',
|
|
241
|
+
label: 'Figma',
|
|
242
|
+
description: 'Design file access and component inspection.',
|
|
243
|
+
useWhen: 'Design-heavy repos needing Figma access.',
|
|
244
|
+
adoption: 'Requires FIGMA_ACCESS_TOKEN.',
|
|
245
|
+
trustLevel: 'medium',
|
|
246
|
+
transport: 'stdio',
|
|
247
|
+
requiredAuth: ['FIGMA_ACCESS_TOKEN'],
|
|
248
|
+
serverName: 'figma',
|
|
249
|
+
jsonProjection: { command: 'npx', args: ['-y', 'claude-talk-to-figma-mcp'], env: { FIGMA_ACCESS_TOKEN: '${FIGMA_ACCESS_TOKEN}' } },
|
|
250
|
+
excludeTools: [],
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
key: 'mcp-security',
|
|
254
|
+
label: 'MCP Security Scanner',
|
|
255
|
+
description: 'Scan MCP servers for tool poisoning and prompt injection.',
|
|
256
|
+
useWhen: 'Any repo with 2+ MCP servers.',
|
|
257
|
+
adoption: 'Safety companion for multi-MCP setups.',
|
|
258
|
+
trustLevel: 'high',
|
|
259
|
+
transport: 'stdio',
|
|
260
|
+
requiredAuth: [],
|
|
261
|
+
serverName: 'mcp-scan',
|
|
262
|
+
jsonProjection: { command: 'npx', args: ['-y', 'mcp-scan@latest'] },
|
|
263
|
+
excludeTools: [],
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
key: 'composio-mcp',
|
|
267
|
+
label: 'Composio Universal',
|
|
268
|
+
description: '500+ integrations through a single MCP gateway.',
|
|
269
|
+
useWhen: 'Enterprise or integration-heavy repos.',
|
|
270
|
+
adoption: 'Requires COMPOSIO_API_KEY.',
|
|
271
|
+
trustLevel: 'medium',
|
|
272
|
+
transport: 'stdio',
|
|
273
|
+
requiredAuth: ['COMPOSIO_API_KEY'],
|
|
274
|
+
serverName: 'composio',
|
|
275
|
+
jsonProjection: { command: 'npx', args: ['-y', '@composio/mcp'], env: { COMPOSIO_API_KEY: '${COMPOSIO_API_KEY}' } },
|
|
276
|
+
excludeTools: [],
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
key: 'jira-confluence',
|
|
280
|
+
label: 'Jira',
|
|
281
|
+
description: 'Issue tracking and project management.',
|
|
282
|
+
useWhen: 'Teams using Atlassian Jira.',
|
|
283
|
+
adoption: 'Requires ATLASSIAN_API_TOKEN and ATLASSIAN_EMAIL.',
|
|
284
|
+
trustLevel: 'medium',
|
|
285
|
+
transport: 'stdio',
|
|
286
|
+
requiredAuth: ['ATLASSIAN_API_TOKEN', 'ATLASSIAN_EMAIL'],
|
|
287
|
+
serverName: 'jira',
|
|
288
|
+
jsonProjection: { command: 'npx', args: ['-y', 'jira-mcp'], env: { ATLASSIAN_API_TOKEN: '${ATLASSIAN_API_TOKEN}', ATLASSIAN_EMAIL: '${ATLASSIAN_EMAIL}' } },
|
|
289
|
+
excludeTools: [],
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
key: 'ga4-analytics',
|
|
293
|
+
label: 'Google Analytics 4',
|
|
294
|
+
description: 'Live GA4 data, attribution, and audience insights.',
|
|
295
|
+
useWhen: 'Repos with web analytics needs.',
|
|
296
|
+
adoption: 'Requires GA4_PROPERTY_ID and GOOGLE_APPLICATION_CREDENTIALS.',
|
|
297
|
+
trustLevel: 'medium',
|
|
298
|
+
transport: 'stdio',
|
|
299
|
+
requiredAuth: ['GA4_PROPERTY_ID', 'GOOGLE_APPLICATION_CREDENTIALS'],
|
|
300
|
+
serverName: 'ga4',
|
|
301
|
+
jsonProjection: { command: 'npx', args: ['-y', 'mcp-server-ga4'], env: { GA4_PROPERTY_ID: '${GA4_PROPERTY_ID}', GOOGLE_APPLICATION_CREDENTIALS: '${GOOGLE_APPLICATION_CREDENTIALS}' } },
|
|
302
|
+
excludeTools: [],
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
key: 'search-console',
|
|
306
|
+
label: 'Google Search Console',
|
|
307
|
+
description: 'Search performance and indexing data.',
|
|
308
|
+
useWhen: 'SEO-focused repos.',
|
|
309
|
+
adoption: 'Requires Google OAuth credentials.',
|
|
310
|
+
trustLevel: 'medium',
|
|
311
|
+
transport: 'stdio',
|
|
312
|
+
requiredAuth: ['GOOGLE_CLIENT_ID', 'GOOGLE_CLIENT_SECRET'],
|
|
313
|
+
serverName: 'gsc',
|
|
314
|
+
jsonProjection: { command: 'npx', args: ['-y', 'mcp-gsc@latest'], env: { GOOGLE_CLIENT_ID: '${GOOGLE_CLIENT_ID}', GOOGLE_CLIENT_SECRET: '${GOOGLE_CLIENT_SECRET}' } },
|
|
315
|
+
excludeTools: [],
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
key: 'n8n-workflows',
|
|
319
|
+
label: 'n8n Workflow Automation',
|
|
320
|
+
description: 'Workflow automation with 1,396 integration nodes.',
|
|
321
|
+
useWhen: 'Teams using n8n for workflow automation.',
|
|
322
|
+
adoption: 'Requires N8N_URL and N8N_API_KEY.',
|
|
323
|
+
trustLevel: 'medium',
|
|
324
|
+
transport: 'stdio',
|
|
325
|
+
requiredAuth: ['N8N_URL', 'N8N_API_KEY'],
|
|
326
|
+
serverName: 'n8n',
|
|
327
|
+
jsonProjection: { command: 'npx', args: ['-y', 'n8n-mcp-server@latest'], env: { N8N_URL: '${N8N_URL}', N8N_API_KEY: '${N8N_API_KEY}' } },
|
|
328
|
+
excludeTools: [],
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
key: 'zendesk-mcp',
|
|
332
|
+
label: 'Zendesk',
|
|
333
|
+
description: 'Ticket management and help center content.',
|
|
334
|
+
useWhen: 'Support teams using Zendesk.',
|
|
335
|
+
adoption: 'Requires ZENDESK_API_TOKEN and ZENDESK_SUBDOMAIN.',
|
|
336
|
+
trustLevel: 'medium',
|
|
337
|
+
transport: 'stdio',
|
|
338
|
+
requiredAuth: ['ZENDESK_API_TOKEN', 'ZENDESK_SUBDOMAIN'],
|
|
339
|
+
serverName: 'zendesk',
|
|
340
|
+
jsonProjection: { command: 'npx', args: ['-y', 'zendesk-mcp'], env: { ZENDESK_API_TOKEN: '${ZENDESK_API_TOKEN}', ZENDESK_SUBDOMAIN: '${ZENDESK_SUBDOMAIN}' } },
|
|
341
|
+
excludeTools: [],
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
key: 'infisical-secrets',
|
|
345
|
+
label: 'Infisical Secrets',
|
|
346
|
+
description: 'Secrets management with auto-rotation.',
|
|
347
|
+
useWhen: 'Repos using Infisical for secrets.',
|
|
348
|
+
adoption: 'Requires INFISICAL_TOKEN.',
|
|
349
|
+
trustLevel: 'low',
|
|
350
|
+
transport: 'stdio',
|
|
351
|
+
requiredAuth: ['INFISICAL_TOKEN'],
|
|
352
|
+
serverName: 'infisical',
|
|
353
|
+
jsonProjection: { command: 'npx', args: ['-y', '@infisical/mcp'], env: { INFISICAL_TOKEN: '${INFISICAL_TOKEN}' } },
|
|
354
|
+
excludeTools: ['delete_secret', 'update_secret'],
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
key: 'shopify-mcp',
|
|
358
|
+
label: 'Shopify',
|
|
359
|
+
description: 'Shopify API and deployment tooling.',
|
|
360
|
+
useWhen: 'Shopify stores and apps.',
|
|
361
|
+
adoption: 'Requires SHOPIFY_ACCESS_TOKEN.',
|
|
362
|
+
trustLevel: 'medium',
|
|
363
|
+
transport: 'stdio',
|
|
364
|
+
requiredAuth: ['SHOPIFY_ACCESS_TOKEN'],
|
|
365
|
+
serverName: 'shopify',
|
|
366
|
+
jsonProjection: { command: 'npx', args: ['-y', 'shopify-mcp'], env: { SHOPIFY_ACCESS_TOKEN: '${SHOPIFY_ACCESS_TOKEN}' } },
|
|
367
|
+
excludeTools: [],
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
key: 'huggingface-mcp',
|
|
371
|
+
label: 'Hugging Face',
|
|
372
|
+
description: 'Model search, dataset discovery, and Spaces.',
|
|
373
|
+
useWhen: 'AI/ML repos needing model registry access.',
|
|
374
|
+
adoption: 'Requires HF_TOKEN.',
|
|
375
|
+
trustLevel: 'medium',
|
|
376
|
+
transport: 'stdio',
|
|
377
|
+
requiredAuth: ['HF_TOKEN'],
|
|
378
|
+
serverName: 'huggingface',
|
|
379
|
+
jsonProjection: { command: 'npx', args: ['-y', 'huggingface-mcp-server'], env: { HF_TOKEN: '${HF_TOKEN}' } },
|
|
380
|
+
excludeTools: [],
|
|
381
|
+
},
|
|
382
|
+
];
|
|
383
|
+
|
|
384
|
+
// --- Helpers ---
|
|
385
|
+
|
|
386
|
+
function clone(value) {
|
|
387
|
+
return JSON.parse(JSON.stringify(value));
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
function hasDependency(deps, name) {
|
|
391
|
+
return Object.prototype.hasOwnProperty.call(deps || {}, name);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
function hasFileContentMatch(ctx, filePath, pattern) {
|
|
395
|
+
if (!ctx) return false;
|
|
396
|
+
const content = ctx.fileContent(filePath);
|
|
397
|
+
return !!(content && pattern.test(content));
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
function getProjectDependencies(ctx) {
|
|
401
|
+
if (!ctx) return {};
|
|
402
|
+
if (typeof ctx.projectDependencies === 'function') {
|
|
403
|
+
return ctx.projectDependencies();
|
|
404
|
+
}
|
|
405
|
+
const pkg = ctx.jsonFile('package.json') || {};
|
|
406
|
+
return {
|
|
407
|
+
...(pkg.dependencies || {}),
|
|
408
|
+
...(pkg.devDependencies || {}),
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
function hasPostgresSignals(ctx, deps) {
|
|
413
|
+
if (
|
|
414
|
+
hasDependency(deps, 'pg') ||
|
|
415
|
+
hasDependency(deps, 'postgres') ||
|
|
416
|
+
hasDependency(deps, 'pg-promise') ||
|
|
417
|
+
hasDependency(deps, 'slonik') ||
|
|
418
|
+
hasDependency(deps, '@neondatabase/serverless') ||
|
|
419
|
+
hasDependency(deps, '@vercel/postgres')
|
|
420
|
+
) {
|
|
421
|
+
return true;
|
|
422
|
+
}
|
|
423
|
+
return (
|
|
424
|
+
hasFileContentMatch(ctx, 'prisma/schema.prisma', /provider\s*=\s*["']postgresql["']/i) ||
|
|
425
|
+
hasFileContentMatch(ctx, 'docker-compose.yml', /\bpostgres\b/i) ||
|
|
426
|
+
hasFileContentMatch(ctx, 'docker-compose.yaml', /\bpostgres\b/i) ||
|
|
427
|
+
hasFileContentMatch(ctx, '.env', /postgres(?:ql)?:\/\//i) ||
|
|
428
|
+
hasFileContentMatch(ctx, '.env.example', /postgres(?:ql)?:\/\//i)
|
|
429
|
+
);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// --- Core Functions ---
|
|
433
|
+
|
|
434
|
+
function getGeminiMcpPack(key) {
|
|
435
|
+
return GEMINI_MCP_PACKS.find(pack => pack.key === key) || null;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function normalizeGeminiMcpPackKeys(keys = []) {
|
|
439
|
+
return [...new Set((Array.isArray(keys) ? keys : [])
|
|
440
|
+
.map(key => `${key}`.trim())
|
|
441
|
+
.filter(Boolean))]
|
|
442
|
+
.filter(key => !!getGeminiMcpPack(key));
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Generate JSON settings.json mcpServers entry for a single MCP pack.
|
|
447
|
+
* Returns a plain object: { [serverName]: { command, args, env?, excludeTools? } }
|
|
448
|
+
*/
|
|
449
|
+
function packToJson(pack) {
|
|
450
|
+
const entry = {};
|
|
451
|
+
const proj = pack.jsonProjection;
|
|
452
|
+
|
|
453
|
+
if (proj.command) {
|
|
454
|
+
entry.command = proj.command;
|
|
455
|
+
}
|
|
456
|
+
if (proj.url) {
|
|
457
|
+
entry.url = proj.url;
|
|
458
|
+
}
|
|
459
|
+
if (proj.args && proj.args.length > 0) {
|
|
460
|
+
entry.args = [...proj.args];
|
|
461
|
+
}
|
|
462
|
+
if (proj.env && Object.keys(proj.env).length > 0) {
|
|
463
|
+
entry.env = { ...proj.env };
|
|
464
|
+
}
|
|
465
|
+
if (pack.excludeTools && pack.excludeTools.length > 0) {
|
|
466
|
+
entry.excludeTools = [...pack.excludeTools];
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
return { [pack.serverName]: entry };
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Detect which MCP packs to recommend for a Gemini CLI project.
|
|
474
|
+
*/
|
|
475
|
+
function recommendGeminiMcpPacks(stacks = [], domainPacks = [], options = {}) {
|
|
476
|
+
const recommended = new Set();
|
|
477
|
+
const stackKeys = new Set(stacks.map(s => s.key));
|
|
478
|
+
const ctx = options.ctx || null;
|
|
479
|
+
const deps = getProjectDependencies(ctx);
|
|
480
|
+
const domainKeys = new Set(domainPacks.map(p => p.key));
|
|
481
|
+
|
|
482
|
+
// Context7 docs for any project with detected stacks
|
|
483
|
+
if (stackKeys.size > 0) {
|
|
484
|
+
recommended.add('context7-docs');
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
// GitHub for collaborative / governed repos
|
|
488
|
+
if (domainKeys.has('enterprise-governed') || domainKeys.has('monorepo')) {
|
|
489
|
+
recommended.add('github-mcp');
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
// Playwright for frontend repos
|
|
493
|
+
if (
|
|
494
|
+
domainKeys.has('frontend-ui') ||
|
|
495
|
+
stackKeys.has('react') || stackKeys.has('nextjs') ||
|
|
496
|
+
stackKeys.has('vue') || stackKeys.has('angular') || stackKeys.has('svelte')
|
|
497
|
+
) {
|
|
498
|
+
recommended.add('playwright-mcp');
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
// Next.js devtools for Next.js repos
|
|
502
|
+
if (stackKeys.has('nextjs') || hasDependency(deps, 'next')) {
|
|
503
|
+
recommended.add('next-devtools');
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
// Postgres when explicit signals exist
|
|
507
|
+
if (
|
|
508
|
+
(domainKeys.has('backend-api') || domainKeys.has('infra-platform')) &&
|
|
509
|
+
hasPostgresSignals(ctx, deps)
|
|
510
|
+
) {
|
|
511
|
+
recommended.add('postgres-mcp');
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// Memory for complex / monorepo / long-lived projects
|
|
515
|
+
if (domainKeys.has('monorepo') || domainKeys.has('enterprise-governed')) {
|
|
516
|
+
recommended.add('memory-mcp');
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
// Sequential thinking for complex problem-solving
|
|
520
|
+
if (domainKeys.has('enterprise-governed') || domainKeys.has('monorepo') || domainKeys.has('infra-platform')) {
|
|
521
|
+
recommended.add('sequential-thinking');
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
// Filesystem for infra repos with reference docs
|
|
525
|
+
if (domainKeys.has('infra-platform')) {
|
|
526
|
+
recommended.add('filesystem-mcp');
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
// Fetch for repos with external API integrations
|
|
530
|
+
if (domainKeys.has('backend-api') && ctx && (
|
|
531
|
+
hasDependency(deps, 'axios') ||
|
|
532
|
+
hasDependency(deps, 'node-fetch') ||
|
|
533
|
+
hasDependency(deps, 'got') ||
|
|
534
|
+
hasDependency(deps, 'ky') ||
|
|
535
|
+
hasDependency(deps, 'undici')
|
|
536
|
+
)) {
|
|
537
|
+
recommended.add('fetch-mcp');
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// Docker for containerized repos
|
|
541
|
+
if (domainKeys.has('infra-platform') || domainKeys.has('devops-cicd')) {
|
|
542
|
+
recommended.add('docker-mcp');
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// Stripe for e-commerce repos
|
|
546
|
+
if (domainKeys.has('ecommerce') && (hasDependency(deps, 'stripe') || hasDependency(deps, '@stripe/stripe-js'))) {
|
|
547
|
+
recommended.add('stripe-mcp');
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// Shopify for e-commerce repos with Shopify
|
|
551
|
+
if (domainKeys.has('ecommerce') && (hasDependency(deps, 'shopify') || hasDependency(deps, '@shopify/shopify-api'))) {
|
|
552
|
+
recommended.add('shopify-mcp');
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
// Hugging Face for AI/ML repos
|
|
556
|
+
if (domainKeys.has('ai-ml')) {
|
|
557
|
+
recommended.add('huggingface-mcp');
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
// Figma for design system repos
|
|
561
|
+
if (domainKeys.has('design-system')) {
|
|
562
|
+
recommended.add('figma-mcp');
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
// MCP security scanner when 2+ packs recommended
|
|
566
|
+
if (recommended.size >= 2) {
|
|
567
|
+
recommended.add('mcp-security');
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
// Fallback: always recommend context7 if nothing else matched
|
|
571
|
+
if (recommended.size === 0) {
|
|
572
|
+
recommended.add('context7-docs');
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// Note: Gemini CLI has built-in web search, so no separate search MCP pack is needed.
|
|
576
|
+
|
|
577
|
+
return GEMINI_MCP_PACKS
|
|
578
|
+
.filter(pack => recommended.has(pack.key))
|
|
579
|
+
.map(pack => clone(pack));
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* Trust preflight: check if packs are safe to install.
|
|
584
|
+
*/
|
|
585
|
+
function getGeminiMcpPreflight(packKeys = [], env = process.env) {
|
|
586
|
+
return normalizeGeminiMcpPackKeys(packKeys)
|
|
587
|
+
.map(key => {
|
|
588
|
+
const pack = getGeminiMcpPack(key);
|
|
589
|
+
if (!pack) return null;
|
|
590
|
+
const missingEnvVars = pack.requiredAuth.filter(envKey => {
|
|
591
|
+
const value = env && Object.prototype.hasOwnProperty.call(env, envKey) ? env[envKey] : '';
|
|
592
|
+
return !`${value || ''}`.trim();
|
|
593
|
+
});
|
|
594
|
+
return {
|
|
595
|
+
key,
|
|
596
|
+
label: pack.label,
|
|
597
|
+
trustLevel: pack.trustLevel,
|
|
598
|
+
transport: pack.transport,
|
|
599
|
+
requiredAuth: pack.requiredAuth,
|
|
600
|
+
missingEnvVars,
|
|
601
|
+
safe: missingEnvVars.length === 0,
|
|
602
|
+
warning: missingEnvVars.length > 0
|
|
603
|
+
? `Missing env vars: ${missingEnvVars.join(', ')}. Pack will be included but may fail at runtime.`
|
|
604
|
+
: null,
|
|
605
|
+
};
|
|
606
|
+
})
|
|
607
|
+
.filter(Boolean);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* Merge JSON: merge new MCP pack entries into existing settings.json content.
|
|
612
|
+
* Returns the updated settings object (does not write to disk).
|
|
613
|
+
*
|
|
614
|
+
* @param {object|string} existingSettings - Existing settings.json content (object or JSON string)
|
|
615
|
+
* @param {string[]} packKeys - Array of MCP pack keys to merge
|
|
616
|
+
* @returns {object} Updated settings object with new mcpServers entries
|
|
617
|
+
*/
|
|
618
|
+
function mergeGeminiMcpJson(existingSettings = {}, packKeys = []) {
|
|
619
|
+
// Parse if string
|
|
620
|
+
let settings;
|
|
621
|
+
if (typeof existingSettings === 'string') {
|
|
622
|
+
try {
|
|
623
|
+
settings = JSON.parse(existingSettings);
|
|
624
|
+
} catch {
|
|
625
|
+
settings = {};
|
|
626
|
+
}
|
|
627
|
+
} else {
|
|
628
|
+
settings = clone(existingSettings);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
// Ensure mcpServers object exists
|
|
632
|
+
if (!settings.mcpServers || typeof settings.mcpServers !== 'object') {
|
|
633
|
+
settings.mcpServers = {};
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
const existingServers = new Set(Object.keys(settings.mcpServers));
|
|
637
|
+
|
|
638
|
+
const newPacks = normalizeGeminiMcpPackKeys(packKeys)
|
|
639
|
+
.map(key => getGeminiMcpPack(key))
|
|
640
|
+
.filter(pack => pack && !existingServers.has(pack.serverName));
|
|
641
|
+
|
|
642
|
+
for (const pack of newPacks) {
|
|
643
|
+
const entry = packToJson(pack);
|
|
644
|
+
const serverName = Object.keys(entry)[0];
|
|
645
|
+
settings.mcpServers[serverName] = entry[serverName];
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
return settings;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
module.exports = {
|
|
652
|
+
GEMINI_MCP_PACKS,
|
|
653
|
+
getGeminiMcpPack,
|
|
654
|
+
recommendGeminiMcpPacks,
|
|
655
|
+
getGeminiMcpPreflight,
|
|
656
|
+
mergeGeminiMcpJson,
|
|
657
|
+
packToJson,
|
|
658
|
+
};
|