spatial-mcp-artifacts
БесплатноБез исполняемых скриптовНе проверенBuild, validate and lint Spatial MCP artifacts (a live 3D GLB scene returned as an MCP tool result's structuredContent) with the @three-ws/spatial-mcp…
от nirholas★ 289 звёзд на GitHubОб этом скилле
Spatial MCP artifacts
Spatial MCP is an open (CC0) shape for returning an interactive 3D scene from an MCP tool, carried in structuredContent. The @three-ws/spatial-mcp package is dependency-free (Node 18+, browsers, bundlers) and exports four functions plus a version constant.
Install
npm install @three-ws/spatial-mcp
API (from src/index.js)
| Export | Use |
|---|---|
SPATIAL_MCP_VERSION |
'0.1', the only accepted spatialMcpVersion |
buildSpatialArtifact(fields) |
assemble a conformant artifact |
validateSpatialArtifact(payload) |
returns { valid, version, errors, warnings }, each item { path, message } |
isConformantSpatialArtifact(payload) |
boolean |
lintSpatialMeta(payload) |
advisory data-minimization findings [{ path, message }] |
Required shape
Only three fields are required: spatialMcpVersion: "0.1", kind (one of model, mesh, avatar, rigged-model, scene) and scene.glbUrl (an https URL to a .glb). Optional blocks: camera, environment, animation, persona, ar, affordances, meta. Unknown top-level fields are warnings, not errors.
buildSpatialArtifact inputs: glbUrl (required), kind, poster, alt, autoRotate, cameraOrbit, environmentImage, exposure, shadowIntensity, download, rigged, clips, autoplay, personaId, ar ({ usdzUrl, glbUrl, launchUrl }, https only), prompt, title, viewerUrl.
Emit from an MCP tool
import { buildSpatialArtifact, validateSpatialArtifact } from '@three-ws/spatial-mcp';
const spatial = buildSpatialArtifact({
glbUrl: 'https://three.ws/avatars/xbot.glb',
kind: 'rigged-model',
prompt: 'a sci-fi robot',
title: 'Sci-fi robot',
});
const { valid, errors } = validateSpatialArtifact(spatial);
if (!valid) throw new Error(JSON.stringify(errors));
return {
content: [{ type: 'text', text: 'Here is your 3D model.' }],
structuredContent: { glbUrl: spatial.scene.glbUrl, spatial },
};
Validate an existing artifact
- Parse the JSON, run
validateSpatialArtifact. - Fix every entry in
errorsby itspath(for examplescene.glbUrlmust be https,ar.supported: trueneeds at least one AR asset URL,scene.formatmay only be"glb"). - Read
warnings(missingcamera, missingscene.format) and add the recommended blocks. - Run
lintSpatialMetaand remove any wallet, price, session id, API key or token-shaped value frommeta. The spec requires emitters to strip these.
Conformance fixtures
fixtures/manifest.json lists every fixture with the required verdict (valid) and, for invalid ones, the mustFlag error paths. To test another validator, run it over each fixtures/<file> and compare. Import the manifest with import manifest from '@three-ws/spatial-mcp/fixtures/manifest' with { type: 'json' }. Fixture URLs use the reserved assets.example host and are not fetchable.
Notes
The package only emits and validates. A reference renderer is served at https://three.ws/spatial-mcp/spatial-renderer.js, and the same validator module is importable at https://three.ws/spatial-mcp/spatial-validator.js.
Установить spatial-mcp-artifacts в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл spatial-mcp-artifacts?
Build, validate and lint Spatial MCP artifacts (a live 3D GLB scene returned as an MCP tool result's structuredContent) with the @three-ws/spatial-mcp package. Use when an MCP server tool should return a 3D model or avatar, or when checking an artifact for conformance.
Как установить скилл spatial-mcp-artifacts?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл spatial-mcp-artifacts запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic