sceneview-mcp 3.4.2 → 3.4.3

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 (2) hide show
  1. package/dist/index.js +61 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -203,6 +203,28 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
203
203
  properties: {},
204
204
  },
205
205
  },
206
+ {
207
+ name: "render_3d_preview",
208
+ description: "Generates an interactive 3D preview link for a glTF/GLB model. Returns a URL to sceneview.github.io/preview that renders the model in the browser with orbit controls, AR support, and sharing. Use this when you want to show a 3D model to the user — paste the link in your response and they can click to see it live. Also works with any publicly accessible .glb URL.",
209
+ inputSchema: {
210
+ type: "object",
211
+ properties: {
212
+ modelUrl: {
213
+ type: "string",
214
+ description: "Public URL to a .glb or .gltf model file. Must be HTTPS and CORS-enabled.",
215
+ },
216
+ autoRotate: {
217
+ type: "boolean",
218
+ description: "Auto-rotate the model (default: true)",
219
+ },
220
+ ar: {
221
+ type: "boolean",
222
+ description: "Enable AR mode on supported devices (default: true)",
223
+ },
224
+ },
225
+ required: ["modelUrl"],
226
+ },
227
+ },
206
228
  ],
207
229
  }));
208
230
  // ─── Tool handlers ────────────────────────────────────────────────────────────
@@ -693,6 +715,45 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
693
715
  ],
694
716
  };
695
717
  }
718
+ // ── render_3d_preview ──────────────────────────────────────────────────
719
+ case "render_3d_preview": {
720
+ const modelUrl = request.params.arguments?.modelUrl;
721
+ const autoRotate = request.params.arguments?.autoRotate ?? true;
722
+ const ar = request.params.arguments?.ar ?? true;
723
+ if (!modelUrl) {
724
+ return {
725
+ content: [{ type: "text", text: "Error: modelUrl is required. Provide a public HTTPS URL to a .glb or .gltf file." }],
726
+ isError: true,
727
+ };
728
+ }
729
+ const params = new URLSearchParams();
730
+ params.set("model", modelUrl);
731
+ if (!autoRotate)
732
+ params.set("rotate", "false");
733
+ if (!ar)
734
+ params.set("ar", "false");
735
+ const previewUrl = `https://sceneview.github.io/preview?${params.toString()}`;
736
+ return {
737
+ content: [{
738
+ type: "text",
739
+ text: `## 3D Preview
740
+
741
+ **[Click to view the 3D model interactively →](${previewUrl})**
742
+
743
+ The link opens an interactive 3D viewer where you can:
744
+ - 🖱️ Drag to orbit, scroll to zoom
745
+ - 📱 "View in AR" on mobile devices (ARCore/ARKit)
746
+ - 🔗 Share the link with anyone
747
+
748
+ **Preview URL:** ${previewUrl}
749
+
750
+ **Model:** ${modelUrl}
751
+
752
+ ---
753
+ *Powered by SceneView — 3D & AR for every platform*`,
754
+ }],
755
+ };
756
+ }
696
757
  default:
697
758
  return {
698
759
  content: [{ type: "text", text: `Unknown tool: ${request.params.name}` }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sceneview-mcp",
3
- "version": "3.4.2",
3
+ "version": "3.4.3",
4
4
  "mcpName": "io.github.ThomasGorisse/sceneview",
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": [