git clone https://github.com/openclaw/skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/arielletolome/stitch" ~/.claude/skills/openclaw-skills-stitch && rm -rf "$T"
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/arielletolome/stitch" ~/.openclaw/skills/openclaw-skills-stitch && rm -rf "$T"
skills/arielletolome/stitch/SKILL.mdStitch by Google — MCP Skill
Stitch is Google's AI-powered UI design tool (Beta). This skill covers how to interact with Stitch projects and screens via its Remote MCP server using the HTTP API.
Authentication
API Key (Recommended)
Generate your API key at: https://stitch.withgoogle.com/settings (API Keys section)
Set it as an environment variable:
export STITCH_API_KEY=YOUR_STITCH_API_KEY
All requests go to:
https://stitch.googleapis.com/mcp
Pass the key via header:
X-Goog-Api-Key: $STITCH_API_KEY
Making MCP Calls
Stitch exposes a standard MCP HTTP endpoint. To call a tool, POST to the MCP endpoint with the tool name and arguments.
curl -X POST https://stitch.googleapis.com/mcp \ -H "Content-Type: application/json" \ -H "X-Goog-Api-Key: YOUR_STITCH_API_KEY" \ -d '{ "method": "tools/call", "params": { "name": "list_projects", "arguments": {} } }'
Note: Stitch is a Remote MCP server (cloud-hosted), unlike local file-based MCP servers. API Keys persist indefinitely; OAuth tokens expire every ~1 hour.
Available Tools
Project Management
list_projects
list_projectsLists all Stitch projects accessible to the user.
- Read-only: yes
- Input:
(optional, string): AIP-160 filter onfilter
field. Values:view
(default),view=ownedview=shared
- Output: Array of
objectsProject
# List all owned projects curl -X POST https://stitch.googleapis.com/mcp \ -H "Content-Type: application/json" \ -H "X-Goog-Api-Key: YOUR_STITCH_API_KEY" \ -d '{"method":"tools/call","params":{"name":"list_projects","arguments":{}}}'
create_project
create_projectCreates a new Stitch project (container for UI designs).
- Read-only: no (destructive)
- Input:
(optional, string): Display name of the projecttitle
- Output: Created
resource withProject
,name
, and metadatatitle
curl -X POST https://stitch.googleapis.com/mcp \ -H "Content-Type: application/json" \ -H "X-Goog-Api-Key: YOUR_STITCH_API_KEY" \ -d '{"method":"tools/call","params":{"name":"create_project","arguments":{"title":"My Ad Landing Page"}}}'
get_project
get_projectRetrieves details of a specific project.
- Read-only: yes
- Input:
(required, string): Resource name. Format:name
. Example:projects/{project}projects/4044680601076201931
- Output:
resource objectProject
Screen Management
list_screens
list_screensLists all screens within a Stitch project.
- Read-only: yes
- Input:
(required, string): Project ID withoutprojectId
prefixprojects/
- Output: Array of
objectsScreen
curl -X POST https://stitch.googleapis.com/mcp \ -H "Content-Type: application/json" \ -H "X-Goog-Api-Key: YOUR_STITCH_API_KEY" \ -d '{"method":"tools/call","params":{"name":"list_screens","arguments":{"projectId":"4044680601076201931"}}}'
get_screen
get_screenRetrieves details of a specific screen including HTML, screenshot, and Figma export.
- Read-only: yes
- Input:
(required):nameprojects/{project}/screens/{screen}
(required, deprecated): Project ID without prefixprojectId
(required, deprecated): Screen ID without prefixscreenId
All three are currently required even though
/projectId
are deprecated.screenId - Output:
object withScreen
,htmlCode
,screenshot
download URLsfigmaExport
AI Generation
generate_screen_from_text
generate_screen_from_textGenerates a new UI screen from a text prompt. Takes a few minutes.
- Read-only: no (destructive)
- ⚠️ Don't retry on connection errors — generation may still be in progress. Use
after a few minutes to check.get_screen - Input:
(required, string)projectId
(required, string): Describe the screen to generateprompt
(optional):deviceType
|MOBILE
|DESKTOP
|TABLETAGNOSTIC
(optional):modelId
|GEMINI_3_FLASH
(GEMINI_3_PRO is deprecated)GEMINI_3_1_PRO
- Output: Generated
objects +Screen
entries (may include suggestions)SessionOutputComponent- If
has suggestions, present them to user. If accepted, call again with the suggestion as the newoutput_components
.prompt
- If
curl -X POST https://stitch.googleapis.com/mcp \ -H "Content-Type: application/json" \ -H "X-Goog-Api-Key: YOUR_STITCH_API_KEY" \ -d '{ "method": "tools/call", "params": { "name": "generate_screen_from_text", "arguments": { "projectId": "YOUR_PROJECT_ID", "prompt": "A mobile landing page for a Medicare insurance offer with a bold headline, trust badges, and a prominent CTA button", "deviceType": "MOBILE", "modelId": "GEMINI_3_1_PRO" } } }'
edit_screens
edit_screensEdits existing screens using a text prompt. Takes a few minutes.
- Read-only: no (destructive)
- ⚠️ Don't retry on connection errors
- Input:
(required, string)projectId
(required, string[]): Screen IDs withoutselectedScreenIds
prefixscreens/
(required, string): Edit instructionprompt
(optional)deviceType
(optional):modelId
|GEMINI_3_FLASHGEMINI_3_1_PRO
- Output: Updated
objectsScreen
generate_variants
generate_variantsGenerates design variants of existing screens.
- Read-only: no (destructive)
- ⚠️ Don't retry on connection errors
- Input:
(required, string)projectId
(required, string[])selectedScreenIds
(required, string): Guide variant generationprompt
(required, object): SeevariantOptions
belowVariantOptions
(optional)deviceType
(optional)modelId
- Output: Variant
objectsScreen
VariantOptions schema:
{ "variantCount": 3, "creativeRange": "EXPLORE", "aspects": ["COLOR_SCHEME", "LAYOUT"] }
: 1–5 (default: 3)variantCount
:creativeRange
|REFINE
|EXPLOREREIMAGINE
:aspects
|LAYOUT
|COLOR_SCHEME
|IMAGES
|TEXT_FONTTEXT_CONTENT
Shared Types
Screen Object
| Field | Type | Description |
|---|---|---|
| string | Resource name: |
| string | (Deprecated) Screen ID |
| string | Screen title |
| string | Prompt used to generate |
| File | Screenshot image |
| File | HTML code of the screen |
| File | Figma export file |
| DesignTheme | Theme used |
| DeviceType | Device target |
| ScreenMetadata | Status, agent type, display mode |
/ | string | Screen dimensions |
| string | Group ID for variants |
File Object
| Field | Type | Description |
|---|---|---|
| string | |
| string | Direct download URL |
| string | e.g. , |
ScreenMetadata
| Field | Values |
|---|---|
| | | |
| , , , etc. |
| | | | | |
Common Workflows
Generate a new landing page ad creative
import requests import json API_KEY = "YOUR_STITCH_API_KEY" MCP_URL = "https://stitch.googleapis.com/mcp" HEADERS = { "Content-Type": "application/json", "X-Goog-Api-Key": API_KEY } def stitch_call(tool_name, args): payload = { "method": "tools/call", "params": {"name": tool_name, "arguments": args} } r = requests.post(MCP_URL, headers=HEADERS, json=payload) r.raise_for_status() return r.json() # 1. Create a project project = stitch_call("create_project", {"title": "Medicare Q4 Campaign"}) project_id = project["result"]["name"].split("/")[1] # 2. Generate initial screen result = stitch_call("generate_screen_from_text", { "projectId": project_id, "prompt": "Mobile landing page for Medicare Advantage with emotional headline, plan comparison table, and green CTA button", "deviceType": "MOBILE", "modelId": "GEMINI_3_1_PRO" }) # 3. Get screen details once complete # (generation takes a few minutes — poll with get_screen) screens = result["result"].get("screens", []) if screens: screen_name = screens[0]["name"] # screen_name format: projects/{id}/screens/{screen_id} parts = screen_name.split("/") project_id = parts[1] screen_id = parts[3] screen = stitch_call("get_screen", { "name": screen_name, "projectId": project_id, "screenId": screen_id }) # Download HTML html_url = screen["result"]["htmlCode"]["downloadUrl"] print(f"HTML download URL: {html_url}") # Download screenshot screenshot_url = screen["result"]["screenshot"]["downloadUrl"] print(f"Screenshot URL: {screenshot_url}")
Generate variants for A/B testing
# After generating a base screen, create variants variants = stitch_call("generate_variants", { "projectId": project_id, "selectedScreenIds": [screen_id], "prompt": "Test different color schemes and CTA button styles", "variantOptions": { "variantCount": 3, "creativeRange": "EXPLORE", "aspects": ["COLOR_SCHEME", "TEXT_CONTENT"] }, "deviceType": "MOBILE", "modelId": "GEMINI_3_FLASH" })
Tips for Ad Creative Use
- Effective prompts include: device type, ad vertical, emotional tone, specific UI components (hero, CTA, trust badges, form)
- Pixel-perfect HTML: Use
to grab the actual HTML — hand it to Marcus for landing page deploymenthtmlCode.downloadUrl - Figma export: Available via
for design reviewfigmaExport.downloadUrl - Generation takes 2–5 minutes — don't retry on network errors; check status with
→get_screenscreenMetadata.status - Model choice:
for highest quality,GEMINI_3_1_PRO
for faster iterationGEMINI_3_FLASH
MCP Client Config (for direct Claude Code / Cursor integration)
{ "mcpServers": { "stitch": { "url": "https://stitch.googleapis.com/mcp", "headers": { "X-Goog-Api-Key": "YOUR_STITCH_API_KEY" } } } }
Or via Claude Code CLI:
claude mcp add stitch --transport http https://stitch.googleapis.com/mcp \ --header "X-Goog-Api-Key: YOUR_STITCH_API_KEY" -s user