# gaopengbin/cesium-mcp [Health: Active]

**Category:** 📊 Data Visualization  
**Repository:** https://github.com/gaopengbin/cesium-mcp  
**GitHub Stars:** 146  
**npm Downloads (last month):** 936  
**Views:** 11  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/gaopengbin-cesium-mcp

## Description
AI-powered 3D globe control via MCP. Connect any MCP-compatible AI agent to CesiumJS — camera flight, GeoJSON/3D Tiles layers, markers, spatial analysis, heatmaps, and more through 19 natural language tools.

## Tools
Capabilities this server exposes over MCP:

- **flyTo** — Animate the camera to a geographic location. Use for visible navigation requested by the user. Returns { success: boolean, message?: string, error?: string }.
- **setView** — Set the camera position immediately without animation. Use for deterministic setup or instant view changes. Returns { success: boolean, message?: string, error?: string }.
- **getView** — Get the current camera position and orientation. Returns { success, data: { longitude, latitude, height, heading, pitch, roll }, message? }.
- **zoomToExtent** — Animate the camera to a west/south/east/north bounding box. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **saveViewpoint** — Save the current camera state under a page-local name. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **loadViewpoint** — Restore a previously saved page-local camera state. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **listViewpoints** — List camera viewpoints saved in the current page. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **exportScene** — Export the current view, layer, and entity state as JSON. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **addMarker** — Add a point marker at geographic coordinates. Returns { success, data: { entityId }, message? }; keep entityId for removeEntity.
- **addLabel** — Add property-based text labels for GeoJSON features. Returns { success, data: { labelCount: integer }, message? }.
- **addModel** — Add a glTF or GLB model at geographic coordinates. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **addPolygon** — Draw a polygon area from geographic coordinate tuples. Returns { success, data: { entityId }, message? }; keep entityId for removeEntity.
- **addPolyline** — Draw a path or route from geographic coordinate tuples. Returns { success, data: { entityId }, message? }; keep entityId for removeEntity.
- **updateEntity** — Update the position, appearance, label, or visibility of an entity. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **removeEntity** — Remove one entity created by an entity tool. Returns { success, message? } or { success: false, error } when entityId is not found.
- **batchAddEntities** — Add multiple supported entities in one page operation. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **queryEntities** — Query page entities by name, type, or geographic extent. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **getEntityProperties** — Read the properties and graphics metadata for one entity. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **addGeoJsonLayer** — Add a styled GeoJSON Point, LineString, or Polygon layer. Returns { success, data: { id, name, type, visible, color, dataRefId? }, message? }; use id with highlight.
- **addGeoJsonPrimitive** — Render GeoJSON as Cesium primitives for large browser datasets. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **listLayers** — List all layers currently managed by the page. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **getLayerSchema** — Inspect fields, entity counts, and metadata for a layer. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **removeLayer** — Remove a managed layer from the page. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **clearAll** — Clear all layers, entities, animations, and trajectories from the scene. Returns { success, data: { removedLayers, removedEntities }, message? }.
- **setLayerVisibility** — Show or hide a managed layer. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **updateLayerStyle** — Update vector, imagery, primitive, or 3D Tiles styling for a layer. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
- **setBasemap** — Switch the visible basemap style. Returns { success, data: { basemap }, message? }.
- **screenshot** — Capture the current Cesium map view as a PNG image. Returns { success, data: { dataUrl, width, height }, message? }; dataUrl is a base64 PNG.
- **highlight** — Highlight one feature or every feature in a GeoJSON layer. Returns { success: boolean, message?: string, error?: string }.
- **measure** — Measure distance or area between geographic coordinate tuples. Returns { success, data: { mode, value, unit, segments?, id? }, message? }.
- **list_toolsets** — List all available tool groups and their enabled status. Call this to discover additional capabilities before asking the user to configure anything.
- **enable_toolset** — Enable a tool group to make its tools available. Call list_toolsets first to see available groups.
- **listSessions** — List all connected browser sessions (ID and connection state) for multi-browser routing

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "cesium-mcp": {
    "command": "npx",
    "args": ["-y","cesium-mcp-runtime"]
  }
}
```

## Documentation

## What gaopengbin/cesium-mcp does

gaopengbin/cesium-mcp exposes CesiumJS map and globe operations to AI agents through MCP and related integration paths. Agents can move the camera, inspect its current position, save and restore page-local viewpoints, and zoom to geographic extents. They can also create, inspect, modify, and remove map content in the active Cesium scene.

The project separates the Cesium command executor from protocol adapters. Its browser-side bridge handles the Cesium operations, while MCP runtime, WebMCP, browser-agent, and function-calling integrations provide different ways to invoke those operations. The repository describes the MCP runtime as the option for external hosts, including Claude Desktop, Cursor, and Dify.

## How it works

The browser bridge is the execution core and communicates with a CesiumJS Viewer. Tool definitions and JSON Schemas are maintained separately in the contracts package. Depending on the integration, commands can be invoked in the page by a browser agent, through the browser's `document.modelContext` WebMCP interface, from application function calling, or through the MCP runtime using WebSocket and JSON-RPC.

For a direct browser trial, the project links to a hosted browser-agent demo that requires no installation or signup. External MCP hosts use the local runtime. The repository also provides a Codex map plugin that can be added from its community source:

```text
codex plugin marketplace add gaopengbin/cesium-mcp --ref main
codex plugin add cesium-map@cesium-community
```

## Setup and configuration

The repository publishes separate packages for the bridge, runtime, WebMCP adapter, contracts, development knowledge base, and browser-agent example. Choose the browser-agent path for a quick browser-based test, WebMCP for page-local browser tools, bridge plus application function calling for an existing web app, or the MCP runtime for external MCP hosts.

Usage statistics are enabled by default. Node-based runtime or development usage can be disabled with `CESIUM_TELEMETRY_DISABLED=1`. Browser integrations can disable telemetry by setting `globalThis.CESIUM_MCP_TELEMETRY_DISABLED = true` before browser initialization.

## Tools and capabilities

The exposed operations support:

- Animated and immediate camera changes, camera inspection, bounding-box navigation, saved viewpoints, and scene-state export.
- Markers, labels, glTF or GLB models, polygons, polylines, entity updates, deletion, batch creation, entity queries, and property inspection.
- Styled GeoJSON layers, primitive rendering for larger browser datasets, layer listing and schema inspection, visibility changes, styling, removal, and complete scene clearing.
- Basemap switching, feature highlighting, PNG screenshots returned as base64 data URLs, and distance or area measurement.

GeoJSON support covers Point, LineString, and Polygon layers. Layer and entity operations return structured success, error, and data fields; entity-creation tools return identifiers that can be used for later updates or removal.

## Limitations and notes

The local MCP runtime is needed only for external MCP hosts; browser-agent, WebMCP, and function-calling integrations run the same command layer inside the web application. Page-local viewpoints and scene state apply to the current page. Large GeoJSON datasets can use primitive rendering through `addGeoJsonPrimitive`, while the regular GeoJSON layer tool provides styled layer management.

The Codex map plugin is described as a community beta and requires a compatible MCP Apps host. Demonstration scenes use sample map content, and their example building heights and activity values are not presented as official or surveyed data.

_Full upstream README: https://allmcps.com/mcp/gaopengbin-cesium-mcp/readme_

