@google/stitch-sdk weekly downloads statistics
By google (38 listings) · npm · MCP servers
Generate UI screens from text prompts and extract their HTML and screenshots programmatically.
@google/stitch-sdk has 20,090 recorded weekly downloads on npm, a decrease of 52.8% over the past 30 days.
It ranks #752 of 2,256 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by -51.8%.
PluginStats has 543 daily observations since Apr 23, 2025; the latest is from Oct 17, 2026.
About @google/stitch-sdk
@google/stitch-sdk
Generate UI screens from text prompts and extract their HTML and screenshots programmatically.
Quick Start
Set your API key and generate a screen:
html is a download URL for the screen's HTML. imageUrl is a download URL for the screenshot.
Install
To use stitchTools() with the Vercel AI SDK, install ai as well:
Working with Projects and Screens
List existing projects
Reference a project by ID
If you already have a project ID, reference it directly:
Edit a screen
Generate variants
variantOptions fields:
| Field | Type | Default | Description |
| variantCount | number | 3 | Number of variants (1–5) | | creativeRange | string | "EXPLORE" | "REFINE", "EXPLORE", or "REIMAGINE" | | aspects | string[] | all | "LAYOUT", "COLOR_SCHEME", "IMAGES", "TEXT_FONT", "TEXT_CONTENT" |
Tool Client (Agent Usage)
For agents and orchestration scripts that need direct MCP tool access:
The client auto-connects on the first callTool or listTools call. No explicit connect() needed. All tool responses and input parameters are strictly typed and exported from the SDK.
API Reference
Stitch
The root class. Manages projects.
| Method | Parameters | Returns | Description |
| createProject(title) | title: string | Promise | Create a new project | | projects() | — | Promise | List all accessible projects | | project(id) | id: string | Project | Reference a project by ID (no API call) |
Project
A Stitch project containing screens.
| Property | Type | Description |
| id | string | Alias for projectId | | projectId | string | Bare project ID (no projects/ prefix) |
| Method | Parameters | Returns | Description |
| generate(prompt, deviceType?) | prompt: string, deviceType?: DeviceType | Promise | Generate a screen from a text prompt | | screens() | — | Promise | List all screens in the project | | getScreen(screenId) | screenId: string | Promise | Retrieve a specific screen by ID |
DeviceType: "MOBILE" \| "DESKTOP" \| "TABLET" \| "AGNOSTIC"
Screen
A generated UI screen. Provides access to HTML and screenshots.
| Property | Type | Description |
| id | string | Alias for screenId | | screenId | string | Bare screen ID | | projectId | string | Parent project ID |
| Method | Parameters | Returns | Description |
| edit(prompt, deviceType?, modelId?) | prompt: string | Promise | Edit the screen with a text prompt | | variants(prompt, variantOptions, deviceType?, modelId?) | prompt: string, variantOptions: object | Promise | Generate design variants | | getHtml() | — | Promise | Get the screen's HTML download URL | | getImage() | — | Promise | Get the screen's screenshot download URL |
getHtml() and getImage() use cached data from the generation response when available. If the screen was loaded from screens() or getScreen(), they call the get_screen API automatically.
modelId: "GEMINI_3_PRO" \| "GEMINI_3_FLASH"
StitchToolClient
Low-level authenticated pipe to the Stitch MCP server. Use this when you need direct tool access (e.g., in an AI agent).
| Method | Parameters | Returns | Description |
| callTool(name, args) | name: string, args: Record | Promise | Call an MCP tool | | listTools() | — | Promise | List available tools | | connect() | — | Promise | Explicitly connect (auto-called by callTool) | | close() | — | Promise | Close the connection |
StitchProxy
An MCP proxy server that forwards requests to Stitch. Use this to expose Stitch tools through your own MCP server.
stitch Singleton
A pre-configured Stitch instance that reads STITCH_API_KEY from the environment. Lazily initialized on first use.
toolMap
Static tool schemas with pre-parsed parameters. Available on stitch.toolMap or as a standalone export. No network call or API key needed.
Each ToolParam has: name, type, description, required, and enum (for constrained values).
The raw inputSchema (ToolInputSchema) is also available on each entry. Standalone exports: toolMap, toolDefinitions, ToolInfo, ToolParam, ToolDefinition, ToolInputSchema, ToolPropertySchema.
Configuration
Environment Variables
| Variable | Required | Description |
| STITCH_API_KEY | Yes (or use OAuth) | API key for authentication | | STITCH_ACCESS_TOKEN | No | OAuth access token (alternative to API key) | | GOOGLE_CLOUD_PROJECT | With OAuth | Google Cloud project ID | | STITCH_HOST | No | Override the MCP server URL |
Explicit Configuration
| Option | Type | Default | Description |
| apiKey | string | STITCH_API_KEY | API key | | accessToken | string | STITCH_ACCESS_TOKEN | OAuth token | | projectId | string | GOOGLE_CLOUD_PROJECT | Cloud project ID | | baseUrl | string | https://stitch.googleapis.com/mcp | MCP server URL | | timeout | number | 300000 | Request timeout (ms) |
Authentication requires either apiKey or both accessToken and projectId.
Error Handling
All domain class methods throw StitchError on failure:
Error codes: AUTH_FAILED, NOT_FOUND, PERMISSION_DENIED, RATE_LIMITED, NETWORK_ERROR, VALIDATION_ERROR, UNKNOWN_ERROR.
Disclaimer
This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.
License
Apache 2.0 — see LICENSE for details.
Description from the npm listing.
- stitch
- mcp
- ui
- generative-ai
Where @google/stitch-sdk sits in the listing
Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Recent observations
Full history (543)Similar npm MCP servers plugins
Data source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@google/stitch-sdk. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.