- 8th Wall Mcp
8th Wall Mcp
8th Wall MCP Server
This repository scaffolds a Model Context Protocol (MCP) server to work with 8th Wall. It supports three modes:
- Docs mode: fetch and expose 8th Wall Studio docs as resources and tools (search/read).
- API mode: wrap 8th Wall endpoints to manage apps and scenes (requires credentials).
- Local mode: mirror BlenderMCP-style capabilities for a local web XR project (project/file ops, asset search/download stubs, strategy guidance).
By default, the server starts with a minimal tool and placeholders you can extend after confirming your preferred mode.
Quick start
- Requirements: Node.js 18+ (for native
fetch), npm - Install deps:
npm install - Build:
npm run build - Run (stdio):
node dist/index.js
MCP client configuration
Example for Claude Desktop mcpServers in config.json:
{
"mcpServers": {
"8thwall": {
"command": "node",
"args": ["dist/index.js"],
"env": {
"MODE": "local", // default; use "docs" or "api" if needed
"EIGHTHWALL_BASE_URL": "https://www.8thwall.com",
"EIGHTHWALL_DOCS_ROOT": "https://www.8thwall.com/docs/",
"EIGHTHWALL_API_KEY": "<optional-if-API-mode>",
"PROJECT_ROOT": "./project"
}
}
}
}
Claude Desktop quick config (Local mode)
Paste into Claude Desktop > Settings > Developer > Edit Config:
{
"mcpServers": {
"8thwall": {
"command": "node",
"args": ["dist/index.js"],
"env": {
"MODE": "local",
"PROJECT_ROOT": "./project"
}
}
}
}
Cursor quick config
- Global server: Settings → MCP → Add New Global MCP Server, then paste:
{
"mcpServers": {
"8thwall": {
"command": "node",
"args": ["dist/index.js"],
"env": {
"MODE": "local",
"PROJECT_ROOT": "./project"
}
}
}
}
- Project server: create
.cursor/mcp.jsonin your project root with the same JSON.
VS Code (MCP extension) quick steps
- Install an MCP-compatible extension (e.g., “Model Context Protocol” or equivalent).
- Add a new stdio server with:
- Name:
8thwall - Command:
node - Args:
dist/index.js - Env:
MODE=local,PROJECT_ROOT=./project
- Name:
End-to-end quick test
- Ask Claude: "Scaffold an A‑Frame scene and start the dev server."
- Expected tools:
project.scaffold, thendevserver.start→ openshttp://127.0.0.1:5173/.
- Expected tools:
- Ask: "Add a red box at (0, 1, -2) sized 1x1x1 and a directional light at (2, 3, 2)."
- Tools:
scene.add_primitive,scene.add_light.
- Tools:
- Ask: "Set an HDRI environment from this URL and also use it as background: https://dl.polyhaven.org/file/ph-assets/HDRIs/hdr/1k/studio_small_08_1k.hdr"
- Tool:
scene.set_environment_hdr.
- Tool:
- Ask: "Download the DamagedHelmet GLB from Khronos samples and add it at y=1.2 with scale 0.5."
- Tools:
assets.download_urlwith- URL:
https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/DamagedHelmet/glTF-Binary/DamagedHelmet.glb - filename:
models/DamagedHelmet.glb(relative toproject/assets/)
- URL:
- Then:
scene.add_gltf_modelwithsrc: assets/models/DamagedHelmet.glb,position: [0,1.2,-2],scale: [0.5,0.5,0.5].
- Tools:
- Optional: "Export the project as a zip for Studio upload."
- Tool:
project.export_zip→ returns archive path.
- Tool:
If the preview doesn’t open on localhost, use http://127.0.0.1:5173/.
8th Wall Desktop App integration
- The Desktop App stores projects under
~/Documents/8th Wall/<YourProject>by default. - You can point the MCP server to a Desktop project so all edits reflect in the app:
- Option A (config): set
PROJECT_ROOTto the project path in your MCP client env. - Option B (tools): use
desktop_list_projectsto discover paths, thendesktop_set_projectwith a folder name, orproject_set_rootwith the full path. Confirm withproject_get_root.
- Option A (config): set
- After setting the root, use the same scene and asset tools (
scene_*,assets_*,project_*). The Desktop app typically detects file changes; if not, hit its refresh/build button.
Environment variables
MODE:local,docs, orapi. Defaults tolocal.EIGHTHWALL_DOCS_ROOT: Base URL for docs. Defaults tohttps://www.8thwall.com/docs/.EIGHTHWALL_BASE_URL: Origin for runtime links. Defaults tohttps://www.8thwall.com.EIGHTHWALL_API_BASE: Base API URL for 8th Wall (only in API mode). Placeholder, set to the correct API host.EIGHTHWALL_API_KEY: API token/key (only in API mode).MOCK_8THWALL: If set to1, the server returns mocked data for API tools. // Local modePROJECT_ROOT: Filesystem path for the local project (default./project).
Tools and resources
health_ping: Simple health check tool.docs_get_page: Fetch a docs page and return sanitized text.docs_search: Basic keyword search across a set of doc URLs (naive fetch-and-scan).app.list: List apps (API mode; mocked unless API wired up).app.get: Get a single app by ID (API mode; mocked unless API wired up).
Local mode (includes docs tools)
project_get_info,project_list_files,project_read_file,project_write_file,project_delete_file,project_move_fileproject_scaffold: create a minimal web XR shell (index.html, main.js, styles.css)- Args:
template=aframe(default) orthree,overwrite(bool)
- Args:
assets_status: report availability of PolyHaven integrationassets_search_polyhaven: search PolyHaven (public API; requires network)assets_download_url: download any file intoproject/assets/prompts_asset_strategy: guidance on sourcing/organizing assetsdevserver_start/devserver_stop: servePROJECT_ROOTlocally for quick previewscene_detect_engine: detect if the project uses A‑Frame or Three.jsscene_add_gltf_model: inject a GLTF/GLB model into the scene (A‑Frame entity or Three.js GLTFLoader)scene_set_background_color: set scene background color (A‑Frame background or Three.js scene.background)scene_add_primitive: add primitives (box/sphere/cylinder/plane), with color/size/pos/rot/scalescene_add_light: add ambient/hemisphere/directional/point lightscene_set_environment_hdr: set environment from HDR/EXR (sky in A‑Frame; environment/background in Three.js)scene_add_animation: add a simple spin animation (A‑Frame entity or Three.js loop)scene_add_textured_plane: add a plane with an image texturescene_add_orbit_controls(Three.js): add OrbitControlsscene_add_grid_helper(Three.js): add a grid helperscene_add_floor(Three.js): add a simple floor plane
PolyHaven helpers
assets_polyhaven_categories: list categories for a given typeassets_polyhaven_files: get file metadata for an asset id
Other helpers
assets_unzip: unzip an archive intoproject/assets/...
Note on 8th Wall API endpoints
This scaffold does not embed non-public information. If you intend to use API mode, set EIGHTHWALL_API_BASE and provide a valid EIGHTHWALL_API_KEY. Then implement the specific endpoints in src/clients/8thwallClient.ts according to your access and docs.
Development
- Type-check:
npm run typecheck - Dev run with ts-node:
npm run dev
HTTP bridge for n8n
If you want to call the server’s tools from n8n (via HTTP Request nodes), run the included HTTP bridge:
- Build:
npm run build - Start bridge:
HTTP_PORT=8787 MODE=local PROJECT_ROOT=./project npm run http- Defaults: host
127.0.0.1, port8787. Configure withHTTP_HOSTandHTTP_PORT. - Lists tools:
GET http://127.0.0.1:8787/tools - Invoke a tool:
POST http://127.0.0.1:8787/tool/<toolName>with JSON body (args).
- Defaults: host
Example n8n HTTP requests
-
Download a model into
project/assets/models/:- Method: POST
- URL:
http://127.0.0.1:8787/tool/assets_download_url - JSON Body:
{ "url": "https://example.com/model.glb", "filename": "models/MyModel.glb" }
-
Add the model to the scene (A‑Frame or Three.js auto-detected from
index.html):- Method: POST
- URL:
http://127.0.0.1:8787/tool/scene_add_gltf_model - JSON Body:
{ "src": "assets/models/MyModel.glb", "position": [0,1.2,-2], "scale": [0.5,0.5,0.5] }
-
Start the local dev server for preview:
- Method: POST
- URL:
http://127.0.0.1:8787/tool/devserver_start - JSON Body:
{ "port": 5173 } - Response includes:
{ url: "http://127.0.0.1:5173/", running: true }.
Notes
- The HTTP bridge reuses the same tool implementations as the MCP server; no duplication.
- Use
PROJECT_ROOTto point at your 8th Wall Desktop project for in‑place edits. - CORS is open (
*) for convenience on localhost; lock downHTTP_HOST/reverse‑proxy in production contexts.
Project structure
src/index.ts: Server entry. Registers tools/resources for docs or API modes.src/tools/docs.ts: Docs-mode tools (fetch/read/search pages).src/tools/app.ts: API-mode tools (list/get apps, mocked by default).src/clients/8thwallClient.ts: Minimal HTTP client wrapper for API mode.src/types.ts: Shared types for App/Scene.src/tools/assets.ts: Asset search/download + unzipsrc/tools/project.ts: Project tools (file ops, scaffold, export)src/tools/scene.ts: Scene-building helpers (primitives, lights, models, env, etc.)
Security
Never commit real API keys. Use environment variables or your MCP client’s secret storage.
Contributing & License
- Contributions welcome! See
CONTRIBUTING.mdandCODE_OF_CONDUCT.md. - Security reports: see
SECURITY.md. - License: MIT (see
LICENSE).
Server Config
{
"mcpServers": {
"8thwall": {
"command": "node",
"args": [
"dist/index.js"
],
"env": {
"MODE": "local",
"EIGHTHWALL_BASE_URL": "https://www.8thwall.com",
"EIGHTHWALL_DOCS_ROOT": "https://www.8thwall.com/docs/",
"EIGHTHWALL_API_KEY": "<optional-if-API-mode>",
"PROJECT_ROOT": "./project"
}
}
}
}