Purpose
cesium-mcp is a protocol-agnostic CesiumJS AI control runtime whose goal is to enable AI agents to control the CesiumJS 3D globe. It separates the Cesium command execution core (Bridge) from different protocol adapters, thereby supporting four integration paths: MCP, WebMCP, function calling, and browser agents.
Main Capabilities
- Provides 62 available command tools, organized into 12 toolsets. The default mode enables 4 core toolsets (30 tools); all can be enabled via CESIUM_TOOLSETS=all, or the AI can dynamically discover and activate toolsets at runtime.
- Supports operations such as camera flights, GeoJSON and 3D Tiles layers, markers, spatial analysis, and heatmaps.
- In browsers that support WebMCP, cesium-mcp-webmcp can expose 61 browser-safe commands through document.modelContext, distributed across 12 optional toolsets, without the need for an additional MCP transport or backend server.
- Provides an MCP Apps map panel: in compatible MCP Apps hosts, an interactive Cesium map can be opened via openCesiumMap; the panel reuses the existing MCP tools, publishes camera/layer/selection context, and can send selected objects into the conversation.
- Tool descriptions default to English; setting CESIUM_LOCALE=zh-CN switches to Chinese. Titles, behavior annotations, localized descriptions, default values, input validation, MCP output modes, and structured results all come from the shared JSON Schema in cesium-mcp-contracts.
Usage
The project provides four integration paths:
- Browser agent (simplest, zero backend): open the online demo to try it out; the hosted model requires no browser API key. You can fork the examples/browser-agent folder to deploy your own version.
- WebMCP (page-local browser tools, experimental in Chrome 149+): the browser-agent example automatically registers all 61 browser-safe page tools and 3 page-local resource tools when document.modelContext is available. Developers need to install the appropriate adapter separately;end users only need to open the integrated website, with no need to install an npm package or run an MCP server.
- Function calling (embedded in your own web application): refer to the complete loop with an OpenAI-compatible API in examples/browser-agent/index.html.
- MCP runtime (Claude Desktop / Cursor / Dify): ordinary MCP users only need the Runtime package, which includes the browser Bridge package and the built-in Viewer located at http://localhost:9100/ ; the cesium-mcp-bridge only needs to be installed separately when integrating a custom page. The stable version serves both existing MCP 2025-11-25 clients and the new 2026-07-28 protocol from the same stdio/HTTP entry point, uses the stable TypeScript SDK v2, and passes the official server-stateless conformance scenario (28/28).
Local preview of the MCP Apps panel: after running npm ci and npm run build, run npm run app:preview -w packages/cesium-mcp-runtime, then open http://127.0.0.1:19311/。
Applicable Scenarios
- Personal projects or quick trials: choose browser-agent.
- Let a compatible browser agent discover the page's local Cesium tools: choose WebMCP.
- Embed an AI assistant in an existing web application: use bridge plus custom function calls.
- Call from Claude Desktop / Cursor / Dify: use the MCP runtime.
- Use in Codex: install the hosted map plugin from this repository's Cesium Map Community source, restart Codex, and you can open map scenes with native chat, without a local map server or a separate model API key, but a compatible MCP Apps host is required.
Limitations and Notes
- The local Runtime is only needed when an external MCP host needs to access the live browser Viewer; browser agents, WebMCP, and function-calling integrations execute the same commands directly in the web application.
- The local WebSocket bridge is only used for external MCP hosts to connect to the live browser Viewer; hosted demos or page-local integrations do not need it.
- The WebMCP path requires experimental support in Chrome 149+; for local testing, enable #enable-webmcp-testing and #devtools-webmcp-support in chrome://flags.
- The Codex map plugin is a community beta, unrelated to the OpenAI public directory, and availability depends on the host.
- The version format is {CesiumMajor}.{CesiumMinor}.{MCPPatch}; new official CesiumJS versions will only raise the compatibility baseline after Bridge verification, and the project will not automatically claim support for new versions.
- The buildings, activity values, and heatmap points in the demo are all demo data, not measured heights or official statistics; the basemap imagery comes from Esri and its imagery contributors.
- This project is an independent runtime and integration toolkit, and is not a continuation of the earlier WebSocket-only reference architecture; the author has contributed the Imagery server, Terrain server, and unified MCP Gateway to CesiumGS/cesium-ai-integrations, but this project's implementation, release cycle, and roadmap remain independent.
- Related projects include mapbox-mcp and openlayers-mcp.