How much would my workflow change if I could operate design tools directly from Claude Code? Driven by that curiosity, I tried connecting the Google Stitch MCP (Model Context Protocol) server to Claude Code.
In conclusion, I was able to complete the entire flow of "UI generation → HTML retrieval → slide creation" within Claude Code. I'm recording the process, including the points where I got stuck.
What is Google Stitch?
Google Stitch is an AI design tool provided by Google that can automatically generate screen UIs from text instructions or design definition files (Markdown).
The main features are as follows:
Generate UI from text prompts
Create and manage design systems (brand colors, fonts, components)
Download HTML of generated UI
The feature is that screens are created just by giving instructions, without manual operations like in Figma. Since the tool can be called directly from Claude Code via the MCP server, everything can be completed in the terminal without opening a browser.
Connection method: MCP server configuration
Adding to the configuration fileAdd the following to Claude Code's ~/.claude.json (or the project's .mcp.json).
"mcpServers":
"stitch":
"command": "npx",
"args": ["-y", "@google/stitch-mcp"],
"env":
"STITCH_API_KEY": "$STITCH_API_KEY"
I manage the API key in a .env file and pass it as an environment variable. Hardcoding it into the code is prohibited.
List of tools available after connectionOnce configuration is complete, mcpstitch* series tools become available in Claude Code.
mcpstitchlist_projects: Retrieve a list of projects
mcpstitchcreate_project: Create a project
mcpstitchupload_design_md: Upload design MD
mcpstitchcreate_design_system_from_design_md: Create a design system
mcpstitchgenerate_screen_from_text: Generate a screen from text
mcpstitchget_screen: Get screen details (including HTML)
mcpstitchlist_screens: Get list of screens
mcpstitchget_project: Get project details
What I actually did: A 4-step record
The main steps covered in this chapter are as follows.
Step 1: Create a design system
Step 2: Generate a management dashboard screen
Step 3: Convert HTML to PPTX
Step 4: Explore other projects
Throughout the process, my impression was that "generation is smooth, but conversion takes a bit of effort."
Step 1: Creating a design systemFirst, I wrote the brand definition in a Markdown file (design.md), base64-encoded it, and uploaded it to Stitch.
Primary color: #0054A7 (コーポレートブルー) Font: Inter Style: Corporate Dashboard
Calling create_design_system_from_design_md created a design system for our company brand. It finished in a few seconds.
Step 2: Generate management dashboard screenI passed a prompt to generate_screen_from_text and generated a 1280x720px screen.
Specified content:
3 KPIs (Sales ¥45.2M +12%, Operating Profit ¥8.4M +5%, Operating Profit Margin 18.5% -1%)
Bar chart of monthly sales trends (January to June)
Calling get_screen after generation allows you to retrieve the screen's HTML code. Saving this HTML locally allowed me to check it immediately in a browser.
Step 3: Convert from HTML to PPTX (7 cycles of QA)This was the most time-consuming part. Stitch generates HTML for the web, which cannot be converted directly into a PowerPoint file (.pptx).
The method I chose was re-implementation using pptxgenjs (a Node.js library). I wrote code to reproduce the coordinates, colors, and font sizes in JavaScript while interpreting the HTML layout.
// KPIカードの描画(pptxgenjs)
slide.addShape(pptx.ShapeType.rect,
x: 0.3, y: 1.2, w: 2.8, h: 1.5,
fill: color: "FFFFFF" ,
line: color: "E5E7EB", width: 1
);
slide.addText("¥45.2M",
x: 0.3, y: 1.4, w: 2.8, h: 0.6,
fontSize: 28, bold: true, color: "0054A7"
);The QA process followed this flow: PDF conversion via LibreOffice → JPEG conversion via pdftoppm → visual confirmation by a sub-agent.
Main revisions:
Adjusting the thickness of the top border
Fine-tuning the coordinates of KPI values
Specifying the Y-axis maximum value for bar charts (valAxisMaxVal: 60)
Maximizing chart height (h: 2.5)
It was the right decision not to assume that "the code works = finished," but to define QA as including visual confirmation.
Step 4: Exploring another project (Shift Kinetic)I checked the design system of another project using get_project.
Primary: #e61e50 (赤) Secondary: #8234c6 (紫) Font: Plus Jakarta Sans + Inter + Geist Style: Glassmorphism
I retrieved 10 screens using list_screens. The breakdown was 4 slides for the Claude Code Presentation (2560px width) and 5 sample app screens (a mix of mobile and desktop).
I felt that being able to compare designs across projects is convenient.
What I learned from doing this
By operating Stitch from Claude Code, I was able to complete the flow of "conveying UI specifications in text → generating screens → retrieving HTML" entirely within the terminal.
On the other hand, the format gap between Web HTML and PowerPoint is larger than I thought. The HTML generated by Stitch could not be used as-is, and I had to rewrite the coordinates and layout from scratch.
The two-stage process of "generate with Stitch → reproduce with pptxgenjs" is tedious, but I think it is a realistic choice to ensure design accuracy.
The mechanism for MCP server integration itself is simple, and I was able to connect just by adding a few lines to ~/.claude.json.
Since not only design tools but also other MCP servers can be added in the same way, the range of applications is wide.
Summary
Google Stitch can be operated directly from Claude Code via an MCP server
Simply adding the configuration to ~/.claude.json makes the mcpstitch* tools available
Everything from generating a UI from text instructions to downloading it as HTML is completed within the terminal
When converting HTML to PPTX, reimplementing it with pptxgenjs is a practical option
QA quality stabilizes when designed to include not just 'code execution' but also visual verification
By adding an MCP server to Claude Code, you can handle design tools, databases, and external APIs through the same interface.
The Stitch MCP is easy to try as an entry point, and I felt it was a very accessible subject for those touching MCP server integration for the first time.
If you are interested, I recommend completing the connection settings first and trying it out starting with list_projects.