projecta-rrr 1.6.0 → 1.6.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 CHANGED
@@ -77,6 +77,13 @@ npx projecta-rrr
77
77
 
78
78
  That's it. Verify with `/rrr:help` inside your Claude Code interface.
79
79
 
80
+ > **Installed from inside Claude Code?** Slash commands won't load until you restart:
81
+ > 1. Type `exit` to quit Claude Code
82
+ > 2. Run `claude` again
83
+ > 3. Then run `/rrr:help`
84
+ >
85
+ > This resolves "Unknown skill: rrr:help" errors.
86
+
80
87
  ### Staying Updated
81
88
 
82
89
  RRR evolves fast. Check for updates periodically:
@@ -219,6 +226,71 @@ If you choose a non-default provider, RRR asks for a reason and records it in De
219
226
 
220
227
  These are allowed but require explicit justification: Firebase, Supabase, Auth0, Vercel, PlanetScale.
221
228
 
229
+ ### MCP Auto-Setup
230
+
231
+ RRR includes an MCP registry that maps your selected providers to their MCP servers. After `/rrr:new-project` generates your `MVP_FEATURES.yml`:
232
+
233
+ ```bash
234
+ npm run mcp:setup
235
+ ```
236
+
237
+ This reads your feature selections and outputs the MCP configuration for Claude Code. Only MCPs you actually need get installed.
238
+
239
+ | Feature | MCP Server |
240
+ |---------|------------|
241
+ | Database (Neon) | `@neondatabase/mcp-server-neon` |
242
+ | Payments (Stripe) | `@stripe/mcp` |
243
+ | Analytics (PostHog) | `@anthropic/mcp-posthog` |
244
+ | Voice (Deepgram) | `@deepgram/mcp-server` |
245
+ | Browser (Browserbase) | `@anthropic/mcp-browserbase` |
246
+ | Sandbox (E2B) | `@e2b/mcp-server` |
247
+ | Storage (R2) | `@cloudflare/mcp-server-r2` |
248
+
249
+ **Always included:** Context7 (docs), GitHub, Filesystem, Sequential Thinking.
250
+
251
+ ### Pushpa Mode (Autopilot)
252
+
253
+ Run phases overnight while you sleep. Pushpa Mode is an unattended runner that plans and executes phases sequentially, skipping any that require human verification.
254
+
255
+ ```bash
256
+ bash scripts/pushpa-mode.sh
257
+ # or
258
+ npm run pushpa
259
+ ```
260
+
261
+ **What it does:**
262
+ 1. Preflights required API keys based on your `MVP_FEATURES.yml`
263
+ 2. Iterates through phases in order
264
+ 3. Plans any phase that doesn't have a plan yet
265
+ 4. Executes phases automatically
266
+ 5. **Skips** phases marked with `HITL_REQUIRED: true` (human verification needed)
267
+ 6. Generates a morning report at `.planning/PUSHPA_REPORT.md`
268
+
269
+ **Prerequisites:**
270
+ - Run `/rrr:new-project` first (project must be initialized)
271
+ - Set all required API keys (script will check and warn)
272
+ - Recommend enabling YOLO mode in `.planning/config.json`
273
+
274
+ **Where outputs live:**
275
+ - Report: `.planning/PUSHPA_REPORT.md`
276
+ - Logs: `.planning/logs/pushpa_*.log`
277
+
278
+ **HITL Convention:**
279
+ Plans that require human verification should include one of these markers:
280
+ - `HITL_REQUIRED: true` (canonical)
281
+ - `HUMAN_VERIFICATION_REQUIRED`
282
+ - `MANUAL_VERIFICATION`
283
+
284
+ Pushpa Mode will skip these phases and record them in the report for manual follow-up.
285
+
286
+ **Where to run Pushpa Mode:**
287
+ - **Recommended:** Run in a normal system terminal (outside Claude Code) for true unattended overnight runs:
288
+ ```bash
289
+ bash scripts/pushpa-mode.sh
290
+ ```
291
+ - Running inside Claude Code works but can trigger approval prompts ("Do you want to proceed?").
292
+ - If the script detects Claude Code, it will prompt: `Continue running Pushpa Mode inside Claude Code? (y/N)` — default is **No** (recommended), so you can switch to an external terminal.
293
+
222
294
  ---
223
295
 
224
296
  ## How It Works
@@ -453,9 +525,10 @@ You're never locked in. The system adapts.
453
525
 
454
526
  ## Troubleshooting
455
527
 
456
- **Commands not found after install?**
457
- - Restart Claude Code to reload slash commands
528
+ **Commands not found after install/update?**
529
+ - Restart Claude Code: type `exit`, then run `claude` again
458
530
  - Verify files exist in `~/.claude/commands/rrr/` (global) or `./.claude/commands/rrr/` (local)
531
+ - Still seeing "Unknown skill"? Reinstall with `npx projecta-rrr@latest`, then restart `claude`
459
532
 
460
533
  **Commands not working as expected?**
461
534
  - Run `/rrr:help` to verify installation
package/bin/install.js CHANGED
@@ -301,7 +301,26 @@ function finishInstall(settingsPath, settings, statuslineCommand, notifyCommand,
301
301
  writeSettings(settingsPath, settings);
302
302
 
303
303
  console.log(`
304
- ${green}Done!${reset} Launch Claude Code and run ${cyan}/rrr:help${reset}.
304
+ ${green}Done!${reset}
305
+
306
+ ${yellow}If you installed from inside Claude Code:${reset}
307
+ Type ${cyan}exit${reset} and restart ${cyan}claude${reset} so it reloads commands.
308
+
309
+ ${yellow}Pick your start command:${reset}
310
+
311
+ ${cyan}New/empty folder (greenfield)${reset}
312
+ /rrr:new-project
313
+ (bootstraps Next.js/TS baseline if folder is empty)
314
+
315
+ ${cyan}Existing repo (brownfield)${reset}
316
+ /rrr:new-project
317
+ (brownfield-safe; won't overwrite or restructure your repo)
318
+
319
+ ${cyan}RRR already initialized${reset}
320
+ /rrr:progress
321
+ (if .planning/STATE.md exists)
322
+
323
+ Run ${cyan}/rrr:help${reset} anytime to see all commands.
305
324
  `);
306
325
  }
307
326
 
@@ -19,6 +19,22 @@ Output ONLY the reference content below. Do NOT add:
19
19
 
20
20
  **RRR** creates hierarchical project plans optimized for solo agentic development with Claude Code. Built by [Projecta.ai](https://projecta.ai).
21
21
 
22
+ ## Getting Started
23
+
24
+ **After install/update:** If you installed from inside Claude Code, type `exit` and restart `claude` so it reloads commands.
25
+
26
+ **Still seeing "Unknown skill"?** Reinstall with `npx projecta-rrr@latest`, then restart `claude` again.
27
+
28
+ **Pick your start command:**
29
+
30
+ | Scenario | Command |
31
+ |----------|---------|
32
+ | New/empty folder (greenfield) | `/rrr:new-project` — bootstraps Next.js/TS baseline if folder is empty |
33
+ | Existing repo (brownfield) | `/rrr:new-project` — brownfield-safe; won't overwrite your repo |
34
+ | RRR already initialized | `/rrr:progress` — if `.planning/STATE.md` exists |
35
+
36
+ **MVP Definition of Done at Projecta:** local demo runs + tests pass.
37
+
22
38
  ## Quick Start
23
39
 
24
40
  1. `/rrr:new-project` - Initialize project (includes research, requirements, roadmap)
@@ -381,6 +397,30 @@ Change anytime by editing `.planning/config.json`
381
397
 
382
398
  That's it! `/rrr:new-project` handles everything from bootstrap to roadmap.
383
399
 
400
+ **Overnight mode: Pushpa Mode**
401
+
402
+ Run phases unattended while you sleep:
403
+
404
+ ```
405
+ bash scripts/pushpa-mode.sh
406
+ # or
407
+ npm run pushpa
408
+ ```
409
+
410
+ Prerequisites:
411
+ 1. Run `/rrr:new-project` first
412
+ 2. Set all required API keys (based on your MVP_FEATURES.yml)
413
+ 3. Recommend enabling YOLO mode in config.json
414
+
415
+ Pushpa Mode will:
416
+ - Plan and execute phases sequentially
417
+ - Skip phases marked with `HITL_REQUIRED: true`
418
+ - Generate report at `.planning/PUSHPA_REPORT.md`
419
+ - Log everything to `.planning/logs/`
420
+
421
+ **Where to run:** Recommended outside Claude Code for true unattended runs.
422
+ Running inside Claude Code may prompt for approvals; if prompted, type `y` to continue or exit and run in a normal terminal.
423
+
384
424
  **Bootstrap only (no planning):**
385
425
 
386
426
  ```
@@ -350,15 +350,17 @@ Use AskUserQuestion:
350
350
  - header: "Preset"
351
351
  - question: "Start with a use-case preset? This pre-configures capabilities."
352
352
  - options:
353
+ - "saas-dashboard (Recommended)" — SaaS with Clerk + Neon + optional Stripe (DEFAULT)
353
354
  - "landing-waitlist" — Landing page + email capture (no auth, no db)
354
- - "saas-dashboard" — SaaS with Clerk + Neon + optional Stripe
355
355
  - "api-admin" — API backend + admin panel (Neon, optional auth)
356
356
  - "voice-agent" — Voice AI agent (Deepgram + full agent stack)
357
- - "None" — Configure capabilities manually (Recommended for custom)
357
+ - "Custom" — Configure capabilities manually
358
358
 
359
359
  **If preset selected:** Load preset defaults, skip to Step 3 (confirm/override).
360
360
 
361
- **If "None":** Continue to Step 2.
361
+ **If "Custom":** Continue to Step 2.
362
+
363
+ **DEFAULT BEHAVIOR:** If user selects nothing or skips, assume `saas-dashboard` preset (Neon + Clerk + Render + optional Stripe).
362
364
 
363
365
  ### Step 2: Capability Questionnaire
364
366
 
@@ -496,6 +498,10 @@ Deviations: [count or "None"]
496
498
 
497
499
  File: .planning/MVP_FEATURES.yml
498
500
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
501
+
502
+ 💡 To configure MCP servers for your stack:
503
+ npm run mcp:setup
504
+ (Reads MVP_FEATURES.yml and installs required MCPs)
499
505
  ```
500
506
 
501
507
  Continue to Phase 3.
@@ -1272,6 +1278,16 @@ Present completion with next steps:
1272
1278
 
1273
1279
  <sub>`/clear` first → fresh context window</sub>
1274
1280
 
1281
+ ───────────────────────────────────────────────────────────────
1282
+
1283
+ ## 🔌 MCP Setup (Optional)
1284
+
1285
+ Configure Claude Code with MCP servers for your selected stack:
1286
+
1287
+ `npm run mcp:setup`
1288
+
1289
+ <sub>Reads MVP_FEATURES.yml and outputs MCP configuration</sub>
1290
+
1275
1291
  ───────────────────────────────────────────────────────────────
1276
1292
  ```
1277
1293
 
@@ -0,0 +1,128 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "description": "MCP server registry - maps providers to their Claude MCP installation commands",
4
+ "version": "1.0.0",
5
+
6
+ "servers": {
7
+ "neon": {
8
+ "name": "Neon MCP Server",
9
+ "description": "PostgreSQL database operations via Neon",
10
+ "command": "npx -y @neondatabase/mcp-server-neon",
11
+ "envRequired": ["NEON_API_KEY"],
12
+ "featureKeys": ["db:neon", "database"],
13
+ "docs": "https://neon.tech/docs/ai/mcp"
14
+ },
15
+
16
+ "stripe": {
17
+ "name": "Stripe MCP Server",
18
+ "description": "Payment processing and subscription management",
19
+ "command": "npx -y @stripe/mcp",
20
+ "envRequired": ["STRIPE_SECRET_KEY"],
21
+ "featureKeys": ["payments:stripe", "payments"],
22
+ "docs": "https://docs.stripe.com/mcp"
23
+ },
24
+
25
+ "posthog": {
26
+ "name": "PostHog MCP Server",
27
+ "description": "Product analytics and feature flags",
28
+ "command": "npx -y @anthropic/mcp-posthog",
29
+ "envRequired": ["POSTHOG_API_KEY", "POSTHOG_PROJECT_ID"],
30
+ "featureKeys": ["analytics:posthog", "analytics"],
31
+ "docs": "https://posthog.com/docs/mcp"
32
+ },
33
+
34
+ "deepgram": {
35
+ "name": "Deepgram MCP Server",
36
+ "description": "Voice-to-text and text-to-speech",
37
+ "command": "npx -y @deepgram/mcp-server",
38
+ "envRequired": ["DEEPGRAM_API_KEY"],
39
+ "featureKeys": ["voice:deepgram", "voice"],
40
+ "docs": "https://developers.deepgram.com/docs/mcp"
41
+ },
42
+
43
+ "browserbase": {
44
+ "name": "Browserbase MCP Server",
45
+ "description": "Headless browser automation",
46
+ "command": "npx -y @anthropic/mcp-browserbase",
47
+ "envRequired": ["BROWSERBASE_API_KEY", "BROWSERBASE_PROJECT_ID"],
48
+ "featureKeys": ["browserAutomation:browserbase", "browser"],
49
+ "docs": "https://docs.browserbase.com/mcp"
50
+ },
51
+
52
+ "e2b": {
53
+ "name": "E2B MCP Server",
54
+ "description": "Code execution sandbox",
55
+ "command": "npx -y @e2b/mcp-server",
56
+ "envRequired": ["E2B_API_KEY"],
57
+ "featureKeys": ["sandbox:e2b", "sandbox"],
58
+ "docs": "https://e2b.dev/docs/mcp"
59
+ },
60
+
61
+ "cloudflare-r2": {
62
+ "name": "Cloudflare R2 MCP Server",
63
+ "description": "S3-compatible object storage",
64
+ "command": "npx -y @cloudflare/mcp-server-r2",
65
+ "envRequired": ["CLOUDFLARE_ACCOUNT_ID", "R2_ACCESS_KEY_ID", "R2_SECRET_ACCESS_KEY"],
66
+ "featureKeys": ["objectStorage:r2", "storage"],
67
+ "docs": "https://developers.cloudflare.com/r2/mcp"
68
+ },
69
+
70
+ "context7": {
71
+ "name": "Context7 MCP Server",
72
+ "description": "Documentation lookup and library references",
73
+ "command": "npx -y @upstash/context7-mcp",
74
+ "envRequired": [],
75
+ "featureKeys": ["docs", "context"],
76
+ "docs": "https://context7.dev",
77
+ "alwaysInclude": true
78
+ },
79
+
80
+ "resend": {
81
+ "name": "Resend MCP Server",
82
+ "description": "Transactional email sending",
83
+ "command": "npx -y @resend/mcp-server",
84
+ "envRequired": ["RESEND_API_KEY"],
85
+ "featureKeys": ["email:resend", "email"],
86
+ "docs": "https://resend.com/docs/mcp"
87
+ },
88
+
89
+ "github": {
90
+ "name": "GitHub MCP Server",
91
+ "description": "GitHub repository operations",
92
+ "command": "npx -y @modelcontextprotocol/server-github",
93
+ "envRequired": ["GITHUB_PERSONAL_ACCESS_TOKEN"],
94
+ "featureKeys": ["github", "vcs"],
95
+ "docs": "https://modelcontextprotocol.io/docs/servers/github",
96
+ "alwaysInclude": true
97
+ },
98
+
99
+ "filesystem": {
100
+ "name": "Filesystem MCP Server",
101
+ "description": "Local filesystem operations",
102
+ "command": "npx -y @modelcontextprotocol/server-filesystem",
103
+ "envRequired": [],
104
+ "featureKeys": ["filesystem"],
105
+ "docs": "https://modelcontextprotocol.io/docs/servers/filesystem",
106
+ "alwaysInclude": true
107
+ },
108
+
109
+ "sequential-thinking": {
110
+ "name": "Sequential Thinking MCP Server",
111
+ "description": "Enhanced reasoning and chain-of-thought",
112
+ "command": "npx -y @modelcontextprotocol/server-sequential-thinking",
113
+ "envRequired": [],
114
+ "featureKeys": ["reasoning"],
115
+ "docs": "https://modelcontextprotocol.io/docs/servers/sequential-thinking",
116
+ "alwaysInclude": true
117
+ }
118
+ },
119
+
120
+ "presetMappings": {
121
+ "saas-dashboard": ["neon", "context7", "github", "filesystem", "sequential-thinking"],
122
+ "landing-waitlist": ["context7", "github", "filesystem", "sequential-thinking"],
123
+ "api-admin": ["neon", "context7", "github", "filesystem", "sequential-thinking"],
124
+ "voice-agent": ["neon", "deepgram", "e2b", "context7", "github", "filesystem", "sequential-thinking"]
125
+ },
126
+
127
+ "defaultServers": ["context7", "github", "filesystem", "sequential-thinking"]
128
+ }
package/package.json CHANGED
@@ -1,16 +1,23 @@
1
1
  {
2
2
  "name": "projecta-rrr",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "A meta-prompting, context engineering and spec-driven development system for Claude Code by Projecta.ai",
5
5
  "bin": {
6
6
  "projecta-rrr": "bin/install.js"
7
7
  },
8
+ "scripts": {
9
+ "mcp:setup": "bash scripts/mcp-setup.sh",
10
+ "pushpa": "bash scripts/pushpa-mode.sh"
11
+ },
8
12
  "files": [
9
13
  "bin",
10
14
  "commands",
11
15
  "rrr",
12
16
  "agents",
13
- "hooks"
17
+ "hooks",
18
+ "scripts",
19
+ "mcp.registry.json",
20
+ "projecta.defaults.json"
14
21
  ],
15
22
  "keywords": [
16
23
  "claude",
@@ -0,0 +1,32 @@
1
+ {
2
+ "framework": "nextjs-app-router",
3
+ "language": "typescript",
4
+ "packageManager": "npm",
5
+ "ui": {
6
+ "styling": "tailwind",
7
+ "componentSystem": "shadcn-ui"
8
+ },
9
+ "testing": {
10
+ "unit": "vitest",
11
+ "e2e": "playwright"
12
+ },
13
+ "preferredProviders": {
14
+ "db": ["neon"],
15
+ "auth": ["clerk", "neon-auth"],
16
+ "authDefault": "clerk",
17
+ "deploy": ["render"],
18
+ "payments": ["stripe"],
19
+ "objectStorage": ["r2"],
20
+ "analytics": ["posthog"],
21
+ "voice": ["deepgram"],
22
+ "agents": ["mastra"],
23
+ "agentAuth": ["authdev"],
24
+ "agentMail": ["agentmail"],
25
+ "sandbox": ["e2b"],
26
+ "browserAutomation": ["browserbase"]
27
+ },
28
+ "discouragedProviders": {
29
+ "list": ["firebase", "supabase", "auth0", "vercel", "planetscale"],
30
+ "note": "These providers are discouraged but allowed with explicit reason recorded in Deviation Notes"
31
+ }
32
+ }
@@ -1,7 +1,9 @@
1
- # SaaS Dashboard Preset
1
+ # SaaS Dashboard Preset (DEFAULT)
2
2
  # Auth + database required, payments optional
3
+ # This is the Projecta default preset - used when user skips selection
3
4
 
4
5
  name: saas-dashboard
6
+ default: true
5
7
  description: SaaS application with authentication, database, and optional payments
6
8
 
7
9
  stack:
@@ -70,6 +72,10 @@ database:
70
72
  - users (synced from Clerk)
71
73
  - user_data (application-specific)
72
74
 
75
+ # MCP servers auto-installed based on integrations
76
+ mcp_servers:
77
+ - neon # Required for database
78
+
73
79
  done_criteria:
74
80
  - User can sign up and sign in
75
81
  - Dashboard only accessible when authenticated
@@ -0,0 +1,224 @@
1
+ #!/bin/bash
2
+ #
3
+ # MCP Setup Script for Projecta RRR
4
+ # Reads MVP_FEATURES.yml and generates MCP server configuration
5
+ #
6
+
7
+ set -e
8
+
9
+ # Colors
10
+ RED='\033[0;31m'
11
+ GREEN='\033[0;32m'
12
+ YELLOW='\033[1;33m'
13
+ CYAN='\033[0;36m'
14
+ NC='\033[0m' # No Color
15
+
16
+ echo ""
17
+ echo -e "${CYAN}╔══════════════════════════════════════════╗${NC}"
18
+ echo -e "${CYAN}║ Projecta RRR - MCP Setup ║${NC}"
19
+ echo -e "${CYAN}╚══════════════════════════════════════════╝${NC}"
20
+ echo ""
21
+
22
+ # Find the RRR installation directory
23
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
24
+ RRR_DIR="$(dirname "$SCRIPT_DIR")"
25
+
26
+ # Check if we're in a project with .planning
27
+ PROJECT_DIR="$(pwd)"
28
+ FEATURES_FILE="$PROJECT_DIR/.planning/MVP_FEATURES.yml"
29
+ REGISTRY_FILE="$RRR_DIR/mcp.registry.json"
30
+
31
+ # Verify registry exists
32
+ if [ ! -f "$REGISTRY_FILE" ]; then
33
+ echo -e "${RED}Error: MCP registry not found at $REGISTRY_FILE${NC}"
34
+ exit 1
35
+ fi
36
+
37
+ # Determine which MCPs to include
38
+ MCP_SERVERS=()
39
+
40
+ # Always include default servers
41
+ DEFAULT_SERVERS=$(cat "$REGISTRY_FILE" | grep -A1000 '"defaultServers"' | grep -o '"[^"]*"' | tr -d '"' | head -10)
42
+ for server in $DEFAULT_SERVERS; do
43
+ if [ "$server" != "defaultServers" ] && [ "$server" != "[" ] && [ "$server" != "]" ]; then
44
+ MCP_SERVERS+=("$server")
45
+ fi
46
+ done
47
+
48
+ # Check if MVP_FEATURES.yml exists
49
+ if [ -f "$FEATURES_FILE" ]; then
50
+ echo -e "${GREEN}Found MVP_FEATURES.yml${NC}"
51
+ echo ""
52
+
53
+ # Extract preset if specified
54
+ PRESET=$(grep "^preset:" "$FEATURES_FILE" 2>/dev/null | cut -d: -f2 | tr -d ' ' || echo "")
55
+
56
+ if [ -n "$PRESET" ]; then
57
+ echo -e "Preset: ${CYAN}$PRESET${NC}"
58
+
59
+ # Get servers for this preset from registry
60
+ PRESET_SERVERS=$(cat "$REGISTRY_FILE" | grep -A10 "\"$PRESET\":" | grep -o '"[^"]*"' | tr -d '"' | grep -v "$PRESET" | head -10)
61
+ for server in $PRESET_SERVERS; do
62
+ if [[ ! " ${MCP_SERVERS[*]} " =~ " ${server} " ]]; then
63
+ MCP_SERVERS+=("$server")
64
+ fi
65
+ done
66
+ fi
67
+
68
+ # Check for specific feature selections
69
+ # Database
70
+ if grep -q "db:" "$FEATURES_FILE" 2>/dev/null; then
71
+ DB=$(grep "db:" "$FEATURES_FILE" | cut -d: -f2 | tr -d ' ')
72
+ if [ "$DB" = "neon" ]; then
73
+ if [[ ! " ${MCP_SERVERS[*]} " =~ " neon " ]]; then
74
+ MCP_SERVERS+=("neon")
75
+ fi
76
+ fi
77
+ fi
78
+
79
+ # Payments
80
+ if grep -q "payments:" "$FEATURES_FILE" 2>/dev/null; then
81
+ PAYMENTS=$(grep "payments:" "$FEATURES_FILE" | cut -d: -f2 | tr -d ' ')
82
+ if [ "$PAYMENTS" = "stripe" ]; then
83
+ if [[ ! " ${MCP_SERVERS[*]} " =~ " stripe " ]]; then
84
+ MCP_SERVERS+=("stripe")
85
+ fi
86
+ fi
87
+ fi
88
+
89
+ # Voice
90
+ if grep -q "voice:" "$FEATURES_FILE" 2>/dev/null; then
91
+ VOICE=$(grep "voice:" "$FEATURES_FILE" | cut -d: -f2 | tr -d ' ')
92
+ if [ "$VOICE" = "deepgram" ]; then
93
+ if [[ ! " ${MCP_SERVERS[*]} " =~ " deepgram " ]]; then
94
+ MCP_SERVERS+=("deepgram")
95
+ fi
96
+ fi
97
+ fi
98
+
99
+ # Analytics
100
+ if grep -q "analytics:" "$FEATURES_FILE" 2>/dev/null; then
101
+ ANALYTICS=$(grep "analytics:" "$FEATURES_FILE" | cut -d: -f2 | tr -d ' ')
102
+ if [ "$ANALYTICS" = "posthog" ]; then
103
+ if [[ ! " ${MCP_SERVERS[*]} " =~ " posthog " ]]; then
104
+ MCP_SERVERS+=("posthog")
105
+ fi
106
+ fi
107
+ fi
108
+
109
+ # Browser automation
110
+ if grep -q "browserAutomation:" "$FEATURES_FILE" 2>/dev/null; then
111
+ BROWSER=$(grep "browserAutomation:" "$FEATURES_FILE" | cut -d: -f2 | tr -d ' ')
112
+ if [ "$BROWSER" = "browserbase" ]; then
113
+ if [[ ! " ${MCP_SERVERS[*]} " =~ " browserbase " ]]; then
114
+ MCP_SERVERS+=("browserbase")
115
+ fi
116
+ fi
117
+ fi
118
+
119
+ # Sandbox
120
+ if grep -q "sandbox:" "$FEATURES_FILE" 2>/dev/null; then
121
+ SANDBOX=$(grep "sandbox:" "$FEATURES_FILE" | cut -d: -f2 | tr -d ' ')
122
+ if [ "$SANDBOX" = "e2b" ]; then
123
+ if [[ ! " ${MCP_SERVERS[*]} " =~ " e2b " ]]; then
124
+ MCP_SERVERS+=("e2b")
125
+ fi
126
+ fi
127
+ fi
128
+
129
+ # Object storage
130
+ if grep -q "objectStorage:" "$FEATURES_FILE" 2>/dev/null; then
131
+ STORAGE=$(grep "objectStorage:" "$FEATURES_FILE" | cut -d: -f2 | tr -d ' ')
132
+ if [ "$STORAGE" = "r2" ]; then
133
+ if [[ ! " ${MCP_SERVERS[*]} " =~ " cloudflare-r2 " ]]; then
134
+ MCP_SERVERS+=("cloudflare-r2")
135
+ fi
136
+ fi
137
+ fi
138
+
139
+ # Email
140
+ if grep -q "email:" "$FEATURES_FILE" 2>/dev/null; then
141
+ EMAIL=$(grep "email:" "$FEATURES_FILE" | cut -d: -f2 | tr -d ' ')
142
+ if [ "$EMAIL" = "resend" ]; then
143
+ if [[ ! " ${MCP_SERVERS[*]} " =~ " resend " ]]; then
144
+ MCP_SERVERS+=("resend")
145
+ fi
146
+ fi
147
+ fi
148
+ else
149
+ echo -e "${YELLOW}No MVP_FEATURES.yml found - using SaaS default preset${NC}"
150
+ echo ""
151
+ # Add neon for SaaS default
152
+ MCP_SERVERS+=("neon")
153
+ fi
154
+
155
+ echo ""
156
+ echo -e "${GREEN}MCP Servers for your stack:${NC}"
157
+ echo "─────────────────────────────"
158
+
159
+ # Output the MCP configuration
160
+ for server in "${MCP_SERVERS[@]}"; do
161
+ # Get server details from registry
162
+ SERVER_NAME=$(cat "$REGISTRY_FILE" | grep -A5 "\"$server\":" | grep '"name"' | cut -d'"' -f4)
163
+ SERVER_CMD=$(cat "$REGISTRY_FILE" | grep -A5 "\"$server\":" | grep '"command"' | cut -d'"' -f4)
164
+
165
+ if [ -n "$SERVER_CMD" ]; then
166
+ echo -e " ${CYAN}$server${NC}: $SERVER_NAME"
167
+ echo -e " Command: ${YELLOW}$SERVER_CMD${NC}"
168
+ fi
169
+ done
170
+
171
+ echo ""
172
+ echo "─────────────────────────────"
173
+ echo ""
174
+ echo -e "${GREEN}To configure Claude Code with these MCPs:${NC}"
175
+ echo ""
176
+ echo "1. Open Claude Code settings:"
177
+ echo -e " ${CYAN}claude config${NC}"
178
+ echo ""
179
+ echo "2. Add MCP servers manually, or add to your ~/.claude/settings.json:"
180
+ echo ""
181
+
182
+ # Generate JSON snippet
183
+ echo -e "${YELLOW}{"
184
+ echo ' "mcpServers": {'
185
+
186
+ FIRST=true
187
+ for server in "${MCP_SERVERS[@]}"; do
188
+ SERVER_CMD=$(cat "$REGISTRY_FILE" | grep -A5 "\"$server\":" | grep '"command"' | cut -d'"' -f4)
189
+ if [ -n "$SERVER_CMD" ]; then
190
+ if [ "$FIRST" = true ]; then
191
+ FIRST=false
192
+ else
193
+ echo ","
194
+ fi
195
+ # Extract the package name from the npx command
196
+ PKG_NAME=$(echo "$SERVER_CMD" | sed 's/npx -y //')
197
+ echo -n " \"$server\": {"
198
+ echo -n "\"command\": \"npx\", \"args\": [\"-y\", \"$PKG_NAME\"]"
199
+ echo -n "}"
200
+ fi
201
+ done
202
+
203
+ echo ""
204
+ echo ' }'
205
+ echo -e "}${NC}"
206
+ echo ""
207
+
208
+ # List required environment variables
209
+ echo -e "${GREEN}Required environment variables:${NC}"
210
+ echo "─────────────────────────────"
211
+
212
+ for server in "${MCP_SERVERS[@]}"; do
213
+ ENV_VARS=$(cat "$REGISTRY_FILE" | grep -A10 "\"$server\":" | grep -A5 '"envRequired"' | grep -o '"[A-Z_]*"' | tr -d '"')
214
+ if [ -n "$ENV_VARS" ]; then
215
+ echo -e " ${CYAN}$server${NC}:"
216
+ for var in $ENV_VARS; do
217
+ echo " - $var"
218
+ done
219
+ fi
220
+ done
221
+
222
+ echo ""
223
+ echo -e "${GREEN}Done!${NC} Add the environment variables to your .env file."
224
+ echo ""