@khmuhtadin/pi-stitch-mcp
extensionmaintainedPi extension that bridges pi to the Google Stitch remote MCP server. Design-to-code: generate Flutter, React, SwiftUI components from Figma designs.
by — · v0.1.0 · published 1mo ago
$ pi install npm:@khmuhtadin/pi-stitch-mcpdownloads/mo
60
stars
0
last push
1mo ago
open issues
0
Signals
license: MITtestspi manifest: missinginstall size: —deps: 0peer deps: 0
Download trend
152 downloads · last 12 weeks (weekly)
README
pi Stitch MCP Extension
A pi package that bridges pi to the Google Stitch remote MCP server (https://stitch.googleapis.com/mcp). Stitch is Google's design-to-code platform — generate pixel-perfect Flutter, React (JSX), and SwiftUI components from Figma designs.
It exposes a small, generic bridge instead of registering dozens of Stitch tools by default. This keeps pi's tool list compact while still allowing the model to discover and call any Stitch MCP tool.
Installation
pi install npm:@khmuhtadin/pi-stitch-mcp
Prerequisites
You need a Google Stitch API key. Set it via:
export GOOGLE_STITCH_API_KEY="your-api-key-here"
Or inside pi:
/stitch-mcp-set-key your-api-key-here
Registered tools
stitch_mcp_list_tools— list tools exposed by the Stitch MCP server.stitch_mcp_call_tool— call any Stitch MCP tool bynamewith JSONarguments.
Slash commands
/stitch-mcp-set-key <key>— set the Google Stitch API key in memory (not persisted across restarts; useGOOGLE_STITCH_API_KEYenv var for persistence)./stitch-mcp-register [tool1,tool2|*]— optional: register selected MCP tools as native pi tools with astitch_prefix./stitch-mcp-reset— reset the connection.
Configuration
Optional environment variables:
GOOGLE_STITCH_API_KEY— your Google Stitch API key (recommended).STITCH_MCP_URL— defaults tohttps://stitch.googleapis.com/mcp.STITCH_MCP_TIMEOUT_MS— defaults to30000.
Development
npm install
npm run typecheck
npm pack --dry-run
License
MIT