@_davideast/stitch-mcp 0.0.5 → 0.1.0

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.
Files changed (61) hide show
  1. package/README.md +58 -10
  2. package/dist/cli.js +66712 -12700
  3. package/dist/index.js +11863 -7783
  4. package/dist/services/gcloud/handler.d.ts +4 -0
  5. package/dist/services/mcp-client/client.d.ts +79 -0
  6. package/dist/services/mcp-client/spec.d.ts +27 -0
  7. package/dist/services/mcp-config/handler.d.ts +1 -0
  8. package/dist/services/mcp-config/spec.d.ts +28 -8
  9. package/dist/services/proxy/spec.d.ts +2 -2
  10. package/dist/services/view/handler.d.ts +7 -0
  11. package/dist/services/view/spec.d.ts +66 -0
  12. package/dist/ui/InteractiveViewer.d.ts +17 -0
  13. package/dist/ui/JsonTree.d.ts +12 -0
  14. package/dist/ui/copy-behaviors/clipboard.d.ts +17 -0
  15. package/dist/ui/copy-behaviors/handlers.d.ts +16 -0
  16. package/dist/ui/copy-behaviors/index.d.ts +8 -0
  17. package/dist/ui/copy-behaviors/registry.d.ts +24 -0
  18. package/dist/ui/copy-behaviors/types.d.ts +26 -0
  19. package/dist/ui/navigation-behaviors/index.d.ts +34 -0
  20. package/dist/ui/wizard.d.ts +14 -2
  21. package/package.json +9 -2
  22. package/dist/services/config/handler.d.ts +0 -12
  23. package/dist/services/config/spec.d.ts +0 -82
  24. package/dist/src/cli.d.ts +0 -1
  25. package/dist/src/commands/doctor/handler.d.ts +0 -9
  26. package/dist/src/commands/doctor/handler.test.d.ts +0 -1
  27. package/dist/src/commands/doctor/spec.d.ts +0 -130
  28. package/dist/src/commands/doctor/spec.test.d.ts +0 -1
  29. package/dist/src/commands/init/handler.d.ts +0 -17
  30. package/dist/src/commands/init/handler.test.d.ts +0 -1
  31. package/dist/src/commands/init/spec.d.ts +0 -88
  32. package/dist/src/commands/init/spec.test.d.ts +0 -1
  33. package/dist/src/commands/proxy/handler.d.ts +0 -7
  34. package/dist/src/commands/proxy/handler.test.d.ts +0 -1
  35. package/dist/src/index.d.ts +0 -13
  36. package/dist/src/platform/detector.d.ts +0 -29
  37. package/dist/src/platform/paths.d.ts +0 -20
  38. package/dist/src/platform/shell.d.ts +0 -26
  39. package/dist/src/services/gcloud/handler.d.ts +0 -48
  40. package/dist/src/services/gcloud/handler.test.d.ts +0 -1
  41. package/dist/src/services/gcloud/spec.d.ts +0 -405
  42. package/dist/src/services/mcp-config/handler.d.ts +0 -12
  43. package/dist/src/services/mcp-config/handler.test.d.ts +0 -1
  44. package/dist/src/services/mcp-config/spec.d.ts +0 -88
  45. package/dist/src/services/mcp-config/spec.test.d.ts +0 -1
  46. package/dist/src/services/project/handler.d.ts +0 -11
  47. package/dist/src/services/project/handler.test.d.ts +0 -1
  48. package/dist/src/services/project/spec.d.ts +0 -86
  49. package/dist/src/services/project/spec.test.d.ts +0 -1
  50. package/dist/src/services/proxy/handler.d.ts +0 -15
  51. package/dist/src/services/proxy/handler.test.d.ts +0 -1
  52. package/dist/src/services/proxy/spec.d.ts +0 -83
  53. package/dist/src/services/proxy/spec.test.d.ts +0 -1
  54. package/dist/src/services/stitch/handler.d.ts +0 -15
  55. package/dist/src/services/stitch/handler.test.d.ts +0 -1
  56. package/dist/src/services/stitch/spec.d.ts +0 -262
  57. package/dist/src/services/stitch/spec.test.d.ts +0 -1
  58. package/dist/src/ui/spinner.d.ts +0 -11
  59. package/dist/src/ui/theme.d.ts +0 -18
  60. package/dist/src/ui/wizard.d.ts +0 -24
  61. package/dist/tests/mocks/shell.d.ts +0 -2
package/README.md CHANGED
@@ -1,15 +1,8 @@
1
1
  # Stitch MCP Helper CLI
2
2
 
3
- > Stitch MCP OAuth setup assistant - automates Google Cloud authentication for Stitch API
3
+ > A guided checklist and proxy server for the Stitch MCP
4
4
 
5
- ## One command to connect any MCP client to Stitch
6
-
7
- `npx @_davideast/stitch-mcp init` walks you through the complete Google Cloud authentication setup for Stitch API in a single interactive session. It guides you through installing `gcloud`, configuring authentication, managing IAM permissions, enabling APIs, and generating your client-specific MCP config.
8
-
9
- - **Zero Config Setup:** One `npx` command handles gcloud install, authentication, project setup, and MCP configuration
10
- - **Universal Client Support:** Works with Antigravity, Claude Code, Cursor, VSCode, or Gemini CLI
11
- - **Smart Defaults:** Automatically detects existing gcloud installations and reuses active projects
12
- - **Self-Healing:** Built-in `doctor` command diagnoses and reports setup issues
5
+ ![Example usage](/assets/splash.png)
13
6
 
14
7
  ## Quick Start
15
8
 
@@ -86,6 +79,46 @@ Setup Complete! ✔
86
79
 
87
80
  Copy this config into your MCP client settings and you're ready to use the Stitch MCP server.
88
81
 
82
+ ## Quick Start (Existing gcloud Users)
83
+
84
+ If you already have `gcloud` configured, skip `init` and use the proxy directly.
85
+
86
+ **Prerequisites:**
87
+ ```bash
88
+ # 1. Application Default Credentials
89
+ gcloud auth application-default login
90
+
91
+ # 2. Set project (if not already set)
92
+ gcloud config set project <PROJECT_ID>
93
+
94
+ # 3. Enable Stitch API (requires beta component)
95
+ gcloud components install beta
96
+ gcloud beta services mcp enable stitch.googleapis.com --project=<PROJECT_ID>
97
+ ```
98
+
99
+ **MCP Configuration:**
100
+ ```json
101
+ {
102
+ "mcpServers": {
103
+ "stitch": {
104
+ "command": "npx",
105
+ "args": ["@_davideast/stitch-mcp", "proxy"],
106
+ "env": {
107
+ "STITCH_USE_SYSTEM_GCLOUD": "1"
108
+ }
109
+ }
110
+ }
111
+ }
112
+ ```
113
+
114
+ **Environment Variables:**
115
+ | Variable | Description |
116
+ |----------|-------------|
117
+ | `STITCH_USE_SYSTEM_GCLOUD` | Use system gcloud config instead of isolated config |
118
+ | `STITCH_PROJECT_ID` | Override project ID |
119
+ | `GOOGLE_CLOUD_PROJECT` | Alternative project ID variable |
120
+ | `STITCH_HOST` | Custom Stitch API endpoint |
121
+
89
122
  ## Verify Your Setup
90
123
 
91
124
  ```bash
@@ -139,7 +172,7 @@ npx @_davideast/stitch-mcp init [options]
139
172
  **Options:**
140
173
  - `--local` - Install gcloud locally to project instead of user home
141
174
  - `-y, --yes` - Auto-approve verification prompts (skips "Check your current setup status?")
142
- - `-c, --client <client>` - Specify MCP client (antigravity, vscode, cursor, claude-code, gemini-cli)
175
+ - `-c, --client <client>` - Specify MCP client (antigravity, vscode, cursor, claude-code, gemini-cli, opencode)
143
176
  - `-t, --transport <type>` - Transport type (http or stdio)
144
177
 
145
178
  **What happens:**
@@ -184,6 +217,21 @@ Revokes both user authentication and Application Default Credentials. Useful for
184
217
  - Clearing authentication for testing
185
218
  - Resetting state when troubleshooting
186
219
 
220
+ #### `view` - View Stitch Resources
221
+
222
+ ```bash
223
+ npx @_davideast/stitch-mcp view [options]
224
+ ```
225
+
226
+ **Options:**
227
+ - `--projects` - List all projects
228
+ - `--name <name>` - Resource name to view
229
+ - `--sourceScreen <name>` - Source screen resource name
230
+ - `--project <id>` - Project ID
231
+ - `--screen <id>` - Screen ID
232
+
233
+ Interactively view Stitch resources such as projects and screens. Displays the resource data in a JSON tree format.
234
+
187
235
  #### `proxy` - MCP Proxy Server
188
236
 
189
237
  ```bash