
This is actually two MCP servers in one package. The first gives your AI assistant a CesiumJS API knowledge base for writing 3D mapping code, complete with docs and code generation for the Cesium library. The second, cesium-mcp-runtime, exposes 58 live tools organized into 12 toolsets (view, entity, layer, animation, 3D tiles) that let the AI directly manipulate a running Cesium viewer in your browser. You can run it via stdio for Claude Desktop and Cursor, or HTTP mode for Dify. The bridge architecture is protocol-agnostic, so you can also skip MCP entirely and wire the same 58 tools into your own function calling setup. Covers everything from flyTo and marker placement to heatmaps, CZML loading, and post-processing effects.
Public tool metadata for what this MCP can expose to an agent.
flyTo飞行到指定经纬度位置(带动画过渡)6 params飞行到指定经纬度位置(带动画过渡)
durationnumberheadingnumberheightnumberlatitudenumberlongitudenumberpitchnumberaddGeoJsonLayer添加 GeoJSON 图层到地图(支持 Point/Line/Polygon,可配置颜色/分级/分类渲染)4 params添加 GeoJSON 图层到地图(支持 Point/Line/Polygon,可配置颜色/分级/分类渲染)
dataobjectidstringnamestringstyleobjectaddLabel为 GeoJSON 要素添加文本标注(显示属性值)3 params为 GeoJSON 要素添加文本标注(显示属性值)
dataobjectfieldstringstyleobjectaddHeatmap添加热力图图层(基于 GeoJSON 点数据生成热力可视化)2 params添加热力图图层(基于 GeoJSON 点数据生成热力可视化)
dataobjectradiusnumberremoveLayer从地图上移除指定图层(按图层ID)1 params从地图上移除指定图层(按图层ID)
idstringsetBasemap切换底图风格(暗色/卫星影像/标准)1 params切换底图风格(暗色/卫星影像/标准)
basemapstringdark · satellite · standardscreenshot截取当前地图视图(返回 base64 PNG)截取当前地图视图(返回 base64 PNG)
No parameter schema in public metadata yet.
highlight高亮指定图层的要素3 params高亮指定图层的要素
colorstringfeatureIndexnumberlayerIdstringsetView瞬间切换到指定经纬度视角(无动画)6 params瞬间切换到指定经纬度视角(无动画)
headingnumberheightnumberlatitudenumberlongitudenumberpitchnumberrollnumbergetView获取当前相机视角信息(经纬度、高度、角度)获取当前相机视角信息(经纬度、高度、角度)
No parameter schema in public metadata yet.
zoomToExtent缩放到指定地理范围5 params缩放到指定地理范围
durationnumbereastnumbernorthnumbersouthnumberwestnumberaddMarker在指定经纬度添加标注点,返回 layerId 供后续操作6 params在指定经纬度添加标注点,返回 layerId 供后续操作
colorstringidstringlabelstringlatitudenumberlongitudenumbersizenumberaddPolyline在地图上添加折线(路径、线段),返回 entityId5 params在地图上添加折线(路径、线段),返回 entityId
clampToGroundbooleancolorstringcoordinatesarraylabelstringwidthnumberaddPolygon在地图上添加多边形区域(面积、边界),返回 entityId7 params在地图上添加多边形区域(面积、边界),返回 entityId
clampToGroundbooleancolorstringcoordinatesarrayextrudedHeightnumberlabelstringopacitynumberoutlineColorstringaddModel在指定经纬度放置 3D 模型(glTF/GLB),返回 entityId9 params在指定经纬度放置 3D 模型(glTF/GLB),返回 entityId
headingnumberheightnumberlabelstringlatitudenumberlongitudenumberpitchnumberrollnumberscalenumberurlstringupdateEntity更新已有实体的属性(位置、颜色、标签、缩放、可见性)6 params更新已有实体的属性(位置、颜色、标签、缩放、可见性)
colorstringentityIdstringlabelstringpositionobjectscalenumbershowbooleanremoveEntity移除单个实体(通过 entityId)1 params移除单个实体(通过 entityId)
entityIdstringsetLayerVisibility设置图层可见性2 params设置图层可见性
idstringvisiblebooleanlistLayers获取当前所有图层列表(含 ID、名称、类型、可见性)获取当前所有图层列表(含 ID、名称、类型、可见性)
No parameter schema in public metadata yet.
updateLayerStyle修改已有图层的样式(颜色、透明度、标注样式等)3 params修改已有图层的样式(颜色、透明度、标注样式等)
labelStyleobjectlayerIdstringlayerStyleobjectplayTrajectory播放移动轨迹动画6 params播放移动轨迹动画
coordinatesarraydurationSecondsnumberidstringlabelstringnamestringtrailSecondsnumberload3dTiles加载 3D Tiles 数据集(如建筑白膜、城市模型)5 params加载 3D Tiles 数据集(如建筑白膜、城市模型)
heightOffsetnumberidstringmaximumScreenSpaceErrornumbernamestringurlstringloadTerrain加载或切换地形(平坦/ArcGIS/CesiumIon/自定义 URL)3 params加载或切换地形(平坦/ArcGIS/CesiumIon/自定义 URL)
cesiumIonAssetIdnumberproviderstringflat · arcgis · cesiumionurlstringloadImageryService加载影像服务图层(WMS/WMTS/XYZ/ArcGIS MapServer)6 params加载影像服务图层(WMS/WMTS/XYZ/ArcGIS MapServer)
idstringlayerNamestringnamestringopacitynumberserviceTypestringwms · wmts · xyz · arcgis_mapserverurlstringlookAtTransform环绕式相机注视某位置(ENU变换 + 朝向/俯仰/距离)6 params环绕式相机注视某位置(ENU变换 + 朝向/俯仰/距离)
headingnumberheightnumberlatitudenumberlongitudenumberpitchnumberrangenumberstartOrbit开始相机环绕当前中心旋转2 params开始相机环绕当前中心旋转
directionstringclockwise · counterclockwisedefault: clockwisespeednumberstopOrbit停止环绕动画停止环绕动画
No parameter schema in public metadata yet.
setCameraOptions配置相机控制器(启用/禁用旋转、缩放、倾斜等)5 params配置相机控制器(启用/禁用旋转、缩放、倾斜等)
enableLookbooleanenableRotatebooleanenableTiltbooleanenableTranslatebooleanenableZoombooleanaddBillboard在指定位置添加图片图标6 params在指定位置添加图片图标
colorstringidstringimagestringnamestringpositionobjectscalenumberaddBox添加带尺寸和材质的3D盒体8 params添加带尺寸和材质的3D盒体
dimensionsobjectidstringmaterialvaluenamestringorientationobjectoutlinebooleanoutlineColorstringpositionobjectaddCorridor添加走廊(带宽度的路径)6 params添加走廊(带宽度的路径)
extrudedHeightnumberidstringmaterialvaluenamestringpositionsarraywidthnumberaddCylinder添加圆柱体或圆锥体9 params添加圆柱体或圆锥体
bottomRadiusnumberidstringlengthnumbermaterialvaluenamestringoutlinebooleanoutlineColorstringpositionobjecttopRadiusnumberaddEllipse添加椭圆9 params添加椭圆
extrudedHeightnumberidstringmaterialvaluenamestringoutlinebooleanoutlineColorstringpositionobjectsemiMajorAxisnumbersemiMinorAxisnumberaddRectangle按地理范围添加矩形8 params按地理范围添加矩形
coordinatesobjectextrudedHeightnumberheightnumberidstringmaterialvaluenamestringoutlinebooleanoutlineColorstringaddWall沿路径添加墙体8 params沿路径添加墙体
idstringmaterialvaluemaximumHeightsarrayminimumHeightsarraynamestringoutlinebooleanoutlineColorstringpositionsarraycreateAnimation创建基于时间的路径动画(实体沿路径运动)7 params创建基于时间的路径动画(实体沿路径运动)
entityIdstringloopbooleanmodelstringmodelScalenumberpathColorstringpathWidthnumberwaypointsarraycontrolAnimation播放或暂停动画2 params播放或暂停动画
actionstringplay · pauseentityIdstringremoveAnimation删除动画实体1 params删除动画实体
entityIdstringlistAnimations列出所有活跃的动画列出所有活跃的动画
No parameter schema in public metadata yet.
updateAnimationPath更新动画路径的可视属性4 params更新动画路径的可视属性
colorstringentityIdstringshowbooleanwidthnumbertrackEntity相机追踪实体1 params相机追踪实体
entityIdstringcontrolClock配置Cesium时钟(时间范围、速度、动画状态)6 params配置Cesium时钟(时间范围、速度、动画状态)
clockRangestringUNBOUNDED · CLAMPED · LOOP_STOPcurrentTimestringmultipliernumbershouldAnimatebooleanstartTimestringstopTimestringsetGlobeLighting启用/禁用地球光照和大气效果4 params启用/禁用地球光照和大气效果
enableFogbooleanenableGroundAtmospherebooleanenableLightingbooleanenableSkyAtmospherebooleanA protocol-agnostic Cesium AI control runtime for MCP, WebMCP, function calling, and browser agents
cesium-mcp-bridge is the protocol-agnostic Cesium command executor. Separate adapters expose it to browser-only agents, WebMCP browser agents, function calling, or MCP — your choice.
Four integration paths: Browser Agent (simplest, zero backend) · WebMCP (page-local browser tools) · function calling (embed in your web app) · MCP runtime (Claude Desktop / Cursor / Dify)
The local Runtime is only required for external MCP hosts. Browser Agent, WebMCP, and function-calling integrations execute the same commands directly in the web application.
Try it now — open the live browser demo, no install, no signup.
https://github.com/user-attachments/assets/8a40565a-fcdd-47bf-ae67-bc870611c908
| Module | Role | Status | Links |
|---|---|---|---|
| cesium-mcp-contracts | Transport-neutral names, descriptions, and JSON Schemas for browser tools | New shared layer | source |
| cesium-mcp-bridge | Protocol- and transport-free Cesium command executor (60+ commands) | Mainline, actively iterated | |
| cesium-mcp-webmcp | One-package Viewer integration plus the native document.modelContext adapter | Browser integration | source |
| examples/webmcp-integration | Focused npm + Vite integration without a chat UI or MCP server | Developer example | example |
| examples/browser-agent | Browser-only AI agent with automatic WebMCP exposure | Recommended | example · live demo |
| cesium-mcp-runtime | MCP server (stdio + HTTP) | Stable MCP SDK v2 | |
| cesium-mcp-dev | CesiumJS API knowledge base for coding assistants | Maintained |
Which one? Personal project or quick try → browser-agent. Let a compatible browser agent discover page-local Cesium tools → WebMCP. Existing web app embedding an AI assistant → bridge + your own function calling. Calling from Claude Desktop / Cursor / Dify → MCP runtime.
flowchart LR
subgraph clients ["AI Drivers (pick one)"]
BA["Browser Agent\n(in the same page)"]
WM["WebMCP Agent\n(browser-provided)"]
FC["Your web app\nfunction calling"]
MCP["Claude / Cursor / Dify\nvia MCP runtime"]
end
CONTRACTS["cesium-mcp-contracts\ntool definitions"]
WEBMCP["cesium-mcp-webmcp\nnative adapter"]
subgraph core ["cesium-mcp-bridge (browser)"]
B["60+ tools\nprotocol-agnostic dispatcher"]
C["CesiumJS Viewer"]
end
CONTRACTS -.-> BA
CONTRACTS -.-> WEBMCP
BA -- "in-page call" --> B
WM -- "document.modelContext" --> WEBMCP
WEBMCP --> B
FC -- "in-page call" --> B
MCP -- "WebSocket / JSON-RPC" --> B
B --> C
style clients fill:#1e293b,stroke:#528bff,color:#e2e8f0
style core fill:#1e293b,stroke:#12B76A,color:#e2e8f0
The bridge remains the execution core, while contracts and protocol adapters stay separate. Pick whichever driver matches your scenario — they all reach the same Cesium command layer. On WebMCP-capable browsers, cesium-mcp-webmcp can expose 61 browser-safe commands in 12 selectable toolsets through document.modelContext without adding an MCP transport or backend server.
CesiumGS's newer AI work is split between cesiumjs-ai-starter-app, a deployable application template, and cesiumjs-skills, development-time guidance for coding agents. The earlier cesium-ai-integrations repository contains the first-generation experiments and community contributions that helped explore this space.
cesium-mcp is an independent runtime and integration toolkit, not a continuation of the earlier WebSocket-only reference architecture. Its reusable Bridge and shared contracts work unchanged across browser-only function calling, native WebMCP, standard MCP over stdio/HTTP, and embedded desktop shells. A local WebSocket bridge is used only when an external MCP host needs to reach a live browser Viewer; it is not required for the hosted demo or page-local integrations.
The project author was an early contributor to CesiumGS/cesium-ai-integrations, contributing the Imagery server, Terrain server, and unified MCP Gateway. Those experiments informed this project's multi-protocol architecture, while the implementation, release lifecycle, and roadmap remain independent.
Open the live demo and ask—the hosted model is ready without a browser API key:
"Fly to the Eiffel Tower and drop a red marker"
Fork the examples/browser-agent folder to deploy your own.
The browser-agent example automatically registers all 61 browser-safe page tools when document.modelContext is available. Its built-in chat uses automatic toolset routing to keep each normal request at 20 tools or fewer, while still offering explicit core, single-toolset, and all-61 modes:
npm run build -w packages/cesium-mcp-bridge
npm run build -w packages/cesium-mcp-webmcp
npx serve . -l 4173
Open http://localhost:4173/examples/browser-agent/, click Start, then inspect or execute the tools in DevTools → Application → WebMCP. Enable #enable-webmcp-testing and #devtools-webmcp-support in chrome://flags for local testing.
Application developers install the adapter separately. End users only open the integrated website; they do not install npm packages or run an MCP server.
npm install cesium-mcp-webmcp
import { registerCesiumViewerWebMcp } from 'cesium-mcp-webmcp/viewer'
const registration = await registerCesiumViewerWebMcp(viewer, {
toolsets: 'all',
excludeTools: ['geocode'], // add your own browser geocoder to expose this tool
})
// Later, if the page is unmounted:
registration.unregister()
See the WebMCP adapter API for custom integrations. For a complete npm + Vite application, start from the WebMCP integration example.
npm install cesium-mcp-bridge
import { CesiumBridge } from 'cesium-mcp-bridge';
const bridge = new CesiumBridge(viewer);
// Then: send the bridge's tool schema to any LLM that supports function/tool calling,
// route the model's tool calls to bridge.execute(name, params).
See examples/browser-agent/index.html for a complete loop with OpenAI-compatible APIs.
Ordinary MCP users need only the Runtime package. It includes the browser Bridge bundle and a built-in Viewer at http://localhost:9100/; install cesium-mcp-bridge separately only when integrating a custom page.
# Stable channel — npm latest, MCP SDK v2
npx -y cesium-mcp-runtime
# HTTP mode
npx -y cesium-mcp-runtime --transport http --port 3000
The stable release serves existing MCP 2025-11-25 clients and the new
2026-07-28 protocol from the same stdio/HTTP entry. It uses the stable
TypeScript SDK v2 and passes the official server-stateless conformance
scenario (28/28).
MCP client config:
{
"mcpServers": {
"cesium": {
"command": "npx",
"args": ["-y", "cesium-mcp-runtime"]
}
}
}
Tools are organized into 12 toolsets. Default mode enables 4 core toolsets (30 tools). Set CESIUM_TOOLSETS=all for everything, or let the AI discover and activate toolsets dynamically at runtime.
Canonical contracts: Tool descriptions default to English; set
CESIUM_LOCALE=zh-CNfor Chinese. Titles, behavior annotations, localized descriptions, defaults, input validation, MCP output schemas, and structured results all come from the shared JSON Schemas incesium-mcp-contracts. Textcontentremains available for older clients.
| Toolset | Tools |
|---|---|
| view (default) | flyTo, setView, getView, zoomToExtent, saveViewpoint, loadViewpoint, listViewpoints, exportScene |
| entity (default) | addMarker, addLabel, addModel, addPolygon, addPolyline, updateEntity, removeEntity, batchAddEntities, queryEntities, getEntityProperties |
| layer (default) | addGeoJsonLayer, addGeoJsonPrimitive, listLayers, removeLayer, clearAll, setLayerVisibility, updateLayerStyle, getLayerSchema, setBasemap |
| interaction (default) | screenshot, highlight, measure |
| camera | lookAtTransform, startOrbit, stopOrbit, setCameraOptions |
| entity-ext | addBillboard, addBox, addCorridor, addCylinder, addEllipse, addRectangle, addWall |
| animation | createAnimation, controlAnimation, removeAnimation, listAnimations, updateAnimationPath, trackEntity, controlClock, setGlobeLighting |
| tiles | load3dTiles, load3dGaussianSplat, loadTerrain, loadImageryService, loadCzml, loadKml, setEdgeDisplayMode |
| trajectory | playTrajectory |
| heatmap | addHeatmap |
| scene | setSceneOptions, setPostProcess, setIonToken (Runtime only) |
| geolocation | geocode |
See examples/minimal/ for a complete working demo.
git clone https://github.com/gaopengbin/cesium-mcp.git
cd cesium-mcp
npm install
npm run build
npm test
npm run test:contracts
npm run test:schema-compat
npm run test:routing
npm run test:model-tools
npm run eval:model-tools
npm run test:e2e:packed
test:contracts is the focused parity gate for MCP Runtime metadata, WebMCP registration, Function Calling definitions, provider Schema portability, and the 60-tool Bridge Executor Registry. Run test:schema-compat directly for actionable OpenAI, Azure, VS Code MCP, and WebMCP Schema diagnostics.
test:routing evaluates bilingual and multi-intent Browser Agent requests across all 12 toolsets, checking required-tool recall and the 20-tool automatic-routing budget.
test:model-tools verifies the provider-neutral multi-turn scoring harness. eval:model-tools performs a no-network routing preflight by default; add an explicit provider and --live to measure real tool choice, argument validity, and required-tool completion. See Model Tool Evaluation.
test:e2e:packed builds npm tarballs, installs them in a clean temporary project, opens the real Cesium Viewer, and verifies a Runtime-WebSocket-Bridge command round trip.
Version format: {CesiumMajor}.{CesiumMinor}.{MCPPatch}
| Segment | Meaning | Example |
|---|---|---|
1.143 | Tracks CesiumJS version — built & tested against Cesium ~1.143.0 | 1.143.0 → Cesium 1.143 |
.x | MCP patch — independent iterations for new tools, bug fixes, docs | 1.143.0 → 1.143.1 |
Official CesiumJS releases are reviewed before the compatibility baseline is bumped; the project does not automatically claim support for a newer release without Bridge verification.
This project recognizes LINUX DO as a community for open-source exchange, technical discussion, and developer feedback.