addGeoJsonLayer
Add a styled GeoJSON Point, LineString, or Polygon layer. Returns { success, data: { id, name, type, visible, color, dataRefId? }, message? }; use id with highlight.
Drive a CesiumJS 3D globe by asking — fly the camera, drop markers, draw routes, load GeoJSON and 3D Tiles, take a screenshot — without touching the Viewer's API.
LABSCO SUMMARY
Every tool returns a { success } object and hands back an entityId or layer id you carry into the next call, so a session builds up state you can query and clear rather than firing blind commands. The toolset split is the real economy here: 62 tools would swamp a model's context, so only four groups load by default and the rest come on by name when a request actually reaches for terrain, animation or 3D Tiles.
An MCP server that controls a CesiumJS Viewer: 62 command tools grouped into 12 toolsets, plus list_toolsets and enable_toolset for turning groups on as you need them. It ships its own browser Viewer and the bridge that runs the commands, so the default path is one package.
Node with npx, and nothing to sign up for on the default path: npx -y cesium-mcp-runtime starts the server and serves the built-in Viewer at http://localhost:9100/, with CesiumJS assets loading from the official Cesium CDN. Four core toolsets (30 tools) are on out of the box; set CESIUM_TOOLSETS=all to load every group. A separate cesium-mcp-bridge install is only for driving your own CesiumJS page rather than the bundled Viewer, and a Cesium Ion credential is optional, used only by the scene toolset.
One command — npx -y cesium-mcp-runtime
USE CASES
Name a landmark and it geocodes the place, flies the camera there, and drops a labelled marker you can move or remove afterwards — the demo's own 'fly to the Eiffel Tower and drop a red marker' in one pass.
Load a GeoJSON file as a styled layer, inspect its fields and feature count, then restyle or hide it — and switch to primitives when the dataset is large enough to slow the page down.
Draw the path from a list of coordinates, measure its length, and frame the whole thing in view before capturing it as an image to hand off.
Turn on the tiles toolset when a scene needs real elevation or a tileset — the model can discover the group and enable it mid-session rather than you configuring anything up front.
Save the current camera under a name, move somewhere else, and jump back — building up a set of viewpoints you can list and return to across the session.
Add many entities at once, find and inspect the ones you need by extent or type, then clear everything to start clean and see exactly how many layers and entities went away.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
addGeoJsonLayerAdd a styled GeoJSON Point, LineString, or Polygon layer. Returns { success, data: { id, name, type, visible, color, dataRefId? }, message? }; use id with highlight.
addGeoJsonPrimitiveRender GeoJSON as Cesium primitives for large browser datasets. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
addLabelAdd property-based text labels for GeoJSON features. Returns { success, data: { labelCount: integer }, message? }.
addMarkerAdd a point marker at geographic coordinates. Returns { success, data: { entityId }, message? }; keep entityId for removeEntity.
addModelAdd a glTF or GLB model at geographic coordinates. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
addPolygonDraw a polygon area from geographic coordinate tuples. Returns { success, data: { entityId }, message? }; keep entityId for removeEntity.
addPolylineDraw a path or route from geographic coordinate tuples. Returns { success, data: { entityId }, message? }; keep entityId for removeEntity.
batchAddEntitiesAdd multiple supported entities in one page operation. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
clearAllClear all layers, entities, animations, and trajectories from the scene. Returns { success, data: { removedLayers, removedEntities }, message? }.
enable_toolsetEnable a tool group to make its tools available. Call list_toolsets first to see available groups.
exportSceneExport the current view, layer, and entity state as JSON. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
flyToAnimate the camera to a geographic location. Use for visible navigation requested by the user. Returns { success: boolean, message?: string, error?: string }.
getEntityPropertiesRead the properties and graphics metadata for one entity. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
getLayerSchemaInspect fields, entity counts, and metadata for a layer. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
getViewGet the current camera position and orientation. Returns { success, data: { longitude, latitude, height, heading, pitch, roll }, message? }.
highlightHighlight one feature or every feature in a GeoJSON layer. Returns { success: boolean, message?: string, error?: string }.
list_toolsetsList all available tool groups and their enabled status. Call this to discover additional capabilities before asking the user to configure anything.
listLayersList all layers currently managed by the page. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
listSessionsList all connected browser sessions (ID and connection state) for multi-browser routing
listViewpointsList camera viewpoints saved in the current page. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
loadViewpointRestore a previously saved page-local camera state. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
measureMeasure distance or area between geographic coordinate tuples. Returns { success, data: { mode, value, unit, segments?, id? }, message? }.
queryEntitiesQuery page entities by name, type, or geographic extent. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
removeEntityRemove one entity created by an entity tool. Returns { success, message? } or { success: false, error } when entityId is not found.
removeLayerRemove a managed layer from the page. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
saveViewpointSave the current camera state under a page-local name. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
screenshotCapture the current Cesium map view as a PNG image. Returns { success, data: { dataUrl, width, height }, message? }; dataUrl is a base64 PNG.
setBasemapSwitch the visible basemap style. Returns { success, data: { basemap }, message? }.
setLayerVisibilityShow or hide a managed layer. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
setViewSet the camera position immediately without animation. Use for deterministic setup or instant view changes. Returns { success: boolean, message?: string, error?: string }.
updateEntityUpdate the position, appearance, label, or visibility of an entity. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
updateLayerStyleUpdate vector, imagery, primitive, or 3D Tiles styling for a layer. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
zoomToExtentAnimate the camera to a west/south/east/north bounding box. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
BEFORE YOU INSTALL
33 tools when we connected; the project documents 65. Default mode loads 4 core toolsets (30 tools) plus list_toolsets, enable_toolset and listSessions. Set CESIUM_TOOLSETS=all, or let the agent enable toolsets at runtime, to get the rest.
npx on PATH
INSTALLATION
npx -y cesium-mcp-runtime{
"mcpServers": {
"cesium": {
"command": "npx",
"args": [
"-y",
"cesium-mcp-runtime"
]
}
}
}npx -y cesium-mcp-runtime --transport http --port 3000Open the hosted demo at https://cesium-browser-agent.pages.dev/ and ask, for example, "Fly to the Eiffel Tower and drop a red marker" — no install, no signup and no browser API key
To run your own copy, fork the examples/browser-agent folder of https://github.com/gaopengbin/cesium-mcp and deploy it