Vectreal — Claude Code MCP server: upload and embed 3D models
An MCP server for Claude Code, Cursor and other agents that uploads GLB models to Vectreal, manages scene parameters, compresses and publishes them, then generates embed code for websites.
AGPL-3.0 ★ 27 updated 2026-10-29
claude mcp add vectreal -- npx -y @vctrl/cliWhat Vectreal does
The server runs via @vctrl/cli and exposes tools for working with 3D scenes. It uploads local GLB files as drafts, reads model data (size, meshes, materials, animation clips), adjusts environment and camera settings, compresses scenes (Draco, KTX2) during publication, and delivers embeddable code snippets.
Requires login through vectreal login — the session lives in OS keychain (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux), or in ~/.config/vectreal/credentials.json on headless systems without Secret Service. Links to a project in the current directory via vectreal init; tools use that project by default, or you can pass --project to switch. Documentation access via search_docs and read_doc works without authentication. All other operations — listing projects, creating scenes, publishing — need an active session.
Tools that need a project ID fall back to the one vectreal init linked; the server finds it in CLAUDE_PROJECT_DIR when set by the agent, otherwise in the launch directory.
What it helps with
- upload a 3D model as a draft and publish it to the server
- embed a published 3D scene on a website with custom settings
- inspect the mesh and material structure of a GLB file before uploading
- adjust 3D scene parameters — lighting, camera, shadows — from the agent
- publish multiple models in a single project and share embed links
Example prompts for the agent
- Upload
character.glbas a new scene in the current project - Compress and publish the scene, then give me the embed code
- Show me the meshes and materials in
scene.glbwithout uploading it
How to install Vectreal
Platform CLI
claude mcp add vectreal -- npx -y @vctrl/cliPlatform CLI
codex mcp add cli -- npx -y @vctrl/cliConfig file
{
"mcpServers": {
"cli": {
"command": "npx",
"args": [
"-y",
"@vctrl/cli"
]
}
}
}Config file
{
"servers": {
"cli": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@vctrl/cli"
]
}
}
}Platform CLI
gemini mcp add cli npx -y @vctrl/cliStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Vectreal
How do I install Vectreal in Claude Code?
Run claude mcp add vectreal -- npx -y @vctrl/cli mcp in your project directory. The server will appear in Claude Code's MCP tools list.
What does Vectreal do?
It publishes 3D models to Vectreal, lets you tweak scene settings like lighting and camera, then generates code to embed those scenes on websites. Agents can do all this during development without leaving the IDE.
Do I need to sign in first?
Yes, run vectreal login once. The session is saved in your OS keychain and reused by all commands. Tools will fail with exit code 3 if no session exists.