Enables AI-powered control of CesiumJS 3D globes, allowing for camera manipulation, management of layers and markers, spatial analysis, and scene interaction through natural language commands.
Demo
https://github.com/user-attachments/assets/8a40565a-fcdd-47bf-ae67-bc870611c908
Packages
Package | Description | npm |
Browser SDK — embeds in your CesiumJS app, receives commands via WebSocket | ||
MCP Server (stdio) — exposes 19 tools + 2 resources to any MCP client | ||
IDE MCP Server — CesiumJS API helper for coding assistants |
Architecture
┌──────────────┐ stdio ┌──────────────────┐ WebSocket ┌──────────────────┐
│ AI Agent │ ◄────────► │ cesium-mcp- │ ◄─────────► │ cesium-mcp- │
│ (Claude, │ MCP │ runtime │ JSON-RPC │ bridge │
│ Cursor…) │ │ (Node.js) │ │ (Browser) │
└──────────────┘ └──────────────────┘ └──────────────────┘
│
┌──────▼──────┐
│ CesiumJS │
│ Viewer │
└─────────────┘Quick Start
1. Install the bridge in your CesiumJS app
npm install cesium-mcp-bridgeimport { CesiumMcpBridge } from 'cesium-mcp-bridge';
const bridge = new CesiumMcpBridge(viewer, { port: 9100 });
bridge.connect();2. Start the MCP runtime
npx cesium-mcp-runtime3. Connect your AI agent
Add to your MCP client config (e.g. Claude Desktop):
{
"mcpServers": {
"cesium": {
"command": "npx",
"args": ["-y", "cesium-mcp-runtime"]
}
}
}Now ask your AI: "Fly to the Eiffel Tower and add a red marker"
19 Available Tools
Category | Tools |
Camera |
|
Layers |
|
Markers |
|
Drawing |
|
Measurement |
|
Heatmap |
|
Interaction |
|
Scene |
|
Query |
|
Analysis |
|
Examples
See examples/minimal/ for a complete working demo with all 19 commands.
Development
git clone https://github.com/gaopengbin/cesium-mcp.git
cd cesium-mcp
npm install
npm run buildVersion Policy
The major.minor version tracks CesiumJS (e.g. 1.139.x targets Cesium ~1.139.0). Patch versions are independent for MCP feature iterations.