一键导入
Set up Google Stitch, Figma, and NanoBanana MCP servers for Claude Code
npx skills add https://github.com/tygwan/stitchkit --skill stitch-setup复制此命令并粘贴到 Claude Code 中以安装该技能
Set up Google Stitch, Figma, and NanoBanana MCP servers for Claude Code
npx skills add https://github.com/tygwan/stitchkit --skill stitch-setup复制此命令并粘贴到 Claude Code 中以安装该技能
| name | stitch-setup |
| description | Set up Google Stitch, Figma, and NanoBanana MCP servers for Claude Code |
| argument-hint | ["stitch|figma|nanobanana|all"] |
| allowed-tools | ["Read","Write","Edit","Bash","Glob","Grep"] |
Help the user install and configure Google Stitch, Figma, and NanoBanana MCP servers for Claude Code.
/stitch-setup or /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 onlyWARNING: 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.
Stitch uses Google Cloud API key authentication via the official Google Stitch MCP server (HTTP type).
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-here
Add 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}"
}
}
}
Run mcp__stitch__list_projects to confirm the connection.
file:read — Read access to files (required)file:write — Write access (needed for push/sync features)Option A: Using environment variable (recommended)
Add to .env:
FIGMA_ACCESS_TOKEN=figd_your-token-here
Add 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.
Use Figma MCP tools to list files and confirm access.
NanoBanana provides AI image generation, editing, and smart model selection powered by Google's Gemini models.
This is a free-tier key. It works with Gemini 2.5 Flash, 3.0 Pro, and 3.1 Flash models.
Option A: Using environment variable (recommended)
Add to .env (make sure it's in .gitignore):
GOOGLE_AI_API_KEY=your-google-ai-api-key
Add 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-key
Run mcp__nanobanana-mcp__gemini_generate_image with a simple prompt to confirm the connection.
| 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 |
Always ensure these are in .gitignore:
.env
.env.local
.env.*.local
After setup, inform the user about available stitchkit features:
stitch-design skill — auto-triggers on design requestsreferences/prompt-templates.mddesign-explorer agent — generates multiple design alternativesAfter configuring all servers, verify each one works:
mcp__stitch__list_projects — should return (possibly empty) project listmcp__nanobanana-mcp__gemini_generate_image with a simple prompt — should return an imageIf any server fails, check that the corresponding environment variable is set and the shell has been restarted.