sceneview-mcp 3.4.13 → 3.4.14
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 +6 -2
- package/dist/generate-scene.js +35 -1
- package/dist/index.js +47 -3
- package/llms.txt +46 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ Same JSON config as above. The server communicates via **stdio** using the stand
|
|
|
72
72
|
|
|
73
73
|
## What you get
|
|
74
74
|
|
|
75
|
-
###
|
|
75
|
+
### 18 tools
|
|
76
76
|
|
|
77
77
|
| Tool | What it does |
|
|
78
78
|
|---|---|
|
|
@@ -91,6 +91,10 @@ Same JSON config as above. The server communicates via **stdio** using the stand
|
|
|
91
91
|
| `get_platform_roadmap` | Multi-platform status and timeline (Android, iOS, KMP, Web, Desktop) |
|
|
92
92
|
| `render_3d_preview` | Generates an interactive 3D preview link the user can open in their browser |
|
|
93
93
|
| `create_3d_artifact` | Generates self-contained HTML artifacts (model viewer, 3D charts, product 360) |
|
|
94
|
+
| `get_platform_setup` | Unified setup guide for any platform (Android, iOS, Web, Flutter, React Native, Desktop, TV) |
|
|
95
|
+
| `migrate_code` | Automatically migrates SceneView 2.x code to 3.x with detailed changelog |
|
|
96
|
+
| `debug_issue` | Targeted debugging guide by category or auto-detected from problem description |
|
|
97
|
+
| `generate_scene` | Generates a complete composable from natural language (e.g., "a room with a table and two chairs") |
|
|
94
98
|
|
|
95
99
|
### 2 resources
|
|
96
100
|
|
|
@@ -218,7 +222,7 @@ npm run dev # Start with tsx (hot reload)
|
|
|
218
222
|
```
|
|
219
223
|
mcp/
|
|
220
224
|
src/
|
|
221
|
-
index.ts # MCP server entry point (
|
|
225
|
+
index.ts # MCP server entry point (18 tools, 2 resources)
|
|
222
226
|
samples.ts # 33 compilable code samples (Kotlin + Swift)
|
|
223
227
|
validator.ts # Code validator (15+ rules, Kotlin + Swift)
|
|
224
228
|
node-reference.ts # Node type parser (extracts from llms.txt)
|
package/dist/generate-scene.js
CHANGED
|
@@ -23,7 +23,41 @@ const OBJECT_MAPPINGS = [
|
|
|
23
23
|
{ keywords: ["car", "vehicle"], nodeType: "ModelNode", defaultScale: 2.0, defaultPosition: [0, 0, 0], comment: "Car (use GLB model)" },
|
|
24
24
|
{ keywords: ["house", "building"], nodeType: "ModelNode", defaultScale: 5.0, defaultPosition: [0, 0, -5], comment: "Building (use GLB model)" },
|
|
25
25
|
// People / characters
|
|
26
|
-
{ keywords: ["person", "character", "human", "avatar"
|
|
26
|
+
{ keywords: ["person", "character", "human", "avatar"], nodeType: "ModelNode", defaultScale: 1.7, defaultPosition: [0, 0, 0], comment: "Character (use GLB model)" },
|
|
27
|
+
{ keywords: ["robot", "android"], nodeType: "ModelNode", defaultScale: 1.5, defaultPosition: [0, 0, 0], comment: "Robot (use GLB model)" },
|
|
28
|
+
// Animals
|
|
29
|
+
{ keywords: ["dog", "puppy"], nodeType: "ModelNode", defaultScale: 0.6, defaultPosition: [1, 0, 0], comment: "Dog (use GLB model)" },
|
|
30
|
+
{ keywords: ["cat", "kitten"], nodeType: "ModelNode", defaultScale: 0.4, defaultPosition: [-1, 0, 0], comment: "Cat (use GLB model)" },
|
|
31
|
+
{ keywords: ["bird"], nodeType: "ModelNode", defaultScale: 0.2, defaultPosition: [0, 2, 0], comment: "Bird (use GLB model)" },
|
|
32
|
+
{ keywords: ["horse"], nodeType: "ModelNode", defaultScale: 2.5, defaultPosition: [0, 0, 2], comment: "Horse (use GLB model)" },
|
|
33
|
+
{ keywords: ["fish"], nodeType: "ModelNode", defaultScale: 0.3, defaultPosition: [0, 0.5, 0], comment: "Fish (use GLB model)" },
|
|
34
|
+
{ keywords: ["dinosaur", "dino", "t-rex"], nodeType: "ModelNode", defaultScale: 5.0, defaultPosition: [0, 0, -3], comment: "Dinosaur (use GLB model)" },
|
|
35
|
+
{ keywords: ["dragon"], nodeType: "ModelNode", defaultScale: 4.0, defaultPosition: [0, 2, -3], comment: "Dragon (use GLB model)" },
|
|
36
|
+
// More vehicles
|
|
37
|
+
{ keywords: ["airplane", "plane", "jet"], nodeType: "ModelNode", defaultScale: 5.0, defaultPosition: [0, 5, 0], comment: "Airplane (use GLB model)" },
|
|
38
|
+
{ keywords: ["boat", "ship"], nodeType: "ModelNode", defaultScale: 4.0, defaultPosition: [0, 0, -3], comment: "Boat (use GLB model)" },
|
|
39
|
+
{ keywords: ["bicycle", "bike"], nodeType: "ModelNode", defaultScale: 1.2, defaultPosition: [2, 0, 0], comment: "Bicycle (use GLB model)" },
|
|
40
|
+
{ keywords: ["motorcycle", "motorbike"], nodeType: "ModelNode", defaultScale: 1.5, defaultPosition: [2, 0, 0], comment: "Motorcycle (use GLB model)" },
|
|
41
|
+
{ keywords: ["truck"], nodeType: "ModelNode", defaultScale: 3.0, defaultPosition: [0, 0, -2], comment: "Truck (use GLB model)" },
|
|
42
|
+
// More environment
|
|
43
|
+
{ keywords: ["flower", "rose"], nodeType: "ModelNode", defaultScale: 0.3, defaultPosition: [1, 0, 1], comment: "Flower (use GLB model)" },
|
|
44
|
+
{ keywords: ["rock", "stone", "boulder"], nodeType: "SphereNode", geometryType: "sphere", defaultScale: 0.8, defaultPosition: [1, 0.4, 1], comment: "Rock" },
|
|
45
|
+
{ keywords: ["mountain", "hill"], nodeType: "ModelNode", defaultScale: 10.0, defaultPosition: [0, 0, -10], comment: "Mountain (use GLB model)" },
|
|
46
|
+
{ keywords: ["fence"], nodeType: "CubeNode", geometryType: "cube", defaultScale: 2.0, defaultPosition: [3, 0.5, 0], comment: "Fence" },
|
|
47
|
+
{ keywords: ["bridge"], nodeType: "ModelNode", defaultScale: 5.0, defaultPosition: [0, 0, 0], comment: "Bridge (use GLB model)" },
|
|
48
|
+
// More furniture / objects
|
|
49
|
+
{ keywords: ["lamp", "light fixture"], nodeType: "ModelNode", defaultScale: 0.5, defaultPosition: [1, 0.8, 0], comment: "Lamp (use GLB model)" },
|
|
50
|
+
{ keywords: ["tv", "television", "screen", "monitor"], nodeType: "CubeNode", geometryType: "cube", defaultScale: 1.2, defaultPosition: [0, 0.8, -2], comment: "TV/Screen (flat cube)" },
|
|
51
|
+
{ keywords: ["door", "gate"], nodeType: "CubeNode", geometryType: "cube", defaultScale: 2.0, defaultPosition: [0, 1, -3], comment: "Door" },
|
|
52
|
+
{ keywords: ["window"], nodeType: "CubeNode", geometryType: "cube", defaultScale: 1.0, defaultPosition: [2, 1.5, -3], comment: "Window" },
|
|
53
|
+
{ keywords: ["stairs", "staircase"], nodeType: "ModelNode", defaultScale: 2.0, defaultPosition: [3, 0, 0], comment: "Stairs (use GLB model)" },
|
|
54
|
+
{ keywords: ["book", "books"], nodeType: "CubeNode", geometryType: "cube", defaultScale: 0.2, defaultPosition: [0, 0.5, 0], comment: "Book" },
|
|
55
|
+
{ keywords: ["bottle", "vase"], nodeType: "CylinderNode", geometryType: "cylinder", defaultScale: 0.2, defaultPosition: [0, 0.3, 0], comment: "Bottle/Vase" },
|
|
56
|
+
{ keywords: ["trophy", "cup"], nodeType: "ModelNode", defaultScale: 0.3, defaultPosition: [0, 0.5, 0], comment: "Trophy (use GLB model)" },
|
|
57
|
+
// Food
|
|
58
|
+
{ keywords: ["pizza"], nodeType: "CylinderNode", geometryType: "cylinder", defaultScale: 0.3, defaultPosition: [0, 0.5, 0], comment: "Pizza (flat cylinder)" },
|
|
59
|
+
{ keywords: ["cake"], nodeType: "CylinderNode", geometryType: "cylinder", defaultScale: 0.3, defaultPosition: [0, 0.5, 0], comment: "Cake (cylinder)" },
|
|
60
|
+
{ keywords: ["apple", "fruit"], nodeType: "SphereNode", geometryType: "sphere", defaultScale: 0.08, defaultPosition: [0, 0.5, 0], comment: "Apple/Fruit" },
|
|
27
61
|
];
|
|
28
62
|
const LIGHT_KEYWORDS = ["sun", "sunlight", "daylight", "bright", "lit", "sunny", "well-lit"];
|
|
29
63
|
const INDOOR_KEYWORDS = ["room", "indoor", "inside", "interior"];
|
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ catch {
|
|
|
37
37
|
API_DOCS = "SceneView API docs not found. Run `npm run prepare` to bundle llms.txt.";
|
|
38
38
|
}
|
|
39
39
|
const NODE_SECTIONS = parseNodeSections(API_DOCS);
|
|
40
|
-
const server = new Server({ name: "@sceneview/mcp", version: "3.4.
|
|
40
|
+
const server = new Server({ name: "@sceneview/mcp", version: "3.4.14" }, { capabilities: { resources: {}, tools: {} } });
|
|
41
41
|
// ─── Resources ───────────────────────────────────────────────────────────────
|
|
42
42
|
server.setRequestHandler(ListResourcesRequestSchema, async () => ({
|
|
43
43
|
resources: [
|
|
@@ -403,18 +403,27 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
403
403
|
},
|
|
404
404
|
{
|
|
405
405
|
name: "generate_scene",
|
|
406
|
-
description: 'Generates a complete, compilable Scene{} or ARScene{} Kotlin composable from a natural language description. Parses
|
|
406
|
+
description: 'Generates a complete, compilable Scene{} or ARScene{} Kotlin composable from a natural language description. Parses 40+ object types (furniture, vehicles, animals, food, buildings, nature), quantities ("two chairs", "3 spheres"), environment (indoor/outdoor/dark), and mode (3D or AR). Returns working Kotlin code with proper engine setup, model loading, lighting, and ground plane. Use this when a user says "build me a scene with..." or describes a 3D scene they want to create.',
|
|
407
407
|
inputSchema: {
|
|
408
408
|
type: "object",
|
|
409
409
|
properties: {
|
|
410
410
|
description: {
|
|
411
411
|
type: "string",
|
|
412
|
-
description: 'Natural language description of the desired 3D scene. Examples: "a room with a table and two chairs", "AR scene with a robot on the floor", "outdoor scene with three trees and a car", "dark room with a sphere and a cube".',
|
|
412
|
+
description: 'Natural language description of the desired 3D scene. Examples: "a room with a table and two chairs", "AR scene with a robot on the floor", "outdoor scene with three trees and a car", "dark room with a sphere and a cube", "a dog and a cat in a garden", "house with a fence and flowers".',
|
|
413
413
|
},
|
|
414
414
|
},
|
|
415
415
|
required: ["description"],
|
|
416
416
|
},
|
|
417
417
|
},
|
|
418
|
+
{
|
|
419
|
+
name: "list_platforms",
|
|
420
|
+
description: "Returns all platforms supported by SceneView with their renderer, framework, status, and version. Use this to answer questions about what platforms SceneView supports, or to show cross-platform capabilities.",
|
|
421
|
+
inputSchema: {
|
|
422
|
+
type: "object",
|
|
423
|
+
properties: {},
|
|
424
|
+
required: [],
|
|
425
|
+
},
|
|
426
|
+
},
|
|
418
427
|
],
|
|
419
428
|
}));
|
|
420
429
|
// ─── Tool handlers ────────────────────────────────────────────────────────────
|
|
@@ -1006,6 +1015,41 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1006
1015
|
const sceneReport = formatGeneratedScene(sceneResult);
|
|
1007
1016
|
return { content: withDisclaimer([{ type: "text", text: sceneReport }]) };
|
|
1008
1017
|
}
|
|
1018
|
+
// ── list_platforms ────────────────────────────────────────────────────────
|
|
1019
|
+
case "list_platforms": {
|
|
1020
|
+
const platforms = [
|
|
1021
|
+
{ platform: "Android", renderer: "Filament", framework: "Jetpack Compose", status: "Stable", version: "3.3.0", dependency: "io.github.sceneview:sceneview:3.3.0", features: ["3D", "AR (ARCore)", "Model loading (GLB/glTF)", "Geometry nodes", "Physics", "Gestures"] },
|
|
1022
|
+
{ platform: "Android TV", renderer: "Filament", framework: "Compose TV", status: "Alpha", version: "3.3.0", dependency: "io.github.sceneview:sceneview:3.3.0", features: ["3D", "D-pad controls", "Auto-rotation", "Model loading"] },
|
|
1023
|
+
{ platform: "Android XR", renderer: "Jetpack XR SceneCore", framework: "Compose XR", status: "Planned", version: "-", dependency: "-", features: ["Spatial computing", "Hand tracking", "Passthrough"] },
|
|
1024
|
+
{ platform: "iOS", renderer: "RealityKit", framework: "SwiftUI", status: "Alpha", version: "3.3.0", dependency: "SceneViewSwift (SPM)", features: ["3D", "AR (ARKit)", "16 node types", "USDZ models"] },
|
|
1025
|
+
{ platform: "macOS", renderer: "RealityKit", framework: "SwiftUI", status: "Alpha", version: "3.3.0", dependency: "SceneViewSwift (SPM)", features: ["3D", "Orbit camera", "USDZ models"] },
|
|
1026
|
+
{ platform: "visionOS", renderer: "RealityKit", framework: "SwiftUI", status: "Alpha", version: "3.3.0", dependency: "SceneViewSwift (SPM)", features: ["3D", "Immersive spaces", "Hand tracking (planned)"] },
|
|
1027
|
+
{ platform: "Web", renderer: "Filament.js (WASM)", framework: "Kotlin/JS", status: "Alpha", version: "3.3.0", dependency: "@sceneview/sceneview-web", features: ["3D", "WebXR AR/VR", "GLB models", "WebGL2"] },
|
|
1028
|
+
{ platform: "Desktop", renderer: "Software / Filament JNI", framework: "Compose Desktop", status: "Alpha", version: "3.3.0", dependency: "sceneview-desktop (local)", features: ["3D", "Software renderer", "Wireframe"] },
|
|
1029
|
+
{ platform: "Flutter", renderer: "Filament / RealityKit", framework: "PlatformView", status: "Alpha", version: "3.3.0", dependency: "flutter pub: sceneview", features: ["3D", "AR", "Android + iOS bridge"] },
|
|
1030
|
+
];
|
|
1031
|
+
const lines = [
|
|
1032
|
+
"## SceneView Supported Platforms\n",
|
|
1033
|
+
"| Platform | Renderer | Framework | Status | Version |",
|
|
1034
|
+
"|----------|----------|-----------|--------|---------|",
|
|
1035
|
+
...platforms.map(p => `| ${p.platform} | ${p.renderer} | ${p.framework} | ${p.status} | ${p.version} |`),
|
|
1036
|
+
"",
|
|
1037
|
+
"### Platform Details\n",
|
|
1038
|
+
...platforms.map(p => [
|
|
1039
|
+
`**${p.platform}** (${p.status})`,
|
|
1040
|
+
`- Renderer: ${p.renderer}`,
|
|
1041
|
+
`- Framework: ${p.framework}`,
|
|
1042
|
+
`- Dependency: \`${p.dependency}\``,
|
|
1043
|
+
`- Features: ${p.features.join(", ")}`,
|
|
1044
|
+
"",
|
|
1045
|
+
].join("\n")),
|
|
1046
|
+
"### Architecture",
|
|
1047
|
+
"",
|
|
1048
|
+
"SceneView uses **native renderers per platform**: Filament on Android/Web/Desktop, RealityKit on Apple (iOS/macOS/visionOS).",
|
|
1049
|
+
"KMP `sceneview-core` shares logic (math, collision, geometry, animations) across all platforms.",
|
|
1050
|
+
];
|
|
1051
|
+
return { content: withDisclaimer([{ type: "text", text: lines.join("\n") }]) };
|
|
1052
|
+
}
|
|
1009
1053
|
default:
|
|
1010
1054
|
return {
|
|
1011
1055
|
content: [{ type: "text", text: `Unknown tool: ${request.params.name}` }],
|
package/llms.txt
CHANGED
|
@@ -2357,6 +2357,52 @@ model.enableManipulation() // look + grab + drag + rotate + scale via system ge
|
|
|
2357
2357
|
|
|
2358
2358
|
---
|
|
2359
2359
|
|
|
2360
|
+
## MCP Server Tools
|
|
2361
|
+
|
|
2362
|
+
The `@sceneview/mcp` server (npm: `sceneview-mcp`) exposes 18 tools and 2 resources for AI assistants.
|
|
2363
|
+
|
|
2364
|
+
### Setup tools
|
|
2365
|
+
| Tool | Parameters | Description |
|
|
2366
|
+
|---|---|---|
|
|
2367
|
+
| `get_setup` | `type: "3d" \| "ar"` | Gradle + manifest setup for Android 3D or AR projects |
|
|
2368
|
+
| `get_ios_setup` | `type: "3d" \| "ar"` | SPM dependency, Info.plist, and SwiftUI integration for iOS/macOS/visionOS |
|
|
2369
|
+
| `get_web_setup` | _(none)_ | Kotlin/JS + Filament.js (WASM) setup for browser-based 3D |
|
|
2370
|
+
| `get_ar_setup` | _(none)_ | Detailed AR config: permissions, session options, plane detection, image tracking |
|
|
2371
|
+
| `get_platform_setup` | `platform: "android" \| "ios" \| "web" \| "flutter" \| "react-native" \| "desktop" \| "tv"`, `type: "3d" \| "ar"` | Unified setup guide for any platform. Replaces `get_setup`, `get_ios_setup`, `get_web_setup` with a single tool |
|
|
2372
|
+
|
|
2373
|
+
### Code tools
|
|
2374
|
+
| Tool | Parameters | Description |
|
|
2375
|
+
|---|---|---|
|
|
2376
|
+
| `get_sample` | `scenario: string` | Returns a complete, compilable code sample for any of 33 scenarios (Kotlin or Swift) |
|
|
2377
|
+
| `list_samples` | `tag?: string` | Browse all samples, filter by tag (`ar`, `3d`, `ios`, `animation`, `geometry`, ...) |
|
|
2378
|
+
| `validate_code` | `code: string`, `language?: "kotlin" \| "swift"` | Checks generated code against 15+ rules before presenting it to the user |
|
|
2379
|
+
| `migrate_code` | `code: string` | Automatically migrates SceneView 2.x Kotlin code to 3.x. Applies known renames, replaces deprecated APIs, fixes LightNode trailing-lambda bug, removes Sceneform imports. Returns migrated code with a detailed changelog |
|
|
2380
|
+
| `generate_scene` | `description: string` | Generates a complete, compilable `Scene{}` or `ARScene{}` Kotlin composable from a natural language description. Parses objects, quantities, environment, and mode |
|
|
2381
|
+
|
|
2382
|
+
### Reference tools
|
|
2383
|
+
| Tool | Parameters | Description |
|
|
2384
|
+
|---|---|---|
|
|
2385
|
+
| `get_node_reference` | `nodeType: string` | Full API reference for any of 26+ node types -- exact signatures, defaults, examples |
|
|
2386
|
+
| `get_migration_guide` | _(none)_ | Every breaking change from SceneView 2.x to 3.0 with before/after code |
|
|
2387
|
+
| `get_platform_roadmap` | _(none)_ | Multi-platform status and timeline (Android, iOS, KMP, Web, Desktop) |
|
|
2388
|
+
| `get_best_practices` | `topic?: string` | Performance, architecture, memory, and threading guidance |
|
|
2389
|
+
| `get_troubleshooting` | _(none)_ | Common crashes, build failures, AR issues, and their fixes |
|
|
2390
|
+
| `debug_issue` | `category?: "model-not-showing" \| "ar-not-working" \| "crash" \| "performance" \| "build-error" \| "black-screen" \| "lighting" \| "gestures" \| "ios"`, `description?: string` | Targeted debugging guide for a specific issue. Provide a category or describe the problem for auto-detection |
|
|
2391
|
+
|
|
2392
|
+
### Preview tools
|
|
2393
|
+
| Tool | Parameters | Description |
|
|
2394
|
+
|---|---|---|
|
|
2395
|
+
| `render_3d_preview` | `model: string`, `env?: string`, `bg?: string` | Generates an interactive 3D preview link the user can open in their browser |
|
|
2396
|
+
| `create_3d_artifact` | `type: "model-viewer" \| "chart-3d" \| "product-360" \| "scene-builder" \| "ar-preview"`, ... | Generates self-contained HTML artifacts |
|
|
2397
|
+
|
|
2398
|
+
### Resources
|
|
2399
|
+
| URI | Description |
|
|
2400
|
+
|---|---|
|
|
2401
|
+
| `sceneview://api` | Complete SceneView API reference (the full `llms.txt`) |
|
|
2402
|
+
| `sceneview://known-issues` | Live open issues from GitHub (cached 10 min) |
|
|
2403
|
+
|
|
2404
|
+
---
|
|
2405
|
+
|
|
2360
2406
|
## Platform Coverage Summary
|
|
2361
2407
|
|
|
2362
2408
|
| Platform | Renderer | Framework | Sample | Status |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sceneview-mcp",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.14",
|
|
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": [
|