sceneview-mcp 4.0.5 → 4.0.7

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 (3) hide show
  1. package/README.md +110 -95
  2. package/dist/index.js +1 -1
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -4,56 +4,28 @@
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/sceneview-mcp?color=6c35aa)](https://www.npmjs.com/package/sceneview-mcp)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/sceneview-mcp?color=blue)](https://www.npmjs.com/package/sceneview-mcp)
7
- [![Tests](https://img.shields.io/badge/tests-2360%20passing-brightgreen)](#quality)
7
+ [![Tests](https://img.shields.io/badge/tests-2918%20passing-brightgreen)](#quality)
8
8
  [![MCP](https://img.shields.io/badge/MCP-v1.12-blue)](https://modelcontextprotocol.io/)
9
9
  [![Registry](https://img.shields.io/badge/MCP%20Registry-listed-blueviolet)](https://registry.modelcontextprotocol.io)
10
10
  [![License](https://img.shields.io/badge/License-MIT-green)](./LICENSE)
11
11
  [![Node](https://img.shields.io/badge/Node-%3E%3D18-brightgreen)](https://nodejs.org/)
12
12
 
13
- The official [Model Context Protocol](https://modelcontextprotocol.io/) server for **[SceneView](https://sceneview.github.io)** -- the cross-platform 3D & AR SDK for Android (Jetpack Compose + Filament), iOS/macOS/visionOS (SwiftUI + RealityKit), and Web (Filament.js + WebXR).
13
+ The official [Model Context Protocol](https://modelcontextprotocol.io/) server for **[SceneView](https://sceneview.github.io)** the cross-platform 3D & AR SDK for Android (Jetpack Compose + Filament), iOS / macOS / visionOS (SwiftUI + RealityKit), and Web (Filament.js + WebXR).
14
14
 
15
- Connect it to Claude, Cursor, Windsurf, or any MCP client. The assistant gets 26 specialized tools, 33 compilable code samples, a full API reference, and a code validator -- so it writes correct, working 3D/AR code on the first try.
15
+ Connect it to Claude, Cursor, Windsurf, or any MCP client. Your AI assistant gets specialized tools, compilable code samples, the full API reference, and a code validator so it writes correct, working 3D/AR code on the first try.
16
16
 
17
17
  > **Disclaimer:** Generated code is provided "as is" without warranty. Always review before production use. See [TERMS.md](./TERMS.md) and [PRIVACY.md](./PRIVACY.md).
18
18
 
19
19
  ---
20
20
 
21
- ## 🚀 Hosted-first mode (v4 beta)
21
+ ## Quick start
22
22
 
23
- Starting with **v4.0.0-beta.1**, `sceneview-mcp` is a **lite stdio package**: free tools run locally (no network round-trip) and Pro tools are transparently forwarded to the hosted gateway at **https://sceneview-mcp.mcp-tools-lab.workers.dev/mcp**.
24
-
25
- | What | Where |
26
- |---|---|
27
- | 17 free tools (samples, guides, validator, search, analyze) | Local, zero network |
28
- | 36+ Pro tools (AR, multi-platform, scene gen, artifacts, packages) | Forwarded to the gateway — Bearer auth + Stripe-metered |
29
- | Auth, metering, Stripe webhooks, API-key provisioning | Gateway (Cloudflare Workers + D1 + KV) |
30
-
31
- **Pricing** (subscribe at https://sceneview-mcp.mcp-tools-lab.workers.dev/pricing):
32
-
33
- | Plan | Price | Use case |
34
- |---|---|---|
35
- | Free | 0 € | Samples, guides, validator — no signup |
36
- | Pro | 19 €/mo or 190 €/yr | Individual devs, full Pro tool access |
37
- | Team | 49 €/mo or 490 €/yr | Teams with higher rate limits |
38
-
39
- After subscribing, you'll receive a `sv_live_…` API key. Set it via the `SCENEVIEW_API_KEY` env var in your MCP client config (see snippets below) to unlock Pro tools.
40
-
41
- ⭐ [Sponsor on GitHub](https://github.com/sponsors/sceneview) — help keep the free tier free.
42
-
43
- ---
44
-
45
- ## Quick start (free tier)
46
-
47
- **One command -- no install required:**
23
+ **One command no install required:**
48
24
 
49
25
  ```bash
50
26
  npx sceneview-mcp
51
27
  ```
52
28
 
53
- On startup you'll see a `[sceneview-mcp] v4.0.1 — LITE (free tools only)` banner on stderr. Set `SCENEVIEW_API_KEY` to flip into `HOSTED` mode.
54
-
55
- > **Anonymous telemetry** is enabled on the free tier (MCP client name/version and tool names — no personal data, no prompt content). Opt out with `SCENEVIEW_TELEMETRY=0`. See [PRIVACY.md](./PRIVACY.md#telemetry-free-tier) for the full payload shape.
56
-
57
29
  ### Claude Desktop
58
30
 
59
31
  Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
@@ -100,36 +72,59 @@ Same JSON config as above. The server communicates via **stdio** using the stand
100
72
 
101
73
  ## What you get
102
74
 
103
- ### 26 tools
75
+ Every developer tool is **free**: setup guides for every platform, code samples, the API reference, the migration tooling, the validator, model search, and the project analyzer.
76
+
77
+ ### Free tools
78
+
79
+ #### Setup & integration
80
+
81
+ | Tool | What it does |
82
+ |---|---|
83
+ | `get_setup` | Gradle + manifest setup for Android 3D or AR |
84
+ | `get_ios_setup` | SPM dependency, Info.plist, SwiftUI for iOS / macOS / visionOS |
85
+ | `get_web_setup` | Kotlin/JS + Filament.js (WASM) for browser-based 3D |
86
+ | `get_ar_setup` | Permissions, session options, plane detection, image tracking |
87
+ | `get_platform_setup` | Unified setup guide for any platform (Android, iOS, Web, Flutter, RN, Desktop, TV) |
88
+
89
+ #### Code generation & migration
104
90
 
105
91
  | Tool | What it does |
106
92
  |---|---|
107
93
  | `get_sample` | Returns a complete, compilable code sample for any of 33 scenarios (Kotlin or Swift) |
108
94
  | `list_samples` | Browse all samples, filter by tag (`ar`, `3d`, `ios`, `animation`, `geometry`, ...) |
109
95
  | `validate_code` | Checks generated code against 15+ rules before presenting it to the user |
110
- | `get_node_reference` | Full API reference for any of 35+ node types -- exact signatures, defaults, examples |
111
- | `list_platforms` | List all supported platforms with their status, renderer, and framework |
112
- | `get_setup` | Gradle + manifest setup for Android 3D or AR projects |
113
- | `get_ios_setup` | SPM dependency, Info.plist, and SwiftUI integration for iOS/macOS/visionOS |
114
- | `get_web_setup` | Kotlin/JS + Filament.js (WASM) setup for browser-based 3D |
115
- | `get_ar_setup` | Detailed AR config: permissions, session options, plane detection, image tracking |
116
- | `get_best_practices` | Performance, architecture, memory, and threading guidance |
117
- | `get_migration_guide` | Every breaking change from SceneView 2.x to 3.0 with before/after code |
118
- | `get_troubleshooting` | Common crashes, build failures, AR issues, and their fixes |
119
- | `get_platform_roadmap` | Multi-platform status and timeline (Android, iOS, KMP, Web, Desktop) |
120
- | `render_3d_preview` | Generates an interactive 3D preview link the user can open in their browser |
121
- | `create_3d_artifact` | Generates self-contained HTML artifacts (model viewer, 3D charts, product 360) |
122
- | `get_platform_setup` | Unified setup guide for any platform (Android, iOS, Web, Flutter, React Native, Desktop, TV) |
123
- | `migrate_code` | Automatically migrates SceneView 2.x code to 3.x with detailed changelog |
124
- | `debug_issue` | Targeted debugging guide by category or auto-detected from problem description |
125
- | `generate_scene` | Generates a complete composable from natural language (e.g., "a room with a table and two chairs") |
126
- | `get_animation_guide` | Guide for model animations, Spring physics, Compose property animations, SmoothTransform |
127
- | `get_gesture_guide` | Guide for gestures: isEditable, onTouchEvent, tap-to-place, drag-to-rotate, pinch-to-scale |
128
- | `get_performance_tips` | Performance optimization: LOD, texture compression, instancing, profiling with Systrace/AGI |
129
- | `search_models` | Searches Sketchfab for free 3D models matching a query (BYOK — set `SKETCHFAB_API_KEY`) |
130
- | `analyze_project` | Scans a local SceneView project on disk — detects platform, extracts version, flags outdated deps and known anti-patterns (threading, LightNode bug, 2.x APIs) |
131
-
132
- #### `search_models` — find real 3D assets from the AI
96
+ | `migrate_code` | Automatically migrates SceneView 2.x / 3.x code with detailed changelog |
97
+ | `get_migration_guide` | Every breaking change with before/after code |
98
+
99
+ #### API reference
100
+
101
+ | Tool | What it does |
102
+ |---|---|
103
+ | `get_node_reference` | Full API reference for any of 35+ node types exact signatures, defaults, examples |
104
+ | `list_platforms` | Supported platforms with their status, renderer, and framework |
105
+ | `get_platform_roadmap` | Multi-platform status and timeline |
106
+
107
+ #### Guides
108
+
109
+ `get_best_practices` · `get_animation_guide` · `get_gesture_guide` · `get_performance_tips` · `get_material_guide` · `get_collision_guide` · `get_model_optimization_guide` · `get_web_rendering_guide` · `get_troubleshooting` · `debug_issue`
110
+
111
+ #### Discovery & analysis
112
+
113
+ | Tool | What it does |
114
+ |---|---|
115
+ | `search_models` | Searches Sketchfab for free 3D models (BYOK — set `SKETCHFAB_API_KEY`) |
116
+ | `analyze_project` | Scans a local SceneView project on disk — detects platform, extracts version, flags outdated deps and known anti-patterns |
117
+
118
+ ### 2 resources
119
+
120
+ | Resource URI | What it provides |
121
+ |---|---|
122
+ | `sceneview://api` | Complete SceneView 4.0.x API reference (the full `llms.txt`) |
123
+ | `sceneview://known-issues` | Live open issues from GitHub (cached 10 min) |
124
+
125
+ ---
126
+
127
+ ## `search_models` — find real 3D assets from the AI
133
128
 
134
129
  Generated SceneView code is only useful if it points at an asset that actually exists. `search_models` queries Sketchfab's public search API and returns a shortlist with names, authors, licenses, thumbnails, triangle counts, and viewer/embed URLs that the assistant can drop straight into `rememberModelInstance(modelLoader, ...)` or embed as a live preview.
135
130
 
@@ -153,7 +148,7 @@ Generated SceneView code is only useful if it points at an asset that actually e
153
148
 
154
149
  Call it like `search_models({ query: "red sports car", category: "cars-vehicles", maxResults: 6 })`. If the key is missing, the tool returns a clear message explaining how to get one instead of failing silently.
155
150
 
156
- #### `analyze_project` — local project scan
151
+ ## `analyze_project` — local project scan
157
152
 
158
153
  Because the MCP server runs on the user's machine, `analyze_project` can read their project files directly. Given a `path` (default: `process.cwd()`), it:
159
154
 
@@ -164,13 +159,6 @@ Because the MCP server runs on the user's machine, `analyze_project` can read th
164
159
 
165
160
  The tool is read-only, never writes to disk, and gracefully handles missing directories. Use it when the user asks "is my project up to date?" or as a quick sanity check before generating new code for an existing codebase.
166
161
 
167
- ### 2 resources
168
-
169
- | Resource URI | What it provides |
170
- |---|---|
171
- | `sceneview://api` | Complete SceneView 4.0.0 API reference (the full `llms.txt`) |
172
- | `sceneview://known-issues` | Live open issues from GitHub (cached 10 min) |
173
-
174
162
  ---
175
163
 
176
164
  ## Examples
@@ -185,16 +173,12 @@ The assistant calls `get_ios_setup("3d")` + `get_sample("ios-model-viewer")` and
185
173
 
186
174
  ### "What parameters does LightNode accept?"
187
175
 
188
- The assistant calls `get_node_reference("LightNode")` and returns the exact function signature, parameter types, defaults, and a usage example -- including the critical detail that `apply` is a named parameter, not a trailing lambda.
176
+ The assistant calls `get_node_reference("LightNode")` and returns the exact function signature, parameter types, defaults, and a usage example including the critical detail that `apply` is a named parameter, not a trailing lambda.
189
177
 
190
178
  ### "Validate this code before I use it"
191
179
 
192
180
  The assistant calls `validate_code` with the generated snippet and checks it against 15+ rules: threading violations, null safety, API correctness, lifecycle issues, deprecated APIs. Problems are flagged with explanations before the code reaches the user.
193
181
 
194
- ### "Show me the model in 3D"
195
-
196
- The assistant calls `render_3d_preview` and returns an interactive link to a browser-based 3D viewer with orbit controls and optional AR mode.
197
-
198
182
  ---
199
183
 
200
184
  ## Why this exists
@@ -208,7 +192,7 @@ The assistant calls `render_3d_preview` and returns an interactive link to a bro
208
192
  - Have no knowledge of SceneView's iOS/Swift API at all
209
193
 
210
194
  **With** this MCP server, AI assistants:
211
- - Always use the current SceneView 4.0.0 API surface
195
+ - Always use the current SceneView 4.0.x API surface
212
196
  - Generate correct **Compose-native** 3D/AR code for Android
213
197
  - Generate correct **SwiftUI-native** code for iOS/macOS/visionOS
214
198
  - Know about all 35+ node types and their exact parameters
@@ -219,21 +203,20 @@ The assistant calls `render_3d_preview` and returns an interactive link to a bro
219
203
 
220
204
  ## Quality
221
205
 
222
- The MCP server is tested with **2360 unit tests** across 98 test suites covering:
206
+ The MCP server is tested with **2,918 unit tests** across 132 test suites covering:
223
207
 
224
208
  - Every tool response (correct output, error handling, edge cases)
225
209
  - All 33 code samples (compilable structure, correct imports, no deprecated APIs)
226
210
  - Code validator rules (true positives and false-positive resistance)
227
- - Node reference parsing (all 26+ types extracted correctly from `llms.txt`)
211
+ - Node reference parsing (all node types extracted correctly from `llms.txt`)
228
212
  - Resource responses (API reference, GitHub issues integration)
229
213
 
230
214
  ```
231
- Test Files 22 passed (22)
232
- Tests 2360 passed (2360)
233
- Duration 624ms
215
+ Test Files 132 passed (132)
216
+ Tests 2918 passed (2918)
234
217
  ```
235
218
 
236
- All tools work **fully offline** except `sceneview://known-issues` (GitHub API, cached 10 min).
219
+ All tools work **fully offline** except `sceneview://known-issues` (GitHub API, cached 10 min) and `search_models` (Sketchfab, BYOK).
237
220
 
238
221
  ---
239
222
 
@@ -242,7 +225,7 @@ All tools work **fully offline** except `sceneview://known-issues` (GitHub API,
242
225
  ### "MCP server not found" or connection errors
243
226
 
244
227
  1. Ensure Node.js 18+ is installed: `node --version`
245
- 2. Test manually: `npx sceneview-mcp` -- should start without errors
228
+ 2. Test manually: `npx sceneview-mcp` should start without errors
246
229
  3. Restart your AI client after changing the MCP configuration
247
230
 
248
231
  ### "npx command not found"
@@ -251,13 +234,13 @@ Install Node.js from [nodejs.org](https://nodejs.org/) (LTS recommended). npm an
251
234
 
252
235
  ### Server starts but tools are not available
253
236
 
254
- - **Claude Desktop:** check the MCP icon in the input bar -- it should show "sceneview" as connected
237
+ - **Claude Desktop:** check the MCP icon in the input bar it should show "sceneview" as connected
255
238
  - **Cursor:** check **Settings > MCP** for green status
256
239
  - Restart the AI client to force a reconnect
257
240
 
258
241
  ### Firewall or proxy issues
259
242
 
260
- The only network call is to the GitHub API (for known issues). All other tools work offline. For corporate proxies:
243
+ The only network calls are to the GitHub API (for known issues) and Sketchfab (when `SKETCHFAB_API_KEY` is set). Everything else works offline.
261
244
 
262
245
  ```json
263
246
  {
@@ -275,13 +258,40 @@ The only network call is to the GitHub API (for known issues). All other tools w
275
258
 
276
259
  ---
277
260
 
261
+ ## Optional: vertical packages
262
+
263
+ A small set of domain-specific tools is gated behind an optional subscription. They aren't required for general 3D/AR work — only useful if you happen to be building one of these specific verticals:
264
+
265
+ - **Automotive** — car configurator, paint shader, parts catalog, HUD overlay, AR showroom
266
+ - **Gaming** — physics, particles, level editor, character viewer, inventory 3D
267
+ - **Healthcare** — surgical planning, dental viewer, medical imaging, anatomy, molecule viewer
268
+ - **Interior** — room planner, lighting design, material switcher, furniture placement, room tour
269
+
270
+ Plus 3 generation helpers: `render_3d_preview`, `create_3d_artifact`, `generate_scene`.
271
+
272
+ If you need any of these, see the [pricing page](https://sceneview-mcp.mcp-tools-lab.workers.dev/pricing). The base SDK and every developer tool listed above stay free, always.
273
+
274
+ ---
275
+
276
+ ## Sponsor
277
+
278
+ If sceneview-mcp saves you time, consider [sponsoring on GitHub Sponsors](https://github.com/sponsors/sceneview). Building this is a one-dev labor of love and donations keep the free tier covered.
279
+
280
+ ---
281
+
282
+ ## Anonymous telemetry
283
+
284
+ Enabled by default on the free tier (MCP client name/version and tool names — no personal data, no prompt content). Opt out with `SCENEVIEW_TELEMETRY=0`. See [PRIVACY.md](./PRIVACY.md#telemetry-free-tier) for the full payload shape.
285
+
286
+ ---
287
+
278
288
  ## Development
279
289
 
280
290
  ```bash
281
291
  cd mcp
282
292
  npm install
283
293
  npm run prepare # Copy llms.txt + build TypeScript
284
- npm test # 2360 tests
294
+ npm test # 2918 tests
285
295
  npm run dev # Start with tsx (hot reload)
286
296
  ```
287
297
 
@@ -290,16 +300,21 @@ npm run dev # Start with tsx (hot reload)
290
300
  ```
291
301
  mcp/
292
302
  src/
293
- index.ts # MCP server entry point (26 tools, 2 resources)
294
- samples.ts # 33 compilable code samples (Kotlin + Swift)
295
- validator.ts # Code validator (15+ rules, Kotlin + Swift)
296
- node-reference.ts # Node type parser (extracts from llms.txt)
297
- guides.ts # Best practices, AR setup, roadmap, troubleshooting
298
- migration.ts # v2 -> v3 migration guide
299
- preview.ts # 3D preview URL generator
300
- artifact.ts # HTML artifact generator (model-viewer, charts, product 360)
301
- issues.ts # GitHub issues fetcher (cached)
302
- llms.txt # Bundled API reference (copied from repo root)
303
+ index.ts # MCP server entry point
304
+ tools/handler.ts # Tool dispatcher (free + pro)
305
+ tiers.ts # Free vs Pro tier mapping
306
+ samples.ts # 33 compilable code samples (Kotlin + Swift)
307
+ validator.ts # Code validator (15+ rules)
308
+ node-reference.ts # Node type parser
309
+ guides.ts # Best practices, AR setup, roadmap, troubleshooting
310
+ migration.ts # v2 -> v3 -> v4 migration guide
311
+ preview.ts # 3D preview URL generator
312
+ artifact.ts # HTML artifact generator (model-viewer, charts, product 360)
313
+ issues.ts # GitHub issues fetcher (cached)
314
+ search-models.ts # Sketchfab BYOK search
315
+ analyze-project.ts # Local project scanner
316
+ proxy.ts # Pro-tool proxy to hosted gateway
317
+ llms.txt # Bundled API reference (copied from repo root)
303
318
  ```
304
319
 
305
320
  ## Contributing
@@ -307,13 +322,13 @@ mcp/
307
322
  1. Fork the repository
308
323
  2. Create a feature branch
309
324
  3. Add tests for new tools or rules
310
- 4. Run `npm test` -- all 2360+ tests must pass
325
+ 4. Run `npm test` all 2918+ tests must pass
311
326
  5. Submit a pull request
312
327
 
313
328
  See [CONTRIBUTING.md](../CONTRIBUTING.md) for the full guide.
314
329
 
315
330
  ## Legal
316
331
 
317
- - [LICENSE](./LICENSE) -- MIT License
318
- - [TERMS.md](./TERMS.md) -- Terms of Service
319
- - [PRIVACY.md](./PRIVACY.md) -- Privacy Policy (no data collected)
332
+ - [LICENSE](./LICENSE) MIT License
333
+ - [TERMS.md](./TERMS.md) Terms of Service
334
+ - [PRIVACY.md](./PRIVACY.md) Privacy Policy
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ function logStartupBanner() {
37
37
  `[sceneview-mcp] v${PACKAGE_VERSION} — ${mode}`,
38
38
  proxied
39
39
  ? `[sceneview-mcp] Pro tool calls will be forwarded to the hosted gateway.`
40
- : `[sceneview-mcp] Set SCENEVIEW_API_KEY to unlock 36+ Pro tools ${DEFAULT_PRICING_URL}`,
40
+ : `[sceneview-mcp] All setup, migration & docs tools are free. Pro packages (Automotive/Gaming/Healthcare/Interior) at ${DEFAULT_PRICING_URL}`,
41
41
  ];
42
42
  for (const line of lines)
43
43
  process.stderr.write(`${line}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sceneview-mcp",
3
- "version": "4.0.5",
3
+ "version": "4.0.7",
4
4
  "mcpName": "io.github.sceneview/mcp",
5
5
  "description": "MCP server for SceneView — cross-platform 3D & AR SDK for Android and iOS. Give Claude the full SceneView SDK so it writes correct, compilable code.",
6
6
  "keywords": [
@@ -44,7 +44,8 @@
44
44
  "dist/**/*.js",
45
45
  "!dist/**/*.test.js",
46
46
  "!dist/**/__fixtures__/**",
47
- "llms.txt"
47
+ "llms.txt",
48
+ "README.md"
48
49
  ],
49
50
  "engines": {
50
51
  "node": ">=18"