MCP Browser World
Ships a Babylon.js adapter that exposes live scene objects (cameras, lights, meshes, sensors) as MCP resources and tools, letting agents inspect and manipulate a running Babylon.js 3D scene — e.g. moving meshes to positions, adjusting lights, or smoothly animating the camera to look at an object.
Ships a CesiumJS adapter that maps scene behaviors onto a Cesium viewer, exposing tools and resources for controlling a 3D globe scene, converting geographic coordinates to ECEF and driving camera flyTo animations.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Browser World
A Model Context Protocol (MCP) framework that bridges LLM agents to browser-based 3D engines. It exposes scene objects (cameras, lights, meshes, sensors,..) as MCP resources and tools, letting clients like Claude Code or MCP Inspector inspect and manipulate a live 3D scene through a standard JSON-RPC interface.
The framework is engine-agnostic at its core and ships with adapters for Babylon.js and CesiumJS.
Vue Spatiale — this project is part of a broader initiative documented in the Vue Spatiale book, which covers the vision, concepts, and roadmap behind spatial MCP tooling.
Quick start
# 1. Clone & install
git clone https://github.com/pandaGaume/mcp-browser-world.git
cd mcp-browser-world
npm install
# 2. Build everything (TypeScript → UMD bundles → deploy)
npm run build:all:dev
# 3. Start the tunnel server (opens browser automatically)
npm run server:startThe dev harness opens at http://localhost:3000/. Click Start to connect
the browser-side MCP server to the tunnel, then point your MCP client at the
displayed endpoint.
Related MCP server: cpu3d
Architecture
┌──────────────────────────────────────────────────────────────────────┐
│ MCP Clients │
│ Claude Code · MCP Inspector · any MCP-compatible agent │
└──────────┬───────────────────────────────────────────────────────────┘
│ POST /mcp (Streamable HTTP, MCP 2025-03-26)
│ GET /sse (SSE stream, MCP 2024-11-05)
▼
┌──────────────────────────────────────────────────────────────────────┐
│ WsTunnel (Node.js) @dev/tunnel │
│ HTTP / HTTPS relay ←→ WebSocket bridge │
└──────────┬───────────────────────────────────────────────────────────┘
│ ws://localhost:3000/provider (wss:// with TLS)
▼
┌──────────────────────────────────────────────────────────────────────┐
│ McpServer (browser page) │
│ │
│ ┌──────────┐ ┌───────────┐ ┌───────────┐ │
│ │ Camera │ │ Light │ │ Mesh │ ← Behaviors │
│ │ Behavior │ │ Behavior │ │ Behavior │ (@dev/behaviors) │
│ └────┬─────┘ └─────┬─────┘ └─────┬─────┘ │
│ │ │ │ │
│ ┌────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐ ┌───────────┐ │
│ │ Babylon │ │ Babylon │ │ Babylon │ │ Filters │ optional │
│ │ Adapter │ │ Adapter │ │ Adapter │ │ Pipeline │ @dev/ │
│ └──────────┘ └───────────┘ └───────────┘ │ (Workers) │ filters │
│ │ │ │ └─────┬─────┘ │
│ └──────────────┴──────────────┴───────────────┘ │
│ │ │
│ ┌───────┴────────┐ │
│ │ Babylon.js / │ ← 3D Engine │
│ │ CesiumJS │ │
│ └────────────────┘ │
└──────────────────────────────────────────────────────────────────────┘Layered design
Layer | Package | Role |
Core |
| Transport-agnostic MCP server SDK: interfaces, base classes, |
Geodesy |
| Coordinate systems (WGS84, ECEF, ENU), ellipsoids, geographic ↔ Cartesian conversions. Self-contained, no MCP dependency |
Behaviors |
| Engine-agnostic scene behaviors: |
Babylon adapter |
| Babylon.js-specific adapters mapping behaviors to |
Cesium adapter |
| CesiumJS-specific adapters mapping behaviors to the Cesium viewer (ECEF coordinates, |
Filters |
| Post-capture image filters for snapshots (grayscale, retinex, …). Worker-eligible filters run off-thread automatically |
Tunnel |
| Node.js WebSocket/HTTP relay bridging MCP clients to the browser-based |
Key concepts
Term | Description |
Behavior ( | Capability template for a type of object (camera, light, mesh). Defines tools, resources, and URI templates. Registered once per type |
Adapter ( | Engine-specific implementation that reads scene state and dispatches tool calls |
Grammar | Serialisable tool descriptions resolved per-session. See docs/grammar.md |
Namespace | Short identifier (e.g. |
URI template | RFC 6570 pattern (e.g. |
Coordinate system
Coordinates use implicit detection — {x,y,z} is Cartesian, {lat,lon} is geographic.
Camera tools accept both formats via coordinateSchema (from @dev/geodesy).
The Cesium adapter converts geographic inputs to ECEF via resolveToCartesian3().
Prerequisites
Tool | Version |
Node.js | >= 20.11.0 < 23.0.0 |
npm | >= 8.0.0 |
Browser | Any modern (Chrome, Edge, Firefox) |
Build
Compile TypeScript
npm run build:dev # one-shot
npm run build:watch # watch modeUMD browser bundles
Produces webpack bundles for @dev/core, @dev/babylon, and @dev/cesium:
npm run bundle # production (minified)
npm run bundle:dev # development (source maps)
npm run bundle:watch # watch mode (core only)Outputs:
packages/dev/core/bundle/mcp-server.jspackages/dev/babylon/bundle/mcp-babylon.jspackages/dev/cesium/bundle/mcp-cesium.js
Deploy bundles to dev harness
npm run deploy:bundles # copies bundles → packages/host/www/bundle/Build everything at once
npm run build:all:dev # development (recommended)
npm run build:all # production (minified)Tip — after changing TypeScript source, always re-run
npm run build:all:devso the browser picks up your changes.
Running the dev server
npm run server:startOutput:
⚙️ MCP Browser World — tunnel started
────────────────────────────────────────────────────────
📡 Provider ws://localhost:3000/provider
🔌 MCP HTTP http://localhost:3000/mcp ← MCP Inspector
📺 MCP SSE http://localhost:3000/sse ← Claude Code
🖥️ Dev harness http://localhost:3000/
────────────────────────────────────────────────────────Set MCP_TUNNEL_NO_OPEN=1 to suppress the automatic browser launch.
Connecting MCP clients
Browser dev harness
Open
http://localhost:3000/Leave defaults in the Connection panel
Click Start — status changes to Connected
MCP Inspector
npx @modelcontextprotocol/inspectorSelect Streamable HTTP transport, URL: http://localhost:3000/<serverName>/mcp.
Claude Code
Add to ~/.claude/settings.json:
{
"mcpServers": {
"babylon": {
"url": "http://localhost:3000/<serverName>/sse"
}
}
}Replace <serverName> with the name passed to McpServerBuilder.withName().
Then try:
"List all the resources available in the Babylon scene." "Move BoxMesh to position (3, 0, -2)." "Smoothly animate the camera to look at the sphere over 2 seconds."
HTTPS / TLS
# Generate a self-signed certificate
npm run gen-cert
# Start with TLS (bash)
MCP_TUNNEL_TLS_CERT=certs/cert.pem MCP_TUNNEL_TLS_KEY=certs/key.pem npm run server:start
# Or use the shortcut
npm run server:start:httpsReplace http:// with https:// in all client URLs. See docs/guides/howto.md
for more TLS details.
Samples
Ready-to-use sample pages live in packages/host/www/samples/:
Sample | Engine | File |
Camera controls | Babylon.js |
|
Light management | Babylon.js |
|
Mesh manipulation | Babylon.js |
|
Multiplex (4 viewports) | Babylon.js |
|
Loopback client | Babylon.js |
|
Camera + 3D Tiles | CesiumJS |
|
Each sample includes a connection panel, canvas, and console output.
Grammar system
Tool descriptions are separated from tool schemas so they can be replaced,
localised, or tuned per client without touching code. The grammar is a plain
JSON-serialisable object, resolved per-session during the initialize handshake.
Full documentation: docs/grammar.md
Snapshot filters
The @dev/filters package provides post-capture image filters applied to
camera_snapshot results before PNG encoding. Filters implement
ISnapshotFilter and are registered on camera adapters via the
IHasImageFiltering interface.
The camera_snapshot tool accepts an optional filters parameter:
Value | Behaviour |
(omitted) | Raw capture, no filters applied |
| Skip all filters (same as omitted) |
| Apply only the named filters, in order |
Use camera_list_filters to discover registered filters at runtime.
Worker-eligible filters (those implementing IWorkerSnapshotFilter) are
automatically batched and executed off the main thread for better performance.
Built-in filters: grayscale, retinex (multi-scale retinex with colour restoration).

Full documentation: docs/filters/architecture.md
MCP transports
Transport | Endpoint | Spec |
Streamable HTTP |
| MCP 2025-03-26 |
SSE stream |
| MCP 2024-11-05 |
SSE messages |
| MCP 2024-11-05 |
Raw WebSocket |
| Internal / testing |
All transports available over HTTPS/WSS when TLS is configured.
Behaviors
The framework ships with three behaviors, each documented in detail:
Behavior | Tools | Documentation |
Camera | 20 tools — positioning, projection, animation, snapshot filtering, scene queries | |
Light | 17 tools — creation, properties, ambient lighting | |
Mesh | 13 tools — visibility, transforms, materials, tags |
Camera tools (summary)
Category | Tools |
Movement |
|
Optics |
|
Control |
|
Capture |
|
Animation |
|
Scene query |
|
Light tools (summary)
Category | Tools |
Lifecycle |
|
Properties |
|
Spatial |
|
Type-specific |
|
Batch |
|
Ambient |
|
Mesh tools (summary)
Category | Tools |
Visibility |
|
Transform |
|
Material |
|
Tags |
|
Project structure
mcp-browser-world/
├── packages/
│ ├── dev/
│ │ ├── core/ @dev/core — MCP server SDK
│ │ │ ├── src/
│ │ │ │ ├── interfaces/ Public TypeScript interfaces
│ │ │ │ └── server/ McpServer, McpServerBuilder, McpGrammar
│ │ │ └── bundle/ mcp-server.js (UMD)
│ │ ├── geodesy/ @dev/geodesy — coordinate systems & ellipsoids
│ │ │ └── src/
│ │ │ ├── geodesy.ellipsoid.ts Ellipsoid (WGS84, GRS80, …)
│ │ │ ├── geodesy.system.ts GeodeticSystem (ECEF ↔ geodetic)
│ │ │ ├── geodesy.schemas.ts JSON schemas + resolveToCartesian3
│ │ │ └── calculators/ Spherical & flat-earth calculators
│ │ ├── behaviors/ @dev/behaviors — engine-agnostic scene behaviors
│ │ │ └── src/
│ │ │ ├── behaviours/ McpCameraBehavior, McpLightBehavior, McpMeshBehavior
│ │ │ └── states/ State interfaces (camera, light, mesh, math)
│ │ ├── babylon/ @dev/babylon — Babylon.js adapters
│ │ │ ├── src/adapters/ Camera, Light, Mesh adapters
│ │ │ └── bundle/ mcp-babylon.js (UMD)
│ │ ├── cesium/ @dev/cesium — CesiumJS adapters
│ │ │ ├── src/adapters/ Camera, Light, Mesh adapters (ECEF)
│ │ │ └── bundle/ mcp-cesium.js (UMD)
│ │ ├── filters/ @dev/filters — snapshot image filters
│ │ │ └── src/
│ │ │ ├── interfaces/ ISnapshotFilter, IImageFilterSet, IHasImageFiltering
│ │ │ ├── imageFilterSet.ts Default implementation (worker batching)
│ │ │ ├── grayscale.filter.ts Built-in: grayscale (worker-eligible)
│ │ │ └── retinex.filter.ts Built-in: retinex (worker-eligible)
│ │ ├── tunnel/ @dev/tunnel — WebSocket/HTTP relay
│ │ │ └── src/ WsTunnel, WsTunnelBuilder, CLI entry
│ │ └── tools/ @dev/tools — shared build utilities (placeholder)
│ └── host/
│ └── www/ Dev harness & samples
│ ├── bundle/ Deployed UMD bundles
│ ├── samples/ babylon-camera, babylon-light, babylon-mesh, cesium-camera
│ └── index.html Browser MCP provider
├── scripts/
│ ├── deploy-bundles.mjs Copy bundles → www/bundle/
│ └── gen-cert.mjs Generate self-signed TLS certificate
├── docs/
│ ├── behaviors/
│ │ ├── camera.md Camera behavior — full tool reference
│ │ ├── light.md Light behavior — full tool reference
│ │ └── mesh.md Mesh behavior — full tool reference
│ ├── filters/
│ │ └── architecture.md Filter pipeline architecture & custom filters
│ ├── guides/
│ │ └── howto.md Tips, recipes & common tasks
│ └── grammar.md Grammar system documentation
└── package.json Monorepo root (npm workspaces)Environment variables
Variable | Default | Description |
|
| TCP port |
|
| Bind address |
|
| WebSocket path for browser provider |
|
| WebSocket path for raw WS clients |
|
| Streamable HTTP endpoint |
|
| Dev harness directory |
|
| Bundle directory served under |
| (unset) | Skip auto-opening browser |
| (unset) | PEM certificate file path |
| (unset) | PEM private-key file path |
| (auto) | Force |
npm scripts
Script | Description |
| Compile TypeScript |
| Compile in watch mode |
| Webpack bundles (production / development) |
| Copy bundles to dev harness |
| Full build pipeline |
| Build + start tunnel |
| Force HTTP |
| Force HTTPS with local certs |
| Generate self-signed TLS certificate |
Further reading
Camera behavior — 20 tools for camera control, animation, snapshot filtering, and scene queries
Light behavior — 17 tools for light management and ambient lighting
Mesh behavior — 13 tools for mesh visibility, transforms, materials, and tags
Grammar system — how tool descriptions are resolved per-session
Snapshot filters — filter pipeline architecture, worker protocol, custom filters
HOWTO — tips, recipes, and common tasks
Vue Spatiale book — vision and roadmap
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
AgentReady Tools is a searchable catalog of more than 250 APIs, MCP servers and developer tools that AI agents can use, each with agent-readiness checks (docs, auth, OpenAPI, MCP support). Search by task, get tool details and related tools, and read or share field notes from other agents in the Agent Community. Remote MCP endpoint: https://agentready-tools.com/mcp
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Search and inspect source-pinned agent skills, plugins and tools through a free public MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to control and manipulate live 3D scenes across frameworks like Three.js, A-Frame, and Babylon.js using a comprehensive set of object and environment tools. It features an integrated in-world chat system that allows for real-time scene modifications directly from within the 3D canvas.333MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to build and edit 3D scenes as safe JSON shape recipes over MCP, then render PNG views of their own work on a pure-JavaScript CPU rasterizer with no GPU or browser. Agents can add, update, and remove objects, place them via terrain raycasts, control cameras and environment, and export or import OBJ geometry.MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to inspect and control a live Blender session through MCP tools that create, modify, and delete objects, apply materials, render images, execute Python, and pull PolyHaven assets over a local TCP add-on. It also exposes a provider-agnostic LLM layer that can be pointed at Ollama, LM Studio, llama.cpp, OpenAI-compatible, or Azure endpoints and switched at runtime.-
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to drive a live Blender session over MCP by inspecting scenes, creating and modifying objects, assigning materials, rendering images, and fetching PolyHaven assets. It also exposes prompt-based scene building and review workflows backed by a provider-agnostic LLM layer (Ollama, LM Studio, llama.cpp, OpenAI-compatible endpoints, Azure) that can be switched at runtime.-