google-stitch-mcp 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# stitch-mcp
|
|
1
|
+
# google-stitch-mcp
|
|
2
2
|
|
|
3
3
|
A CLI for moving AI-generated UI designs into your development workflow — preview them locally, build sites from them, and feed them to coding agents.
|
|
4
4
|
|
|
@@ -10,13 +10,13 @@ AI-generated designs in Google's Stitch platform live as HTML/CSS behind an API.
|
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
# Set up authentication and MCP client config
|
|
13
|
-
npx
|
|
13
|
+
npx google-stitch-mcp init
|
|
14
14
|
|
|
15
15
|
# Serve all project screens on a local dev server
|
|
16
|
-
npx
|
|
16
|
+
npx google-stitch-mcp serve -p <project-id>
|
|
17
17
|
|
|
18
18
|
# Build an Astro site by mapping screens to routes
|
|
19
|
-
npx
|
|
19
|
+
npx google-stitch-mcp site -p <project-id>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
## Features
|
|
@@ -37,7 +37,7 @@ Add this to your MCP client config to give coding agents access to Stitch tools
|
|
|
37
37
|
"mcpServers": {
|
|
38
38
|
"stitch": {
|
|
39
39
|
"command": "npx",
|
|
40
|
-
"args": ["
|
|
40
|
+
"args": ["google-stitch-mcp", "proxy"]
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -52,13 +52,13 @@ Supported clients: VS Code, Cursor, Claude Code, Gemini CLI, Codex, OpenCode.
|
|
|
52
52
|
Run directly with `npx` (no install needed):
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
|
-
npx
|
|
55
|
+
npx google-stitch-mcp <command>
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
Or install globally:
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
npm install -g
|
|
61
|
+
npm install -g google-stitch-mcp
|
|
62
62
|
stitch-mcp <command>
|
|
63
63
|
```
|
|
64
64
|
|
|
@@ -67,7 +67,7 @@ stitch-mcp <command>
|
|
|
67
67
|
### `init` — Set up authentication and MCP config
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
|
-
npx
|
|
70
|
+
npx google-stitch-mcp init [options]
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
| Option | Description |
|
|
@@ -83,7 +83,7 @@ Walks through a setup wizard: MCP client selection, gcloud installation, OAuth l
|
|
|
83
83
|
### `doctor` — Verify configuration health
|
|
84
84
|
|
|
85
85
|
```bash
|
|
86
|
-
npx
|
|
86
|
+
npx google-stitch-mcp doctor [options]
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
| Option | Description |
|
|
@@ -95,7 +95,7 @@ Checks that gcloud is installed, user is authenticated, Application Default Cred
|
|
|
95
95
|
### `serve` — Local dev server for project screens
|
|
96
96
|
|
|
97
97
|
```bash
|
|
98
|
-
npx
|
|
98
|
+
npx google-stitch-mcp serve -p <project-id>
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
| Option | Description |
|
|
@@ -107,7 +107,7 @@ Fetches all screens from a Stitch project and serves them on a local Vite dev se
|
|
|
107
107
|
### `screens` — Explore screens in a project
|
|
108
108
|
|
|
109
109
|
```bash
|
|
110
|
-
npx
|
|
110
|
+
npx google-stitch-mcp screens -p <project-id>
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
| Option | Description |
|
|
@@ -119,7 +119,7 @@ Opens an interactive terminal UI for browsing all screens in a project.
|
|
|
119
119
|
### `site` — Build an Astro site from screens
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
|
-
npx
|
|
122
|
+
npx google-stitch-mcp site -p <project-id> [options]
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
| Option | Description |
|
|
@@ -147,7 +147,7 @@ Press `e` in the interactive builder to export the current screen-to-route confi
|
|
|
147
147
|
### `view` — Interactive resource browser
|
|
148
148
|
|
|
149
149
|
```bash
|
|
150
|
-
npx
|
|
150
|
+
npx google-stitch-mcp view [options]
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
| Option | Description |
|
|
@@ -176,16 +176,16 @@ Browse Stitch resources in a navigable JSON tree. Supports drilling into nested
|
|
|
176
176
|
|
|
177
177
|
```bash
|
|
178
178
|
# Browse all projects
|
|
179
|
-
npx
|
|
179
|
+
npx google-stitch-mcp view --projects
|
|
180
180
|
|
|
181
181
|
# View a specific screen
|
|
182
|
-
npx
|
|
182
|
+
npx google-stitch-mcp view --project <project-id> --screen <screen-id>
|
|
183
183
|
```
|
|
184
184
|
|
|
185
185
|
### `tool` — Invoke MCP tools directly
|
|
186
186
|
|
|
187
187
|
```bash
|
|
188
|
-
npx
|
|
188
|
+
npx google-stitch-mcp tool [toolName] [options]
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
| Option | Description |
|
|
@@ -222,7 +222,7 @@ These tools are not part of the upstream Stitch MCP server. They are added by th
|
|
|
222
222
|
Example:
|
|
223
223
|
|
|
224
224
|
```bash
|
|
225
|
-
npx
|
|
225
|
+
npx google-stitch-mcp tool build_site -d '{
|
|
226
226
|
"projectId": "123456",
|
|
227
227
|
"routes": [
|
|
228
228
|
{ "screenId": "abc", "route": "/" },
|
|
@@ -234,7 +234,7 @@ npx @_davideast/stitch-mcp tool build_site -d '{
|
|
|
234
234
|
### `proxy` — MCP proxy server
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
npx
|
|
237
|
+
npx google-stitch-mcp proxy [options]
|
|
238
238
|
```
|
|
239
239
|
|
|
240
240
|
| Option | Description |
|
|
@@ -252,7 +252,7 @@ Proxies requests between your MCP client and the Stitch MCP server. Handles auto
|
|
|
252
252
|
"mcpServers": {
|
|
253
253
|
"stitch": {
|
|
254
254
|
"command": "npx",
|
|
255
|
-
"args": ["
|
|
255
|
+
"args": ["google-stitch-mcp", "proxy"]
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
}
|
|
@@ -265,7 +265,7 @@ Proxies requests between your MCP client and the Stitch MCP server. Handles auto
|
|
|
265
265
|
"mcpServers": {
|
|
266
266
|
"stitch": {
|
|
267
267
|
"command": "npx",
|
|
268
|
-
"args": ["
|
|
268
|
+
"args": ["google-stitch-mcp", "proxy", "--transport", "sse", "--port", "3100"]
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
}
|
|
@@ -274,7 +274,7 @@ Proxies requests between your MCP client and the Stitch MCP server. Handles auto
|
|
|
274
274
|
### `logout` — Revoke credentials
|
|
275
275
|
|
|
276
276
|
```bash
|
|
277
|
-
npx
|
|
277
|
+
npx google-stitch-mcp logout [options]
|
|
278
278
|
```
|
|
279
279
|
|
|
280
280
|
| Option | Description |
|
|
@@ -287,7 +287,7 @@ Revokes both user authentication and Application Default Credentials.
|
|
|
287
287
|
### `snapshot` — Create UI snapshots
|
|
288
288
|
|
|
289
289
|
```bash
|
|
290
|
-
npx
|
|
290
|
+
npx google-stitch-mcp snapshot [options]
|
|
291
291
|
```
|
|
292
292
|
|
|
293
293
|
| Option | Description |
|
|
@@ -303,7 +303,7 @@ Creates UI snapshots of CLI commands given a data state. Useful for testing and
|
|
|
303
303
|
**Automatic (recommended):** Run `init` and follow the wizard. It handles gcloud installation, OAuth, credentials, and project setup.
|
|
304
304
|
|
|
305
305
|
```bash
|
|
306
|
-
npx
|
|
306
|
+
npx google-stitch-mcp init
|
|
307
307
|
```
|
|
308
308
|
|
|
309
309
|
**API key:** Set the `STITCH_API_KEY` environment variable to skip OAuth entirely.
|
|
@@ -327,7 +327,7 @@ Then use the proxy with `STITCH_USE_SYSTEM_GCLOUD=1`:
|
|
|
327
327
|
"mcpServers": {
|
|
328
328
|
"stitch": {
|
|
329
329
|
"command": "npx",
|
|
330
|
-
"args": ["
|
|
330
|
+
"args": ["google-stitch-mcp", "proxy"],
|
|
331
331
|
"env": {
|
|
332
332
|
"STITCH_USE_SYSTEM_GCLOUD": "1"
|
|
333
333
|
}
|
|
@@ -358,7 +358,7 @@ Ensure:
|
|
|
358
358
|
|
|
359
359
|
Run `doctor` to diagnose:
|
|
360
360
|
```bash
|
|
361
|
-
npx
|
|
361
|
+
npx google-stitch-mcp doctor --verbose
|
|
362
362
|
```
|
|
363
363
|
|
|
364
364
|
### Authentication URL not appearing
|
|
@@ -374,14 +374,14 @@ The tool prints authentication URLs to the terminal with a 5-second timeout. If
|
|
|
374
374
|
The bundled gcloud SDK maintains separate authentication from your global gcloud installation. To fully clear authentication:
|
|
375
375
|
|
|
376
376
|
```bash
|
|
377
|
-
npx
|
|
377
|
+
npx google-stitch-mcp logout --force --clear-config
|
|
378
378
|
```
|
|
379
379
|
|
|
380
380
|
### API connection fails after setup
|
|
381
381
|
|
|
382
382
|
1. Run the doctor command:
|
|
383
383
|
```bash
|
|
384
|
-
npx
|
|
384
|
+
npx google-stitch-mcp doctor --verbose
|
|
385
385
|
```
|
|
386
386
|
|
|
387
387
|
2. Verify your project has billing enabled
|
|
@@ -393,8 +393,8 @@ npx @_davideast/stitch-mcp logout --force --clear-config
|
|
|
393
393
|
|
|
394
394
|
4. Try re-authenticating:
|
|
395
395
|
```bash
|
|
396
|
-
npx
|
|
397
|
-
npx
|
|
396
|
+
npx google-stitch-mcp logout --force
|
|
397
|
+
npx google-stitch-mcp init
|
|
398
398
|
```
|
|
399
399
|
|
|
400
400
|
### WSL / SSH / Docker environments
|
package/package.json
CHANGED