stitch-setup
Skill9 starsChanged 8 months agoMITView on GitHub
Set up Google Stitch, Figma, and NanoBanana MCP servers for Claude Code
- Reads credentials
In this repositoryOne other file it gives its agents.
- stitch-designSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Create or select a project
- Very specific: line 49
Create a .env file in your project root (make sure it's in .gitignore):
- Very specific: line 83
Run mcp__stitch__list_projects to confirm the connection.
- Distinctive: line 140
Use Figma MCP tools to list files and confirm access.
- Very specific: line 161
Add to .env (make sure it's in .gitignore):
- Very specific: line 188
Run mcp__nanobanana-mcp__gemini_generate_image with a simple prompt to confirm the connection.
- Very specific: line 201
Always ensure these are in .gitignore:
- Very specific: line 210
After setup, inform the user about available stitchkit features:
- Distinctive: line 220
After configuring all servers, verify each one works:
- Distinctive: line 223
Figma: Ask to list Figma files — should authenticate and respond
- Distinctive: line 226
If any server fails, check that the corresponding environment variable is set and the shell has been restarted.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Stitch, Figma & NanoBanana MCP Setup
Help the user install and configure Google Stitch, Figma, and NanoBanana MCP servers for Claude Code.
Usage
/stitch-setupor/stitch-setup all— Set up all three MCP servers (Stitch, Figma, NanoBanana)/stitch-setup stitch— Set up Stitch MCP only/stitch-setup figma— Set up Figma MCP only/stitch-setup nanobanana— Set up NanoBanana MCP only
Important: API Key Security
WARNING: API keys and access tokens are sensitive credentials. Follow these rules:
- NEVER commit API keys to git. Add
.envto.gitignore.- NEVER hardcode tokens directly in
.mcp.jsonif the project is public.- Use environment variables or
.envfiles for token storage.- Rotate tokens immediately if accidentally exposed.
- Use the minimum required permissions when generating tokens.
Setup Process
Google Stitch MCP
Stitch uses Google Cloud API key authentication via the official Google Stitch MCP server (HTTP type).
Step 1: Get a Google Cloud API Key
- Go to Google Cloud Console
- Create or select a project
- Navigate to APIs & Services → Credentials
- Click + CREATE CREDENTIALS → API key
- (Recommended) Click Edit API key to restrict it:
- Application restrictions: Set by HTTP referrer or IP
- API restrictions: Restrict to Stitch/Generative AI APIs only
- Copy the API key
Step 2: Configure Stitch MCP
Option A: Using environment variable (recommended for public repos)
Create a .env file in your project root (make sure it's in .gitignore):
GOOGLE_API_KEY=your-api-key-hereAdd to .mcp.json:
{
"stitch": {
"type": "http",
"url": "https://stitch.googleapis.com/mcp",
"headers": {
"X-Goog-Api-Key": "your-api-key-here"
}
}
}Or using environment variable:
{
"stitch": {
"type": "http",
"url": "https://stitch.googleapis.com/mcp",
"headers": {
"X-Goog-Api-Key": "${GOOGLE_API_KEY}"
}
}
}Step 3: Verify
Run mcp__stitch__list_projects to confirm the connection.
Figma MCP
Step 1: Get a Figma Personal Access Token
- Go to Figma → click your profile avatar (top-left)
- Settings → Security → Personal access tokens
- Click Generate new token
- Give it a description (e.g., "Claude Code - stitchkit")
- Select scopes:
file:read— Read access to files (required)file:write— Write access (needed for push/sync features)
- Copy the token immediately (it won't be shown again)
Step 2: Configure Figma MCP
Option A: Using environment variable (recommended)
Add to .env:
FIGMA_ACCESS_TOKEN=figd_your-token-hereAdd to .mcp.json:
{
"figma": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-figma@latest"],
"env": {
"FIGMA_ACCESS_TOKEN": "${FIGMA_ACCESS_TOKEN}"
}
}
}Option B: Direct (private repos only)
{
"figma": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-figma@latest"],
"env": {
"FIGMA_ACCESS_TOKEN": "figd_your-token-here"
}
}
}WARNING: Only use Option B in private repositories. Never commit tokens to public repos.
Step 3: Verify
Use Figma MCP tools to list files and confirm access.
NanoBanana MCP (Gemini Image Generation)
NanoBanana provides AI image generation, editing, and smart model selection powered by Google's Gemini models.
Step 1: Get a Google AI API Key
- Go to Google AI Studio
- Click Create API key
- Select or create a Google Cloud project
- Copy the generated API key
This is a free-tier key. It works with Gemini 2.5 Flash, 3.0 Pro, and 3.1 Flash models.
Step 2: Configure NanoBanana MCP
Option A: Using environment variable (recommended)
Add to .env (make sure it's in .gitignore):
GOOGLE_AI_API_KEY=your-google-ai-api-keyAdd to .mcp.json:
{
"nanobanana-mcp": {
"command": "npx",
"args": ["-y", "@ycse/nanobanana-mcp"],
"env": {
"GOOGLE_AI_API_KEY": "${GOOGLE_AI_API_KEY}"
}
}
}Option B: Using GEMINI_API_KEY (alternative env var name)
NanoBanana also accepts GEMINI_API_KEY as an alternative:
GEMINI_API_KEY=your-google-ai-api-keyStep 3: Verify
Run mcp__nanobanana-mcp__gemini_generate_image with a simple prompt to confirm the connection.
Configuration Location
| Location | File | Use case |
| Project-level (recommended) | .mcp.json in project root | Project-specific MCP servers |
| User-level | ~/.claude/settings.json → mcpServers | Global MCP servers available everywhere |
.gitignore Check
Always ensure these are in .gitignore:
.env
.env.local
.env.*.localPost-setup
After setup, inform the user about available stitchkit features:
stitch-designskill — auto-triggers on design requests- Prompt templates for 22+ page types in
references/prompt-templates.md design-exploreragent — generates multiple design alternatives- Design-to-code export via Stitch HTML export
- NanoBanana image generation — create icons, banners, illustrations with Gemini
- Combined workflow — generate UI layouts with Stitch, then matching assets with NanoBanana
Quick connectivity check
After configuring all servers, verify each one works:
- Stitch:
mcp__stitch__list_projects— should return (possibly empty) project list - Figma: Ask to list Figma files — should authenticate and respond
- NanoBanana:
mcp__nanobanana-mcp__gemini_generate_imagewith a simple prompt — should return an image
If any server fails, check that the corresponding environment variable is set and the shell has been restarted.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

