mcp

v4.5.3
io.github.sceneview/mcp Checked 3 days ago Published 1 day ago

SceneView 3D & AR for Android and the web: API docs, samples, code validation and generation.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_sample

Returns a complete, compilable Kotlin sample for a given SceneView scenario. Use this to get a working starting point before customising. Call `list_samples` first if you are unsure which scenario fits.

ParameterTypeDescription
scenario *stringThe scenario to fetch: - "model-viewer": Full-screen 3D scene with a GLB model, HDR environment, orbit camera, and animation controls - "ar-model-viewer": AR scene with plane detection. Tap a surface…

list_samples

Lists all available SceneView code samples with their IDs, descriptions, and tags. Use this to find the right sample before calling `get_sample`, or to show the user what SceneView can do.

ParameterTypeDescription
tagstringOptional tag to filter by (e.g. "ar", "3d", "ios", "swift", "anchor", "geometry", "animation", "video", "lighting"). Omit to list all samples.

get_setup

Returns the Gradle dependency and AndroidManifest snippet required to use SceneView in an Android project.

ParameterTypeDescription
type *string"3d" for 3D-only scenes. "ar" for augmented reality (includes 3D).

validate_code

Checks a Kotlin or Swift SceneView snippet for common mistakes. For Kotlin: symbol existence against the real public API (unknown imports, made-up node types, nonexistent loader methods — with did-you-mean suggestions), threading violations, wrong destroy order, missing null-checks, LightNode trailing-lambda bug, deprecated 2.x APIs. For Swift: missing @MainActor, async/await patterns, missing imports, RealityKit mistakes. Language is auto-detected. Always call this before presenting generated SceneView code to the user.

ParameterTypeDescription
code *stringThe Kotlin or Swift source code to validate (composable function, SwiftUI view, class, or file). Language is auto-detected.

get_migration_guide

Returns the full SceneView 2.x → 3.0 migration guide. Use this when a user reports code that worked in 2.x but breaks in 3.0, or when helping someone upgrade.

get_node_reference

Returns the full API reference for a specific SceneView node type or composable — parameters, types, and a usage example — parsed directly from the official llms.txt. Use this when you need the exact signature or options for a node (e.g. ModelNode, LightNode, ARScene). If the requested type is not found, the response lists all available types.

ParameterTypeDescription
nodeType *stringThe node type or composable name to look up, e.g. "ModelNode", "LightNode", "ARScene", "AnchorNode". Case-insensitive.

get_platform_roadmap

Returns the SceneView multi-platform roadmap — current Android support status, planned iOS/KMP/web targets, and timeline. Use this when the user asks about cross-platform support, iOS, Kotlin Multiplatform, or future plans.

get_best_practices

Returns SceneView performance and architecture best practices — memory management, model optimization, threading rules, Compose integration patterns, and common anti-patterns. Use this when the user asks about performance, optimization, best practices, or architecture.

ParameterTypeDescription
categorystringCategory to filter by. "all" returns everything. Defaults to "all" if omitted.

get_ar_setup

Returns detailed AR setup instructions — AndroidManifest permissions and features, Gradle dependencies, ARCore session configuration options (depth, light estimation, instant placement, plane detection, image tracking, cloud anchors), and a complete working AR starter template. More detailed than `get_setup` for AR-specific configuration.

get_troubleshooting

Returns the SceneView troubleshooting guide — common crashes (SIGABRT, model not showing), build failures, AR issues (drift, overexposure, image detection), and performance problems. Use this when a user reports something not working, a crash, or unexpected behavior.

get_ios_setup

Returns the complete iOS setup guide for SceneViewSwift — SPM dependency, Package.swift example, minimum platform versions, Info.plist entries for AR (camera permission), and basic SwiftUI integration code. Use this when a user wants to set up SceneView for iOS, macOS, or visionOS.

ParameterTypeDescription
type *string"3d" for 3D-only scenes. "ar" for augmented reality (requires iOS, not macOS/visionOS via this path).

get_web_setup

Returns the complete Web setup guide for SceneView Web — npm install, Kotlin/JS Gradle config, HTML canvas setup, and basic Filament.js integration code. SceneView Web uses the same Filament rendering engine as Android, compiled to WebAssembly. Use this when a user wants to set up SceneView for browsers.

render_3d_preview

Generates an interactive 3D preview link. Accepts a model URL, a SceneView code snippet, or both. Returns a URL to sceneview.github.io/preview that renders the model in the browser with orbit controls, AR support, and sharing. For model URLs: embeds a model-viewer link directly. For code snippets: shows the 3D preview with the code in a companion panel. 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.

ParameterTypeDescription
arbooleanEnable AR mode on supported devices (default: true).
autoRotatebooleanAuto-rotate the model (default: true).
codeSnippetstringSceneView code snippet (Kotlin or Swift) to display alongside the 3D preview in a companion panel. Useful when showing generated code together with a live preview.
modelUrlstringPublic URL to a .glb or .gltf model file. Must be HTTPS and CORS-enabled. If omitted, a default model is used.
titlestringCustom title shown above the preview.

create_3d_artifact

Generates a complete, self-contained HTML page with interactive 3D content that Claude can render as an artifact. Returns valid HTML using model-viewer (Google's web component for 3D). Use this when the user asks to "show", "preview", "visualize" 3D models, create 3D charts/dashboards, or view products in 360°. The HTML works standalone in any browser, supports AR on mobile, and includes orbit controls. Types: "model-viewer" for 3D model viewing, "chart-3d" for 3D data visualization (bar charts with perspective), "scene" for rich 3D scenes with lighting, "product-360" for product turntables w…

ParameterTypeDescription
type *string"model-viewer": interactive 3D model viewer with orbit + AR. "chart-3d": 3D bar chart for data visualization. "scene": rich 3D scene with lighting. "product-360": product turntable with hotspot annota…
dataarrayData array for chart-3d type. Each item has {label, value, color?}. Required for "chart-3d", ignored for other types.
hotspotsarrayAnnotation hotspots for product-360 type. Each has position, normal, label, and optional description.
modelUrlstringPublic HTTPS URL to a .glb or .gltf model. If omitted, a default model is used. Not needed for chart-3d type.
optionsobjectVisual options for the 3D artifact.
shapesarrayArray of procedural 3D shapes for "geometry" type. Each shape has type, position, scale, color, metallic, roughness. Required for "geometry" type. Example: [{type:"cube",position:[0,0.5,0],scale:[1,1,…
titlestringTitle displayed on the artifact. Defaults to a sensible name per type.

get_platform_setup

Returns the complete setup guide for any SceneView-supported platform: Android, iOS, Web, Flutter, React Native, Desktop, or Android TV. Includes dependencies, manifest/permissions, minimum SDK, and a working starter template. Replaces `get_setup`, `get_ios_setup`, and `get_web_setup` with a single unified tool. Use this when a user wants to set up SceneView on any platform.

ParameterTypeDescription
platform *stringTarget platform: - "android" - "ios" - "web" - "flutter" - "react-native" - "desktop" - "tv"
type *string"3d" for 3D-only scenes. "ar" for augmented reality. Some platforms only support 3D.

migrate_code

Automatically migrates SceneView 2.x Kotlin code to 3.x. Applies known renames (SceneView→Scene, ArSceneView→ARScene), replaces deprecated APIs (loadModelAsync→rememberModelInstance, Engine.create→rememberEngine), fixes LightNode trailing-lambda bug, removes Sceneform imports, and more. Returns the migrated code with a detailed changelog. Use this when a user has 2.x code that needs updating, or when you detect 2.x patterns in their code.

ParameterTypeDescription
code *stringThe SceneView 2.x Kotlin code to migrate. Can be a snippet, a function, or a full file.

debug_issue

Returns a targeted debugging guide for a specific SceneView issue. Categories: "model-not-showing" (invisible models), "ar-not-working" (AR camera/planes), "crash" (SIGABRT/native), "performance" (low FPS/memory), "build-error" (Gradle/dependency), "black-screen" (no rendering), "lighting" (dark/bright/shadows), "gestures" (touch/drag), "ios" (Swift/RealityKit). You can provide a category directly, or describe the problem and it will be auto-detected. Use this when a user reports something not working.

ParameterTypeDescription
categorystringThe issue category. If omitted, provide `description` for auto-detection. - "model-not-showing" - "ar-not-working" - "crash" - "performance" - "build-error" - "black-screen" - "lighting" - "gestures"…
descriptionstringFree-text description of the issue (e.g., "my model is not showing", "app crashes on destroy"). Used for auto-detection when category is omitted.

generate_scene

Generates a complete, compilable SceneView{} or ARSceneView{} 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.

ParameterTypeDescription
description *stringNatural 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…

list_platforms

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.

get_animation_guide

Returns a comprehensive guide for animating 3D models in SceneView — playing embedded glTF animations, Spring physics animations (KMP core), Compose property animations (animateFloatAsState, InfiniteTransition), SmoothTransform for smooth following, and AR animated models. Includes compilable Kotlin code samples. Use this when a user asks about animation, motion, springs, smooth movement, or how to play model animations.

get_gesture_guide

Returns a comprehensive guide for adding gestures to 3D objects in SceneView — isEditable for one-line pinch-to-scale/drag-to-rotate/tap-to-select, custom onTouchEvent handlers, AR tap-to-place, drag-to-rotate with sensitivity, pinch-to-scale with limits, multi-model selection, and HitResultNode surface cursor. Includes compilable Kotlin code samples. Use this when a user asks about touch, gestures, interaction, drag, pinch, tap, or editing 3D objects.

get_performance_tips

Returns a comprehensive performance optimization guide for SceneView — polygon budgets per device tier, LOD, texture compression (KTX2/Basis Universal), mesh compression (Draco/Meshopt), engine reuse, per-frame allocation avoidance, frustum culling, instancing, lighting optimization, post-processing costs, and profiling with Systrace and Android GPU Inspector. Includes code samples and CLI commands. Use this when a user asks about performance, optimization, FPS, memory, profiling, or slow rendering.

get_material_guide

Returns a comprehensive guide for PBR materials in SceneView — baseColor, metallic, roughness, reflectance, emissive, clearCoat, normal maps. Includes recipes for common materials (glass, chrome, gold, rubber, car paint), code samples for modifying materials on ModelNode, texture setup, and environment lighting requirements. Use this when a user asks about materials, textures, colors, shaders, appearance, or why their model looks wrong (flat, dark, too shiny).

get_collision_guide

Returns a comprehensive guide for collision detection, hit testing, and physics in SceneView — node tapping (onSingleTapConfirmed), AR tap-to-place (frame.hitTest on a confirmed tap), ray-box/ray-sphere intersection (KMP core), bounding boxes, and basic rigid body physics. Use this when a user asks about tapping 3D objects, collision detection, physics simulation, ray casting, or hit testing.

get_model_optimization_guide

Returns a complete guide for optimizing 3D models for SceneView — polygon budgets per device tier, file size targets, Draco/Meshopt mesh compression, KTX2 texture compression, the recommended optimization pipeline (gltf-transform CLI), texture sizing rules, LOD strategies, and quick wins. Use this when a user asks about model optimization, file size, load times, polygon count, texture compression, or preparing models for mobile.

get_web_rendering_guide

Returns a comprehensive guide for SceneView Web (Filament.js WASM) — architecture, quick start (sceneview.js npm or Kotlin/JS), IBL environment lighting (critical for PBR quality), rendering quality settings (SSAO, bloom, TAA), camera exposure tuning, Filament.js vs model-viewer comparison, and web performance tips. Use this when a user asks about web 3D rendering, Filament.js, browser viewing, WebGL, or wants to display 3D models in a web page.

search_models

Searches Sketchfab for free 3D models matching a natural-language query and returns a shortlist with names, authors, licenses, thumbnails, triangle counts, and viewer/embed URLs. Use this BEFORE generating SceneView code when the user asks for a specific asset ("a red sports car", "a low-poly tree", "a sci-fi robot") — pick the best result, then load it with `rememberModelInstance(modelLoader, "models/your-file.glb")` or embed its viewer URL. Requires a free `SKETCHFAB_API_KEY` environment variable (BYOK — nothing is charged by SceneView). If the key is missing, the tool returns instructio…

ParameterTypeDescription
query *stringFree-text search query, e.g. "red sports car", "low-poly pine tree", "sci-fi robot".
categorystringOptional Sketchfab category slug to narrow results (e.g. "cars-vehicles", "animals-pets", "architecture", "furniture-home", "weapons-military").
downloadablebooleanRestrict to downloadable models so you can actually load the asset. Default: true. Set to false to include view-only models.
maxResultsnumberMaximum number of results to return. Clamped to [1, 10]. Default: 6.

generate_3d_model

Generates a brand-new 3D model (GLB) at real-world scale — use this when `search_models` finds no suitable existing asset. Three modes, all free on SceneView's side (there is no paid tier and no SceneView-hosted generation API): (1) provider "parametric" — deterministic primitives (box, cylinder, cone, sphere, torus) from a structured `parts` list, built locally with NO API key and no network; pick it for furniture blockouts, props and placeholders whose dimensions are known ("a 1.2 × 0.75 × 0.6 m desk"). Passing `parts` without `provider` selects it. (2) "trellis" — Microsoft TRELLIS.…

ParameterTypeDescription
imageUrlstringProvider modes: public HTTPS URL of a source image to convert to 3D (image→3D). JPEG or PNG, max 20 MB. Provide exactly one of `prompt` or `imageUrl`.
overwritebooleanAllow `save_to_path` to replace an existing regular file. Default false: an existing file is never touched.
partsarrayParametric mode: the primitives the model is assembled from (union by composition, one node per part; no boolean subtraction). Sizes and positions are in `units`; y is up; `position` is the centre of…
promptstringProvider modes: text description of the model to generate (text→3D), e.g. "a low-poly cactus in a striped pot". Max 1024 characters. Provide exactly one of `prompt` or `imageUrl`.
providerstring"parametric": deterministic primitives from `parts`, no key, no network. "trellis": Microsoft TRELLIS.2 on Runware (`RUNWARE_API_KEY`, a few US cents per model, image-faithful PBR mesh). "tripo": Trip…
qualitystringProvider modes. "fast" (default): Tripo P1 low-poly (~25-30 s) or TRELLIS.2 1024³ — cheap, AR-ready. "hd": Tripo H3.1 quad topology (up to ~100 s) or TRELLIS.2 1536³ — more detail, higher cost.
save_to_pathstringOptional absolute path of a `.glb` file to write the model to (local package only). The parent directory must already exist. Validated before any generation runs.
targetSizeobjectOptional real-world size: set exactly one key and the model is scaled uniformly so that dimension matches, in metres. Example: { heightMeters: 0.75 }.
unitsstringParametric mode: unit of every size and position in `parts` (default "m"). The GLB is always written in metres.

analyze_project

Scans a local SceneView project on the user's machine and returns a structured analysis: detected project type (Android, iOS, Web), extracted SceneView dependency version, whether it is outdated vs the latest known release, and any known anti-patterns found by reading source files (threading violations, LightNode trailing-lambda bug, deprecated 2.x APIs, Sceneform imports). Safe: scans at most 30 source files and 500 KB total, never writes to disk. Use this when a user asks 'is my project up to date?', 'what's wrong with my SceneView code?', or when you want a fast sanity check of a project be…

ParameterTypeDescription
pathstringAbsolute or relative path to the project root to scan. Defaults to the current working directory of the MCP server.

search_android_docs

Searches Google's stock Android documentation knowledge base (~4 800 entries: Jetpack Compose, Camera2, ARCore SDK, Kotlin APIs, platform guides) and returns matching entries with their `kb://...` URIs. Use this to cross-reference stock Android APIs with SceneView code — e.g. "how does LazyColumn paging work", "Camera2 capture session", "ARCore Config options". Then call `fetch_android_doc` with a returned URI to read the full entry. Requires Google's `android` CLI on the MCP host's PATH (an optional runtime dependency — sceneview-mcp works without it); if the CLI is absent the tool return…

ParameterTypeDescription
query *stringFree-text search query, e.g. "LazyColumn paging", "Camera2 capture session", "ARCore anchors".

fetch_android_doc

Fetches the full text of a single stock Android documentation entry by its knowledge-base URI (`kb://...`), as returned by `search_android_docs`. Use this after `search_android_docs` to read a complete guide or API reference. Requires Google's `android` CLI on the MCP host's PATH (an optional runtime dependency); if the CLI is absent the tool returns clear install instructions instead of crashing.

ParameterTypeDescription
uri *stringThe knowledge-base URI to fetch, e.g. "kb://compose/lists/lazy-column". A bare path with no scheme is tolerated and normalised to kb://.

show_in_space

Use when the user wants to see an object of given size in their room at real scale: furniture, a box, a parcel or a TV. Returns one link opening the Spatial answer in the SceneView Android app; without the app, the web page shows the size and offers the app. Represents the object's bounding box using the sizes the user said (dimensionSource: user) or the assistant estimated (estimated). No fit detection and no accuracy claim. Dimensions are width, height, depth in centimetres.

ParameterTypeDescription
depthCm *numberDepth in centimetres, front to back.
heightCm *numberHeight in centimetres, from the floor or table up.
label *stringShort name shown with the box, e.g. "Desk" or "55-inch TV".
widthCm *numberWidth in centimetres, left to right as you face the object (a desk's length).
dimensionSourcestring"user" when the user gave the sizes, "estimated" when you estimated them (say so in your answer).
placementstringWhere the object stands: on the floor (furniture) or on a table (a parcel, a speaker).

view_3d_model

Render an interactive 3D model viewer inline in the conversation. Pass a public GLB / GLTF / 3MF URL and the assistant will display it in a SceneView-branded widget with orbit controls, auto-rotate, and AR mode (where supported). Use this when the user asks to PREVIEW a 3D model, asks 'what does X look like in 3D?', after `search_models` to render the chosen result, or to show a `.3mf` you just produced for 3D printing — the widget converts 3MF to glTF in the browser, so a printable model is previewable without any download.

ParameterTypeDescription
modelUrl *stringPublic HTTPS URL to a .glb, .gltf or .3mf 3D model file (`model/gltf-binary`, `model/gltf+json`, `model/3mf`). Must be CORS-enabled. Works with assets from sceneview.github.io, model-viewer-textured C…
altstringAccessibility text describing what the model represents.
arbooleanWhether to show the 'Open in AR on your phone' action (a link that opens the model in the 3D AR Model Viewer app, plus a QR code on desktop). Only shown for https model URLs. Default: true.
autoRotatebooleanWhether the model should slowly auto-rotate when idle. Default: true.
posterUrlstringOptional preview image URL shown while the model is loading.
titlestringOptional title shown above the viewer (e.g. the model name).