@appscreenshotstudio/mcp 0.1.4 → 0.2.0

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.
Files changed (3) hide show
  1. package/README.md +14 -3
  2. package/dist/index.js +480 -13
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -59,7 +59,7 @@ Create a complete set of App Store screenshots. One tool call = one full project
59
59
  | `count` | number | No | Number of cards, 3-10 (default: 5) |
60
60
  | `story_flow` | string | No | Narrative structure (default: `auto`) |
61
61
 
62
- **Costs 1 credit.**
62
+ **Costs 5 credits.**
63
63
 
64
64
  ### `edit-screenshots`
65
65
 
@@ -71,7 +71,7 @@ Make changes to an existing project with natural language. Optionally target spe
71
71
  | `message` | string | Yes | What to change |
72
72
  | `card_indices` | number[] | No | Target specific cards by index (0-based). Omit to edit all. |
73
73
 
74
- **Costs 1 credit.**
74
+ **Costs 5 credits.**
75
75
 
76
76
  ### `render-screenshots`
77
77
 
@@ -103,7 +103,7 @@ Generate an AI background for a specific card. Uses project metadata (brand colo
103
103
  | `card_index` | number | Yes | Which card (0-based) |
104
104
  | `prompt` | string | Yes | Description of the background |
105
105
 
106
- **Costs 1 credit.**
106
+ **Costs 6 credits.**
107
107
 
108
108
  ### `list-devices`
109
109
 
@@ -120,6 +120,17 @@ Show all supported device specs. No API call needed.
120
120
  | `android-phone` | Android Phone | 1080x2340 | Play Store |
121
121
  | `android-tablet-10` | Android Tablet 10" | 2560x1600 | Play Store |
122
122
 
123
+ ## Design Features
124
+
125
+ The AI generates professional screenshots using:
126
+
127
+ - **78+ decorative shapes** across 13 categories: nature (leaf, flower, tree), weather (cloud, sun, snowflake), celebration (sparkle, trophy, crown, confetti), social (chat-bubble, music-note), tech (rocket, code-bracket), health (dumbbell, flame), food (coffee-cup, pizza), travel (airplane, compass), finance (dollar-sign, piggy-bank), education (graduation-cap, lightbulb), pets (paw-print, cat-face), emoji (smiley, fire-emoji), abstract (swirl, infinity, gem)
128
+ - **Rich text**: per-word color, bold, italic, underline, highlight pills (colored backgrounds behind words), gradient fills, text stroke outlines, emoji
129
+ - **Laurel stats**: wing-left + wing-right shapes flanking stats like "4.9 Rating" or "1M+ Users"
130
+ - **Floating UI snippets**: rounded-rect panels with text overlapping device edges
131
+ - **11 device perspectives**: flat, left-15, left-30, right-15, right-30, isometric, top-down, flat-lay, side-profile, landscape-left, landscape-right
132
+ - **7 layouts**: Text Top + Device Center (A), Text Top + Device Offset (B), Social Proof (C), Marketing Title (M1), Feature Callout (M2), CTA (M3), Testimonial (M4)
133
+
123
134
  ## Workflow
124
135
 
125
136
  1. **Generate** — Agent calls `generate-screenshots` with your app details
package/dist/index.js CHANGED
@@ -64,6 +64,36 @@ function buildDesignMessage(input) {
64
64
  if (input.story_flow && input.story_flow !== 'auto') {
65
65
  parts.push(`\nStory flow: ${input.story_flow} (${STORY_FLOW_DESCRIPTIONS[input.story_flow] || input.story_flow})`);
66
66
  }
67
+ if (input.codebase_context) {
68
+ const ctx = input.codebase_context;
69
+ parts.push('\n--- App Research Context (from codebase analysis) ---');
70
+ if (ctx.readme_summary)
71
+ parts.push(`App overview: ${ctx.readme_summary}`);
72
+ if (ctx.key_screens?.length) {
73
+ parts.push('Key screens in the app:');
74
+ for (const screen of ctx.key_screens)
75
+ parts.push(` - ${screen}`);
76
+ }
77
+ if (ctx.color_tokens && Object.keys(ctx.color_tokens).length) {
78
+ parts.push(`Theme colors from code: ${JSON.stringify(ctx.color_tokens)}`);
79
+ }
80
+ if (ctx.target_audience)
81
+ parts.push(`Target audience: ${ctx.target_audience}`);
82
+ if (ctx.app_category)
83
+ parts.push(`App category: ${ctx.app_category}`);
84
+ if (ctx.competitive_edge)
85
+ parts.push(`What makes it unique: ${ctx.competitive_edge}`);
86
+ if (ctx.app_store_description)
87
+ parts.push(`Existing store description: ${ctx.app_store_description}`);
88
+ if (ctx.tech_stack)
89
+ parts.push(`Tech stack: ${ctx.tech_stack}`);
90
+ if (ctx.ui_style)
91
+ parts.push(`UI style: ${ctx.ui_style}`);
92
+ if (ctx.primary_user_flow)
93
+ parts.push(`Primary user flow: ${ctx.primary_user_flow}`);
94
+ parts.push('--- End App Research Context ---');
95
+ parts.push('\nUse the research context above to create screenshots that accurately represent this specific app. Headlines, features, and visual style should reflect what the app actually does and looks like.');
96
+ }
67
97
  parts.push(`\nAll device mockups should have screenshotImage: null — the developer will upload actual app screenshots later.`);
68
98
  parts.push(`Please include projectMeta with brand colors, mood, appCategory, and a rich globalVisualTheme description.`);
69
99
  return parts.join('\n');
@@ -78,6 +108,8 @@ server.registerTool('generate-screenshots', {
78
108
  title: 'Generate App Store Screenshots',
79
109
  description: `Create a complete set of App Store screenshot designs for an app. Returns a project URL where the developer can upload actual app screenshots into the device frames and export final PNGs.
80
110
 
111
+ IMPORTANT: Before calling this tool, research the user's codebase to populate the codebase_context parameter. Search for: package.json/README (app name & description), theme/color config files (brand colors), route definitions (key screens), marketing copy (value proposition), and App Store metadata. The more context you provide, the better the screenshots will be. Call prepare-screenshot-brief first if you need a research checklist.
112
+
81
113
  Each card is a layered composition with: gradient background, decorative glow orbs, bold headline with colored accent words, device mockup (iPhone/iPad/Android with perspective tilts), and optional floating elements (badges, star ratings, UI snippets).
82
114
 
83
115
  Available layouts per card:
@@ -89,13 +121,19 @@ Available layouts per card:
89
121
  Card types the system can generate:
90
122
  - Hero card (value proposition + device)
91
123
  - Feature spotlight (tilted phone + floating UI snippets)
92
- - Social proof (stars, quotes, badges)
124
+ - Social proof (stars, quotes, badges, laurel wings with stats)
93
125
  - Marketing/title card (no device, bold text + rich background)
94
126
  - CTA/download card (no device, call to action)
95
127
 
128
+ Design features:
129
+ - 78+ decorative shapes across 13 categories (nature, weather, celebration, social, tech, health, food, travel, abstract, finance, education, pets, emoji)
130
+ - Rich text with per-word color, weight, italic, underline, highlight pills, gradient fills, stroke outlines, and emoji
131
+ - Laurel stats pattern: wing-left + wing-right shapes flanking stats like "4.9 Rating" or "1M+ Users"
132
+ - Floating UI snippets: rounded-rect panels with text overlapping the device edges
133
+
96
134
  App Store 60/40 rule: minimum 60% of cards must show a device mockup, maximum 40% can be marketing-only.
97
135
 
98
- Costs 1 credit per generation.`,
136
+ Costs 5 credits per generation.`,
99
137
  inputSchema: z.object({
100
138
  app_name: z.string().describe('Name of the app'),
101
139
  app_description: z.string().describe('What the app does — 1-3 sentences'),
@@ -114,14 +152,41 @@ Costs 1 credit per generation.`,
114
152
  .describe('Number of screenshot cards to generate (3-10). Default: 5'),
115
153
  story_flow: z.enum(['auto', 'standard', 'problem-solution', 'social-proof', 'benefit-first', 'journey', 'hero-intro', 'social-proof-bookend']).default('auto')
116
154
  .describe('Narrative structure for the screenshots. "auto" lets the AI choose the best flow.'),
155
+ codebase_context: z.object({
156
+ readme_summary: z.string().optional()
157
+ .describe('Summary of the app from README or docs — what does it do and why?'),
158
+ key_screens: z.array(z.string()).max(15).optional()
159
+ .describe('Main screens/views in the app — e.g. "Dashboard with activity feed", "Settings with theme toggle"'),
160
+ color_tokens: z.record(z.string()).optional()
161
+ .describe('Brand/theme colors found in code — e.g. {"primary": "#7C3AED", "background": "#0F172A"}'),
162
+ target_audience: z.string().optional()
163
+ .describe('Who the app is for — e.g. "busy professionals who want to track habits"'),
164
+ app_category: z.string().optional()
165
+ .describe('App category — e.g. fitness, finance, social, productivity, food, travel, health, education'),
166
+ competitive_edge: z.string().optional()
167
+ .describe('What makes this app unique vs competitors'),
168
+ app_store_description: z.string().optional()
169
+ .describe('Existing App Store/Play Store description if found in the codebase'),
170
+ tech_stack: z.string().optional()
171
+ .describe('Tech stack — e.g. "React Native", "SwiftUI", "Flutter". Useful for developer-tool apps.'),
172
+ ui_style: z.string().optional()
173
+ .describe('UI style observations — e.g. "dark mode with neon accents", "clean minimal with lots of whitespace"'),
174
+ primary_user_flow: z.string().optional()
175
+ .describe('The main user journey — e.g. "Sign up → Create project → Invite team → Track progress"'),
176
+ }).optional()
177
+ .describe('Context gathered from researching the app codebase. Dramatically improves screenshot quality — the more detail here, the better the output.'),
117
178
  }),
118
179
  }, async (input) => {
119
- // Step 1: Create project
180
+ // Step 1: Create project (with codebase context if provided)
120
181
  const projectName = `${input.app_name} Screenshots`;
121
- const createRes = await apiCall('POST', '/api/v1/projects', {
182
+ const createBody = {
122
183
  device_id: input.device_id,
123
184
  name: projectName,
124
- });
185
+ };
186
+ if (input.codebase_context) {
187
+ createBody.codebase_context = input.codebase_context;
188
+ }
189
+ const createRes = await apiCall('POST', '/api/v1/projects', createBody);
125
190
  if (!createRes.ok) {
126
191
  return {
127
192
  content: [{ type: 'text', text: `Failed to create project: ${JSON.stringify(createRes.data)}` }],
@@ -170,16 +235,19 @@ Costs 1 credit per generation.`,
170
235
  // Tool 2: edit-screenshots
171
236
  server.registerTool('edit-screenshots', {
172
237
  title: 'Edit Screenshot Designs',
173
- description: `Make changes to an existing screenshot project. Use natural language to describe what you want to change. Costs 1 credit per edit.
238
+ description: `Make changes to an existing screenshot project. Use natural language to describe what you want to change. Costs 5 credits per edit.
174
239
 
175
240
  What you can change:
176
241
  - Text: headlines, subtitles, badge text, font size, font family (Inter, Poppins, Montserrat, DM Sans, Space Grotesk, etc.)
242
+ - Text styling: per-word color, bold, italic, underline, highlight pills (colored background behind words), gradient text, text stroke outlines
177
243
  - Colors: brand palette, gradient backgrounds, accent colors, text colors
178
244
  - Layout: reposition elements, switch between layouts (A/B/C/M1-M4), change device tilt
179
245
  - Device mockups: perspective tilts (flat, left-15, right-15), resize, reposition
180
246
  - Add/remove cards: add a social proof card, remove card 3, add a marketing title card
181
247
  - Floating elements: add/edit badges, star ratings, floating UI snippets (rounded-rect + text overlays)
182
248
  - Shapes: glow orbs, waves, blobs, rounded rectangles, circles, custom SVG paths
249
+ - Decorative shapes: 78+ library shapes — leaf, flower, cloud, sparkle, heart, rocket, trophy, crown, coffee-cup, airplane, dollar-sign, paw-print, and many more across 13 categories
250
+ - Laurel stats: wing-left + wing-right shapes flanking a stat (e.g. "4.9 Rating", "1M+ Users", "#1 App")
183
251
  - Backgrounds: change gradient colors/angle, set a backgroundPrompt for AI-generated backgrounds
184
252
  - Style: shadows, opacity, border radius, rotation, blur
185
253
 
@@ -190,16 +258,51 @@ Example edit messages:
190
258
  - "Tilt the phone on card 2 to the left"
191
259
  - "Add floating UI snippets around the device on card 1"
192
260
  - "Replace card 3 with a marketing CTA card saying Download Free"
193
- - "Add a wave shape flowing across all cards"`,
261
+ - "Add a wave shape flowing across all cards"
262
+ - "Add laurel wings around a 4.9 rating on card 1"
263
+ - "Add decorative leaf and sparkle shapes scattered in the background"
264
+ - "Make 'Every' underlined and italic in the headline"`,
194
265
  inputSchema: z.object({
195
266
  project_id: z.string().describe('Project ID from a previous generate-screenshots call'),
196
267
  message: z.string().describe('What to change — use natural language'),
197
268
  card_indices: z.array(z.number()).optional()
198
269
  .describe('Target specific cards by index (0-based). e.g. [0] for card 1, [2,3] for cards 3-4. Omit to apply changes to all cards.'),
270
+ codebase_context: z.object({
271
+ readme_summary: z.string().optional(),
272
+ key_screens: z.array(z.string()).max(15).optional(),
273
+ color_tokens: z.record(z.string()).optional(),
274
+ target_audience: z.string().optional(),
275
+ app_category: z.string().optional(),
276
+ competitive_edge: z.string().optional(),
277
+ app_store_description: z.string().optional(),
278
+ tech_stack: z.string().optional(),
279
+ ui_style: z.string().optional(),
280
+ primary_user_flow: z.string().optional(),
281
+ }).optional()
282
+ .describe('App context from codebase research. Helps the AI make edits that match the actual app.'),
199
283
  }),
200
- }, async ({ project_id, message, card_indices }) => {
284
+ }, async ({ project_id, message, card_indices, codebase_context }) => {
285
+ let enrichedMessage = message;
286
+ if (codebase_context) {
287
+ const ctxParts = [];
288
+ if (codebase_context.readme_summary)
289
+ ctxParts.push(`App: ${codebase_context.readme_summary}`);
290
+ if (codebase_context.key_screens?.length)
291
+ ctxParts.push(`Screens: ${codebase_context.key_screens.join(', ')}`);
292
+ if (codebase_context.color_tokens)
293
+ ctxParts.push(`Colors: ${JSON.stringify(codebase_context.color_tokens)}`);
294
+ if (codebase_context.target_audience)
295
+ ctxParts.push(`Audience: ${codebase_context.target_audience}`);
296
+ if (codebase_context.ui_style)
297
+ ctxParts.push(`UI style: ${codebase_context.ui_style}`);
298
+ if (codebase_context.competitive_edge)
299
+ ctxParts.push(`Unique: ${codebase_context.competitive_edge}`);
300
+ if (ctxParts.length) {
301
+ enrichedMessage = `[App context: ${ctxParts.join('. ')}]\n\n${message}`;
302
+ }
303
+ }
201
304
  const res = await apiCall('POST', `/api/v1/projects/${project_id}/chat`, {
202
- message,
305
+ message: enrichedMessage,
203
306
  selected_card_indices: card_indices || [],
204
307
  });
205
308
  if (!res.ok) {
@@ -281,9 +384,9 @@ server.registerTool('get-project', {
281
384
  Returns the canvas state with:
282
385
  - cards[]: each card has an id, elements array, and optional background settings
283
386
  - Each element has: type (text, device-mockup, shape, badge, image, star-rating), position (x, y), size (width, height), zIndex, and type-specific properties
284
- - Text elements: fontFamily, fontSize, fontWeight, color, segments (for multi-color text with highlights)
285
- - Device mockups: perspectiveVariant (flat, left-15, right-15), screenshotImage (null if no upload)
286
- - Shapes: shapeType (circle, rectangle, rounded-rect, blob, wave, etc.), fill, opacity
387
+ - Text elements: fontFamily, fontSize, fontWeight, color, segments (for multi-color text with per-word color, bold, italic, underline, highlightColor)
388
+ - Device mockups: perspectiveVariant (flat, left-15, right-15, left-30, right-30, isometric, top-down, flat-lay, side-profile, landscape-left, landscape-right), screenshotImage (null if no upload)
389
+ - Shapes: 78+ shape types across 13 categories — core shapes (circle, rectangle, rounded-rect, blob, wave, triangle, diamond, hexagon, ring, star, wing-left, wing-right, etc.) plus decorative library shapes (leaf, flower, cloud, sparkle, heart, rocket, trophy, crown, coffee-cup, airplane, dollar-sign, paw-print, and many more)
287
390
  - projectMeta: globalVisualTheme, brandColors, mood, appCategory`,
288
391
  inputSchema: z.object({
289
392
  project_id: z.string().describe('Project ID to inspect'),
@@ -328,7 +431,7 @@ Returns the canvas state with:
328
431
  // Tool 6: generate-background
329
432
  server.registerTool('generate-background', {
330
433
  title: 'Generate AI Background',
331
- description: `Generate an AI background image for a specific card using Gemini. The background is generated based on a text prompt and applied directly to the card. Costs 1 credit.
434
+ description: `Generate an AI background image for a specific card using Gemini. The background is generated based on a text prompt and applied directly to the card. Costs 6 credits.
332
435
 
333
436
  Good prompts describe mood, lighting, and color — not objects or text:
334
437
  - "Deep purple nebula with soft pink and blue light rays"
@@ -364,6 +467,370 @@ The generated image is cropped to exact device dimensions and set as the card's
364
467
  }],
365
468
  };
366
469
  });
470
+ // Tool 7: prepare-screenshot-brief
471
+ server.registerTool('prepare-screenshot-brief', {
472
+ title: 'Prepare Screenshot Brief',
473
+ description: `Get a research checklist and strategy guide to prepare for screenshot generation. Call this BEFORE generate-screenshots to know what to look for in the codebase. Free — no API call or credits needed.
474
+
475
+ Returns:
476
+ - A codebase research checklist (file patterns to search for each tech stack)
477
+ - Story flow recommendations by app category
478
+ - Tips for writing compelling screenshot headlines
479
+ - The codebase_context schema to fill in
480
+
481
+ This tool helps you gather the right information so generate-screenshots produces the best possible output on the first try.`,
482
+ inputSchema: z.object({
483
+ app_category: z.string().optional()
484
+ .describe('App category if known — e.g. fitness, finance, social, productivity, developer-tools'),
485
+ platform: z.enum(['ios', 'android', 'both']).default('ios')
486
+ .describe('Target platform'),
487
+ }),
488
+ }, async ({ app_category, platform }) => {
489
+ const checklist = [
490
+ '# Screenshot Brief — Research Checklist',
491
+ '',
492
+ 'Search the codebase for each of these before calling generate-screenshots.',
493
+ 'The more you find, the better the screenshots will be.',
494
+ '',
495
+ '## 1. App Identity (REQUIRED)',
496
+ '',
497
+ '**Find the app name and description:**',
498
+ '- package.json → "name", "description"',
499
+ '- README.md → first paragraph, badges, tagline',
500
+ '- pubspec.yaml → "name", "description" (Flutter)',
501
+ '- build.gradle / app/build.gradle → applicationId, versionName (Android)',
502
+ '- Info.plist / *.xcodeproj → CFBundleDisplayName (iOS native)',
503
+ '- Cargo.toml → "name", "description" (Rust)',
504
+ '- pyproject.toml / setup.py → name, description (Python)',
505
+ '',
506
+ '**Find the value proposition:**',
507
+ '- Landing page / marketing page components → hero headline, subheadline',
508
+ '- README.md → "Features" or "Why" section',
509
+ '- App Store metadata files (fastlane/metadata/) → description, keywords',
510
+ '',
511
+ '## 2. Features & Screens (REQUIRED)',
512
+ '',
513
+ '**Find the main screens:**',
514
+ '- Route definitions: look for Router, Navigator, routes.ts, app.tsx routing',
515
+ '- Page/screen directories: pages/, screens/, views/, app/ (Next.js)',
516
+ '- Navigation config: tabs, drawer items, bottom nav',
517
+ '',
518
+ '**Find key features:**',
519
+ '- README.md → feature list, bullet points',
520
+ '- Settings/preferences screen → feature toggles reveal capabilities',
521
+ '- Changelog/release notes → recent features',
522
+ '',
523
+ '## 3. Visual Identity (HIGHLY RECOMMENDED)',
524
+ '',
525
+ '**Find brand colors:**',
526
+ '- tailwind.config.* → theme.extend.colors',
527
+ '- theme.ts, colors.ts, tokens.ts → color definitions',
528
+ '- CSS variables: :root { --primary: ... }',
529
+ '- styles/globals.css, variables.css → custom properties',
530
+ '- SwiftUI: Color.accentColor, Asset catalog colors',
531
+ '- Flutter: ThemeData, ColorScheme',
532
+ '- Android: colors.xml, themes.xml',
533
+ '',
534
+ '**Find fonts:**',
535
+ '- Font imports in layout/root files',
536
+ '- Google Fonts imports, @font-face declarations',
537
+ '- Typography config in theme files',
538
+ '',
539
+ '**Observe UI style:**',
540
+ '- Dark mode / light mode support?',
541
+ '- Design system: shadcn/ui, Material, Cupertino, custom?',
542
+ '- Dense or spacious layout?',
543
+ '- Rounded or sharp corners?',
544
+ '',
545
+ '## 4. Market Context (NICE TO HAVE)',
546
+ '',
547
+ '- Target audience mentions in docs, README, marketing copy',
548
+ '- Competitor references in code comments or docs',
549
+ '- Analytics/tracking events → reveal most-used features',
550
+ '- Testimonials or reviews referenced in code',
551
+ '- Social proof data (user counts, ratings)',
552
+ '',
553
+ '## 5. User Flow (NICE TO HAVE)',
554
+ '',
555
+ '- Onboarding screens → what the app teaches users first',
556
+ '- Auth flow → sign up with email, social, magic link?',
557
+ '- Main navigation → what users do most',
558
+ '- Key interactions → what makes the app satisfying to use',
559
+ ];
560
+ // Story flow recommendations
561
+ const storyFlows = [
562
+ '',
563
+ '---',
564
+ '',
565
+ '# Story Flow Recommendations',
566
+ '',
567
+ ];
568
+ const categoryRecommendations = {
569
+ 'fitness': [
570
+ '**Fitness apps → `journey` or `benefit-first`**',
571
+ '- Lead with transformation: "Before → After" or "Track → Improve → Achieve"',
572
+ '- Highlight: workout tracking, progress charts, streaks, community challenges',
573
+ '- Mood: energetic or bold',
574
+ ],
575
+ 'finance': [
576
+ '**Finance apps → `benefit-first` or `problem-solution`**',
577
+ '- Lead with outcomes: "Save $X/month" or "See all accounts in one place"',
578
+ '- Highlight: dashboards, charts, budgets, alerts, security',
579
+ '- Mood: professional or calm',
580
+ ],
581
+ 'social': [
582
+ '**Social apps → `social-proof-bookend` or `hero-intro`**',
583
+ '- Lead with community: "Join 1M+ users" or show vibrant UI',
584
+ '- Highlight: feed, messaging, profiles, discovery, sharing',
585
+ '- Mood: playful or energetic',
586
+ ],
587
+ 'productivity': [
588
+ '**Productivity apps → `problem-solution` or `standard`**',
589
+ '- Lead with pain point: "Stop juggling 5 apps" → "One place for everything"',
590
+ '- Highlight: task management, collaboration, integrations, speed',
591
+ '- Mood: minimal or professional',
592
+ ],
593
+ 'food': [
594
+ '**Food/recipe apps → `hero-intro` or `journey`**',
595
+ '- Lead with beautiful imagery or the discovery experience',
596
+ '- Highlight: recipe browsing, meal planning, grocery lists, cooking mode',
597
+ '- Mood: warm or playful',
598
+ ],
599
+ 'travel': [
600
+ '**Travel apps → `journey` or `hero-intro`**',
601
+ '- Lead with destination discovery or trip planning flow',
602
+ '- Highlight: search, booking, itinerary, maps, offline access',
603
+ '- Mood: energetic or calm',
604
+ ],
605
+ 'health': [
606
+ '**Health/wellness apps → `benefit-first` or `journey`**',
607
+ '- Lead with outcomes: "Sleep better", "Feel calmer", "Know your body"',
608
+ '- Highlight: tracking, insights, reminders, progress, professional guidance',
609
+ '- Mood: calm or professional',
610
+ ],
611
+ 'education': [
612
+ '**Education apps → `journey` or `hero-intro`**',
613
+ '- Lead with learning progression or "learn anything" hero',
614
+ '- Highlight: courses, progress tracking, quizzes, certificates, offline',
615
+ '- Mood: playful or professional',
616
+ ],
617
+ 'developer-tools': [
618
+ '**Developer tools → `problem-solution` or `benefit-first`**',
619
+ '- Lead with workflow pain: "Stop copy-pasting" → "One command and done"',
620
+ '- Highlight: CLI, integrations, speed, DX, code examples',
621
+ '- Mood: minimal or bold',
622
+ ],
623
+ 'shopping': [
624
+ '**Shopping/e-commerce → `social-proof-bookend` or `benefit-first`**',
625
+ '- Lead with deals or trust: "Trusted by 500K+ shoppers"',
626
+ '- Highlight: discovery, search, wishlists, checkout, tracking',
627
+ '- Mood: bold or energetic',
628
+ ],
629
+ };
630
+ if (app_category && categoryRecommendations[app_category]) {
631
+ storyFlows.push(...categoryRecommendations[app_category]);
632
+ }
633
+ else {
634
+ storyFlows.push('**General recommendations by app type:**', '');
635
+ for (const [, lines] of Object.entries(categoryRecommendations)) {
636
+ storyFlows.push(...lines, '');
637
+ }
638
+ }
639
+ // Headline tips
640
+ const headlineTips = [
641
+ '',
642
+ '---',
643
+ '',
644
+ '# Screenshot Headline Tips',
645
+ '',
646
+ '- Lead with USER BENEFIT, not feature name: "Never forget a task" > "Task Management"',
647
+ '- Use power words: Track, Save, Build, Discover, Master, Simplify, Automate',
648
+ '- Include numbers when possible: "3x faster", "10K+ recipes", "Save 2hrs/week"',
649
+ '- First 3 screenshots matter most — App Store shows them in search results',
650
+ '- Hero card headline = your one-sentence pitch. Make it count.',
651
+ '- Keep headlines under 6 words. Subtitle can add detail.',
652
+ ];
653
+ // Device recommendations
654
+ const deviceTips = [
655
+ '',
656
+ '---',
657
+ '',
658
+ '# Device Recommendations',
659
+ '',
660
+ ];
661
+ if (platform === 'ios' || platform === 'both') {
662
+ deviceTips.push('**iOS (required for App Store):**');
663
+ deviceTips.push('- iPhone 16 Pro Max (iphone-6.9): 1260×2736 — REQUIRED');
664
+ deviceTips.push('- iPad Pro 13" (ipad-13): 2064×2752 — REQUIRED');
665
+ deviceTips.push('');
666
+ }
667
+ if (platform === 'android' || platform === 'both') {
668
+ deviceTips.push('**Android (required for Play Store):**');
669
+ deviceTips.push('- Android Phone (android-phone): 1080×2340 — REQUIRED');
670
+ deviceTips.push('- Android Tablet 10" (android-tablet-10): 2560×1600 — optional');
671
+ deviceTips.push('');
672
+ }
673
+ // Schema reminder
674
+ const schemaReminder = [
675
+ '',
676
+ '---',
677
+ '',
678
+ '# Next Step',
679
+ '',
680
+ 'After researching, call `generate-screenshots` with your findings in the `codebase_context` parameter:',
681
+ '```json',
682
+ '{',
683
+ ' "app_name": "...",',
684
+ ' "app_description": "...",',
685
+ ' "features": ["...", "..."],',
686
+ ' "brand_colors": { "primary": "#...", "secondary": "#..." },',
687
+ ' "mood": "...",',
688
+ ' "story_flow": "...",',
689
+ ' "count": 5,',
690
+ ' "codebase_context": {',
691
+ ' "readme_summary": "...",',
692
+ ' "key_screens": ["Dashboard", "Settings", "Profile", "..."],',
693
+ ' "color_tokens": { "primary": "#...", "background": "#..." },',
694
+ ' "target_audience": "...",',
695
+ ' "app_category": "...",',
696
+ ' "competitive_edge": "...",',
697
+ ' "ui_style": "...",',
698
+ ' "primary_user_flow": "Sign up → ... → ..."',
699
+ ' }',
700
+ '}',
701
+ '```',
702
+ ];
703
+ return {
704
+ content: [{
705
+ type: 'text',
706
+ text: [...checklist, ...storyFlows, ...headlineTips, ...deviceTips, ...schemaReminder].join('\n'),
707
+ }],
708
+ };
709
+ });
710
+ // ─── MCP Prompts ────────────────────────────────────────────────────────────────
711
+ // Prompt 1: Full workflow — research codebase → generate → iterate → export
712
+ server.registerPrompt('create-app-screenshots', {
713
+ title: 'Create App Store Screenshots',
714
+ description: 'Full guided workflow: research the codebase, generate screenshots, iterate, and export. Best results when used from within the app\'s project directory.',
715
+ argsSchema: {
716
+ platform: z.enum(['ios', 'android', 'both']).default('ios')
717
+ .describe('Target platform'),
718
+ extra_instructions: z.string().optional()
719
+ .describe('Any additional instructions — e.g. "use dark theme", "focus on the AI features", "make it seasonal for Christmas"'),
720
+ },
721
+ }, ({ platform, extra_instructions }) => ({
722
+ messages: [{
723
+ role: 'user',
724
+ content: {
725
+ type: 'text',
726
+ text: [
727
+ 'Create professional App Store screenshots for my app using AppScreenshotStudio.',
728
+ '',
729
+ 'Follow this workflow for the best results:',
730
+ '',
731
+ '## Step 1: Research My Codebase',
732
+ '',
733
+ 'Before generating anything, thoroughly research this codebase to understand what my app does.',
734
+ 'Call `prepare-screenshot-brief` to get a detailed research checklist, then search for:',
735
+ '',
736
+ '**App Identity:**',
737
+ '- package.json, pubspec.yaml, build.gradle, Info.plist → app name, version',
738
+ '- README.md → what the app does, value proposition, key features',
739
+ '- Marketing/landing pages → hero headline, positioning, taglines',
740
+ '',
741
+ '**Features & Screens:**',
742
+ '- Route/navigation definitions → list of screens the user sees',
743
+ '- Main views/pages/components → what to showcase in screenshots',
744
+ '- Settings/preferences → feature inventory',
745
+ '',
746
+ '**Visual Identity:**',
747
+ '- Theme/color config files → brand colors (tailwind.config, theme.ts, colors.xml, etc.)',
748
+ '- Font imports → typography choices',
749
+ '- Dark/light mode → UI aesthetic',
750
+ '',
751
+ '**Market Context:**',
752
+ '- App Store metadata (fastlane/metadata/, store listing files) → existing description',
753
+ '- README → target audience, competitor mentions',
754
+ '',
755
+ '## Step 2: Generate Screenshots',
756
+ '',
757
+ 'Use ALL your research to call `generate-screenshots` with rich parameters:',
758
+ '- Fill in `codebase_context` with everything you found',
759
+ '- Choose the best `story_flow` for this type of app',
760
+ '- Extract `brand_colors` from the theme files',
761
+ '- Write a compelling `app_description` based on the value proposition',
762
+ '- Order `features` by user impact',
763
+ `- Target platform: ${platform}${platform === 'both' ? ' (generate for iPhone first, then Android)' : ''}`,
764
+ `${platform === 'ios' || platform === 'both' ? '- Device: iphone-6.9 for iPhone, ipad-13 for iPad' : ''}`,
765
+ `${platform === 'android' || platform === 'both' ? '- Device: android-phone for Android' : ''}`,
766
+ '- Count: 5-6 cards recommended (App Store shows first 3 prominently in search)',
767
+ '',
768
+ '## Step 3: Review & Iterate',
769
+ '',
770
+ 'After generation, consider:',
771
+ '- Do the headlines accurately represent the app\'s value?',
772
+ '- Are the right features highlighted?',
773
+ '- Do the brand colors match the app?',
774
+ '- Would YOU download this app based on these screenshots?',
775
+ 'Use `edit-screenshots` to refine anything that doesn\'t feel right.',
776
+ '',
777
+ '## Step 4: Export',
778
+ '',
779
+ 'Use `render-screenshots` to get final high-resolution PNGs.',
780
+ 'Remind me to upload actual app screenshots into the device frames via the web app.',
781
+ '',
782
+ extra_instructions ? `## Additional Instructions\n\n${extra_instructions}\n` : '',
783
+ '---',
784
+ 'IMPORTANT: Take your time in Step 1. The quality of your research directly determines the quality of the screenshots. Thorough research saves multiple rounds of iteration.',
785
+ ].filter(Boolean).join('\n'),
786
+ },
787
+ }],
788
+ }));
789
+ // Prompt 2: Improve existing screenshots with codebase context
790
+ server.registerPrompt('improve-screenshots', {
791
+ title: 'Improve Existing Screenshots',
792
+ description: 'Research the codebase and improve an existing screenshot project. Use when screenshots have already been generated but need refinement.',
793
+ argsSchema: {
794
+ project_id: z.string().describe('Project ID to improve'),
795
+ focus: z.string().optional()
796
+ .describe('What to focus on — e.g. "headlines", "colors", "story flow", "add social proof"'),
797
+ },
798
+ }, ({ project_id, focus }) => ({
799
+ messages: [{
800
+ role: 'user',
801
+ content: {
802
+ type: 'text',
803
+ text: [
804
+ `I have an existing screenshot project (ID: ${project_id}) that I want to improve.`,
805
+ '',
806
+ '## Step 1: Inspect Current State',
807
+ '',
808
+ `Call \`get-project\` with project_id "${project_id}" to see the current screenshots.`,
809
+ 'Note the headlines, features shown, colors used, and story flow.',
810
+ '',
811
+ '## Step 2: Research My Codebase',
812
+ '',
813
+ 'Search the codebase to understand what my app actually does:',
814
+ '- Find the app name, description, and value proposition',
815
+ '- List the main features and screens',
816
+ '- Extract brand colors from theme/config files',
817
+ '- Understand the target audience',
818
+ '',
819
+ '## Step 3: Compare & Improve',
820
+ '',
821
+ 'Compare the current screenshots to what the app really is. Then use `edit-screenshots` to fix:',
822
+ '1. **Headline accuracy** — do they describe what the app actually does?',
823
+ '2. **Feature selection** — are the most valuable features highlighted?',
824
+ '3. **Brand consistency** — do colors match the app\'s theme?',
825
+ '4. **Story flow** — does the narrative make sense for this type of app?',
826
+ '5. **Visual polish** — enough decorative elements, good contrast, professional layout?',
827
+ '',
828
+ focus ? `## Focus Area\n\nPrioritize improving: ${focus}\n` : '',
829
+ 'Pass `codebase_context` with your research when calling `edit-screenshots` for context-aware changes.',
830
+ ].filter(Boolean).join('\n'),
831
+ },
832
+ }],
833
+ }));
367
834
  // ─── Start server ───────────────────────────────────────────────────────────────
368
835
  async function main() {
369
836
  if (!API_KEY) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscreenshotstudio/mcp",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "description": "MCP server for generating App Store screenshots via AppScreenshotStudio",
5
5
  "type": "module",
6
6
  "license": "MIT",