cesium-mcp

AI-powered CesiumJS 3D globe control — 43 tools for camera, entities, layers, animation, and interaction via MCP protocol. Also available as a remote server via Streamable HTTP.

<div align="center"> <img src="docs/public/logo.svg" alt="Cesium MCP" width="120"> <h1>Cesium MCP</h1> <p><strong>AI-Powered 3D Globe Control via Model Context Protocol</strong></p> <p>Connect any MCP-compatible AI agent to <a href="https://cesium.com/">CesiumJS</a> — camera, layers, entities, spatial analysis, all through natural language.</p> <p> <a href="https://gaopengbin.github.io/cesium-mcp/">Website</a> &middot; <a href="README.zh-CN.md">中文</a> &middot; <a href="https://gaopengbin.github.io/cesium-mcp/guide/getting-started.html">Getting Started</a> &middot; <a href="https://gaopengbin.github.io/cesium-mcp/api/bridge.html">API Reference</a> </p> <p> <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a> <a href="https://github.com/gaopengbin/cesium-mcp/actions/workflows/ci.yml"><img src="https://github.com/gaopengbin/cesium-mcp/actions/workflows/ci.yml/badge.svg" alt="CI"></a> <a href="https://www.npmjs.com/package/cesium-mcp-bridge"><img src="https://img.shields.io/npm/v/cesium-mcp-bridge?label=bridge" alt="npm bridge"></a> <a href="https://www.npmjs.com/package/cesium-mcp-runtime"><img src="https://img.shields.io/npm/v/cesium-mcp-runtime?label=runtime" alt="npm runtime"></a> <a href="https://www.npmjs.com/package/cesium-mcp-dev"><img src="https://img.shields.io/npm/v/cesium-mcp-dev?label=dev" alt="npm dev"></a> <a href="https://glama.ai/mcp/servers/gaopengbin/cesium-mcp"><img src="https://glama.ai/mcp/servers/gaopengbin/cesium-mcp/badges/card.svg" alt="cesium-mcp MCP server"></a> </p> </div>

Demo

https://github.com/user-attachments/assets/8a40565a-fcdd-47bf-ae67-bc870611c908

Packages

PackageDescriptionnpm
cesium-mcp-bridgeBrowser SDK — embeds in your CesiumJS app, receives commands via WebSocketnpm
cesium-mcp-runtimeMCP Server (stdio) — 49 tools (11 toolsets) + 2 resources, dynamic discoverynpm
cesium-mcp-devIDE MCP Server — CesiumJS API helper for coding assistantsnpm

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-bridge
import { CesiumMcpBridge } from 'cesium-mcp-bridge';

const bridge = new CesiumMcpBridge(viewer, { port: 9100 });
bridge.connect();

2. Start the MCP runtime

npx cesium-mcp-runtime

3. 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"

49 Available Tools

Tools are organized into 11 toolsets. Default mode enables 4 core toolsets (~24 tools). Set CESIUM_TOOLSETS=all for everything, or let the AI discover and activate toolsets dynamically at runtime.

ToolsetTools
view (default)flyTo, setView, getView, zoomToExtent, saveViewpoint, loadViewpoint, listViewpoints
entity (default)addMarker, addLabel, addModel, addPolygon, addPolyline, updateEntity, removeEntity, batchAddEntities, queryEntities
layer (default)addGeoJsonLayer, listLayers, removeLayer, setLayerVisibility, updateLayerStyle, setBasemap
interaction (default)screenshot, highlight
cameralookAtTransform, startOrbit, stopOrbit, setCameraOptions
entity-extaddBillboard, addBox, addCorridor, addCylinder, addEllipse, addRectangle, addWall
animationcreateAnimation, controlAnimation, removeAnimation, listAnimations, updateAnimationPath, trackEntity, controlClock, setGlobeLighting
tilesload3dTiles, loadTerrain, loadImageryService
trajectoryplayTrajectory
heatmapaddHeatmap
geolocationgeocode

Relationship with CesiumGS official MCP servers: The camera, entity-ext, and animation toolsets natively fuse capabilities from CesiumGS/cesium-mcp-server (Camera Server, Entity Server, Animation Server) into this project's unified bridge architecture. This means you get all official functionality plus additional tools — in a single MCP server, without running multiple processes.

Examples

See examples/minimal/ for a complete working demo.

Development

git clone https://github.com/gaopengbin/cesium-mcp.git
cd cesium-mcp
npm install
npm run build

Version 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.

License

MIT

Related Servers