stitch-mcp-upload-screens-from-images
Stitch MCP — Upload Screens from Images
Uploads one or more images (screenshots, mockups, wireframes) into a Stitch project as new screens. This is the entry point for the "redesign existing UI" workflow — import what you have, then use edit_screens to iterate or convert directly to code.
Critical prerequisite
Only use this skill when the user explicitly mentions "Stitch".
You must have a projectId before calling this. If you don't have one:
- Create a new project via
stitch-mcp-create-project - Or find an existing project via
stitch-mcp-list-projects
When to use
- User provides a screenshot and wants to redesign it in Stitch
- User wants to import existing mockups into Stitch for editing
- The orchestrator classifies intent as "Upload screenshot"
- User says "import this design", "upload this image", or "redesign this screen"
Step 1: Encode the image to base64
Use the helper script to convert a local image file to base64:
bash scripts/encode-image.sh "path/to/screenshot.png"
The script outputs raw base64 to stdout. Capture it for the API call.
Supported formats and their MIME types:
| Extension | MIME type |
|---|---|
.png |
image/png |
.jpg, .jpeg |
image/jpeg |
.webp |
image/webp |
.gif |
image/gif |
Step 2: Call the MCP tool
{
"name": "upload_screens_from_images",
"arguments": {
"projectId": "3780309359108792857",
"images": [
{
"fileContentBase64": "[base64-encoded-image-data]",
"mimeType": "image/png"
}
]
}
}
projectId — numeric ID only, no prefix
✅ "3780309359108792857"
❌ "projects/3780309359108792857"
images — array of image objects
Each image needs:
| Field | Type | Description |
|---|---|---|
fileContentBase64 |
string | Base64-encoded image data (no data: prefix) |
mimeType |
string | MIME type matching the image format |
You can upload multiple images in a single call — each becomes a separate screen.
Output
Returns session info similar to generate_screen_from_text. The uploaded images appear as new screens in the project.
After uploading
- Call
stitch-mcp-list-screensto find the new screen IDs - Offer the user:
- "Edit this screen (change colors, layout, content)?" →
stitch-mcp-edit-screens - "Convert directly to code?" →
stitch-mcp-get-screen→ framework conversion - "Generate variants based on this design?" →
stitch-mcp-generate-variants
- "Edit this screen (change colors, layout, content)?" →
References
scripts/encode-image.sh— Base64 encoding helper
More from gabelul/stitch-kit
stitch-mcp-get-screen
Retrieves full details of a specific Stitch screen — HTML download URL, screenshot URL, dimensions. This is the final step in design retrieval before code conversion.
35stitch-setup
Step-by-step installer for the stitch-kit plugin and Stitch MCP server. Use this when setting up the plugin for the first time, diagnosing connection issues, or helping a new user get Stitch running in Claude Code or Codex CLI.
33stitch-react-components
Converts Stitch designs into modular Vite + React components — TypeScript, theme-mapped Tailwind, dark mode via CSS variables, and clean component architecture. Use this for Vite/React apps without App Router. For Next.js 15 App Router, use stitch-nextjs-components instead.
24stitch-ui-prompt-architect
Builds Stitch-ready prompts via two paths — Path A enhances vague ideas into polished prompts, Path B merges a Design Spec JSON + user request into a structured [Context] [Layout] [Components] prompt.
23stitch-ideate
Conversational design ideation agent that researches trends, explores visual directions, and refines ideas through adaptive questioning — then produces a rich PRD document and auto-generates Stitch screens. Your design buddy that thinks deeply before designing.
23stitch-react-native-components
Converts Stitch mobile designs into React Native / Expo components — TypeScript, StyleSheet, Expo Router, dark mode via useColorScheme, and proper touch targets. Cross-platform iOS and Android.
22