cesium-mcp
デモ
https://github.com/user-attachments/assets/8a40565a-fcdd-47bf-ae67-bc870611c908
Related MCP server: QGIS MCP
パッケージとエントリポイント
モジュール | 役割 | ステータス | リンク |
cesium-mcp-bridge | プロトコル非依存のコマンドディスパッチャー (60以上のツール) | メインライン、活発に更新中 |
|
examples/browser-agent | ブラウザ専用 AI エージェント (推奨される開始点、バックエンド不要) | 推奨 | |
cesium-mcp-runtime | MCP サーバー (stdio + HTTP) | 安定版、更新は緩やか |
|
cesium-mcp-dev | コーディングアシスタント向けの CesiumJS API ナレッジベース | メンテナンス中 |
|
どれを使うべき? 個人のプロジェクトや手軽に試したい場合 → browser-agent。AI アシスタントを組み込んだ既存の Web アプリ → bridge + 独自の関数呼び出し。Claude Desktop / Cursor / Dify から呼び出す場合 → MCP runtime。
アーキテクチャ
flowchart LR
subgraph clients ["AI Drivers (pick one)"]
BA["Browser Agent\n(in the same page)"]
FC["Your web app\nfunction calling"]
MCP["Claude / Cursor / Dify\nvia MCP runtime"]
end
subgraph core ["cesium-mcp-bridge (browser)"]
B["60+ tools\nprotocol-agnostic dispatcher"]
C["CesiumJS Viewer"]
end
BA -- "in-page call" --> 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:#e2e8f0bridge が唯一の必須コンポーネントです。シナリオに合わせてドライバーを選択してください。すべて同じ 60 以上のツールを呼び出せます。
クイックスタート
パス 0 — 30 秒で試す (ブラウザエージェント、推奨)
ライブデモ を開き、OpenAI 互換の API キーを貼り付けて、次のように尋ねてください:
"エッフェル塔まで飛んで、赤いマーカーを置いて"
examples/browser-agent フォルダをフォークして、独自にデプロイしてください。
パス 1 — 独自の Web アプリに埋め込む (関数呼び出し)
npm install cesium-mcp-bridgeimport { 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).OpenAI 互換 API を使用した完全なループについては、examples/browser-agent/index.html を参照してください。
パス 2 — Claude Desktop / Cursor / Dify から使用する (MCP)
パス 1 と同様に bridge をインストールし、MCP ランタイムを起動します:
# stdio mode (Claude Desktop, VS Code, Cursor)
npx cesium-mcp-runtime
# HTTP mode (Dify, remote/cloud MCP clients)
npx cesium-mcp-runtime --transport http --port 3000MCP クライアントの設定:
{
"mcpServers": {
"cesium": {
"command": "npx",
"args": ["-y", "cesium-mcp-runtime"]
}
}
}58 種類の利用可能なツール
ツールは 12 のツールセット に整理されています。デフォルトモードでは 4 つのコアツールセット (約 31 ツール) が有効になります。すべてを使用するには CESIUM_TOOLSETS=all を設定するか、実行時に AI がツールセットを動的に検出してアクティブ化できるようにします。
i18n: ツールの説明はデフォルトで英語です。中国語にするには
CESIUM_LOCALE=zh-CNを設定してください。
ツールセット | ツール |
view (デフォルト) |
|
entity (デフォルト) |
|
layer (デフォルト) |
|
interaction (デフォルト) |
|
camera |
|
entity-ext |
|
animation |
|
tiles |
|
trajectory |
|
heatmap |
|
scene |
|
geolocation |
|
CesiumGS 公式 MCP サーバーとの関係:
camera、entity-ext、animationツールセットは、CesiumGS/cesium-mcp-server (Camera Server, Entity Server, Animation Server) の機能をこのプロジェクトの統合 bridge アーキテクチャにネイティブに融合させています。つまり、複数のプロセスを実行することなく、単一の MCP サーバーで公式の全機能と追加ツールを利用できます。
例
完全に動作するデモについては examples/minimal/ を参照してください。
開発
git clone https://github.com/gaopengbin/cesium-mcp.git
cd cesium-mcp
npm install
npm run buildバージョンポリシー
バージョン形式: {CesiumMajor}.{CesiumMinor}.{MCPPatch}
セグメント | 意味 | 例 |
| CesiumJS バージョンを追跡 — Cesium |
|
| MCP パッチ — 新機能、バグ修正、ドキュメントの独立したイテレーション |
|
CesiumJS が新しいマイナーバージョン (例: 1.140) をリリースした際は、それに応じて 1.140.0 に更新します。
関連プロジェクト
mapbox-mcp — Mapbox GL JS 用の AI 制御
openlayers-mcp — OpenLayers 用の AI 制御
スターの推移
ライセンス
Available Tools
41 toolsaddGeoJsonLayerB
Add a styled GeoJSON Point, LineString, or Polygon layer. Returns { success, data: { id, name, type, visible, color, dataRefId? }, message? }; use id with highlight.
Inputs: id, url, data, name, +4 more. Returns: data, error, message, success
addGeoJsonPrimitiveB
Render GeoJSON as Cesium primitives for large browser datasets. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: id, url, data, name, +7 more. Returns: data, error, message, success
addLabelC
Add property-based text labels for GeoJSON features. Returns { success, data: { labelCount: integer }, message? }.
Inputs: field (required), data, style, sessionId, +1 more. Returns: data, error, message, success
addMarkerA
Add a point marker at geographic coordinates. Returns { success, data: { entityId }, message? }; keep entityId for removeEntity.
Inputs: latitude (required), longitude (required), id, size, +3 more. Returns: data, error, message, success
addModelA
Add a glTF or GLB model at geographic coordinates. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: url (required), latitude (required), longitude (required), roll, +6 more. Returns: data, error, message, success
addPolygonA
Draw a polygon area from geographic coordinate tuples. Returns { success, data: { entityId }, message? }; keep entityId for removeEntity.
Inputs: coordinates (required), color, label, opacity, +4 more. Returns: data, error, message, success
addPolylineA
Draw a path or route from geographic coordinate tuples. Returns { success, data: { entityId }, message? }; keep entityId for removeEntity.
Inputs: coordinates (required), color, label, width, +2 more. Returns: data, error, message, success
batchAddEntitiesC
Add multiple supported entities in one page operation. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: entities (required), sessionId. Returns: data, error, message, success
clearAllADestructiveIdempotent
Clear all layers, entities, animations, and trajectories from the scene. Returns { success, data: { removedLayers, removedEntities }, message? }.
Inputs: sessionId. Returns: data, error, message, success
connectCesiumMapD
Internal map app transport: connect.
Inputs: sessionId (required).
deleteResourceBDestructiveIdempotent
Delete one session-scoped resource by resourceId.
Inputs: resourceId (required), sessionId. Returns: removed
disconnectCesiumMapC
Internal map app transport: disconnect.
Inputs: token (required), sessionId (required).
enable_toolsetAIdempotent
Enable a tool group to make its tools available. Call list_toolsets first to see available groups.
Inputs: toolset (required).
exchangeCesiumMapD
Internal map app transport: exchange.
Inputs: token (required), sessionId (required), results.
exportSceneARead-onlyIdempotent
Export the current view, layer, and entity state as JSON. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: sessionId. Returns: data, error, message, success
flyToAIdempotent
Animate the camera to a geographic location. Use for visible navigation requested by the user. Returns { success: boolean, message?: string, error?: string }.
Inputs: latitude (required), longitude (required), pitch, height, +3 more. Returns: error, message, success
getEntityPropertiesARead-onlyIdempotent
Read the properties and graphics metadata for one entity. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: entityId (required), sessionId. Returns: data, error, message, success
getLayerSchemaARead-onlyIdempotent
Inspect fields, entity counts, and metadata for a layer. For vector/3D Tiles, metadata.tileStyle returns the applied style expressions. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: layerId (required), sessionId. Returns: data, error, message, success
getSelectedTileFeatureARead-onlyIdempotent
Read the last clicked managed vector/3D Tiles feature attributes and layerId. Use updateLayerStyle with that layerId to style it. Returns feature=null when nothing is selected; metadata is a snapshot, not a whole-dataset query. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: sessionId. Returns: data, error, message, success
getViewARead-onlyIdempotent
Get the current camera position and orientation. Returns { success, data: { longitude, latitude, height, heading, pitch, roll }, message? }.
Inputs: sessionId. Returns: data, error, message, success
highlightAIdempotent
Highlight one feature or every feature in a GeoJSON layer. Returns { success: boolean, message?: string, error?: string }.
Inputs: clear, color, layerId, sessionId, +1 more. Returns: error, message, success
listLayersARead-onlyIdempotent
List all layers currently managed by the page. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: sessionId. Returns: data, error, message, success
listResourcesARead-onlyIdempotent
List resource metadata for the current browser or MCP session without returning payloads.
Inputs: sessionId. Returns: resources
listSessionsARead-onlyIdempotent
List all connected browser sessions (ID and connection state) for multi-browser routing
Inputs: no named parameters.
list_toolsetsARead-onlyIdempotent
List all available tool groups and their enabled status. Call this to discover additional capabilities before asking the user to configure anything.
Inputs: no named parameters.
listViewpointsARead-onlyIdempotent
List camera viewpoints saved in the current page. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: sessionId. Returns: data, error, message, success
loadViewpointAIdempotent
Restore a previously saved page-local camera state. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: name (required), duration, sessionId. Returns: data, error, message, success
measureA
Measure distance or area between geographic coordinate tuples. Returns { success, data: { mode, value, unit, segments?, id? }, message? }.
Inputs: mode (required), positions (required), id, sessionId, +1 more. Returns: data, error, message, success
openCesiumMapCesium MapARead-only
Open an interactive 3D map beside the conversation. Pass the returned sessionId to every map tool. Call once to open the map, then wait until its browser session connects before sending commands. Optionally reopen a known session.
Inputs: sessionId.
queryEntitiesARead-onlyIdempotent
Query page entities by name, type, or geographic extent. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: bbox, name, type, sessionId. Returns: data, error, message, success
removeEntityADestructiveIdempotent
Remove one entity created by an entity tool. Returns { success, message? } or { success: false, error } when entityId is not found.
Inputs: entityId (required), sessionId. Returns: error, message, success
removeLayerADestructiveIdempotent
Remove a managed layer from the page. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: id (required), sessionId. Returns: data, error, message, success
saveViewpointAIdempotent
Save the current camera state under a page-local name. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: name (required), sessionId. Returns: data, error, message, success
screenshotARead-onlyIdempotent
Capture the current Cesium map view as a PNG image. Returns { success, data: { dataUrl, width, height }, message? }; dataUrl is a base64 PNG.
Inputs: sessionId. Returns: data, error, message, success
setBasemapAIdempotent
Switch the visible basemap style. Returns { success, data: { basemap }, message? }.
Inputs: url, token, basemap, sessionId. Returns: data, error, message, success
setLayerVisibilityAIdempotent
Show or hide a managed layer. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: id (required), visible (required), sessionId. Returns: data, error, message, success
setViewAIdempotent
Set the camera position immediately without animation. Use for deterministic setup or instant view changes. Returns { success: boolean, message?: string, error?: string }.
Inputs: latitude (required), longitude (required), roll, pitch, +3 more. Returns: error, message, success
storeResourceA
Store GeoJSON, CZML, or JSON once and return a compact resourceId for later tool calls.
Inputs: data (required), kind (required), sessionId, resourceId, +1 more. Returns: kind, createdAt, expiresAt, sizeBytes, +1 more
updateEntityBIdempotent
Update the position, appearance, label, visibility, or polygon extrusion height of an entity, including data-source entities. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: entityId (required), show, color, label, +4 more. Returns: data, error, message, success
updateLayerStyleBIdempotent
Update vector, imagery, primitive, or 3D Tiles styling for a layer. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: layerId (required), sessionId, tileStyle, labelStyle, +3 more. Returns: data, error, message, success
zoomToExtentAIdempotent
Animate the camera to a west/south/east/north bounding box. Returns { success: boolean, data?: unknown, message?: string, error?: string }.
Inputs: bbox (required), duration, sessionId. Returns: data, error, message, success
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 41 tools
Most tools target clearly distinct resources or actions, and descriptions distinguish similar operations such as entity vs. layer updates. However, addGeoJsonPrimitive vs. addGeoJsonLayer overlap in purpose, and exposed internal transport tools like connectCesiumMap/exchangeCesiumMap could be confused with openCesiumMap.
The set is predominantly consistent camelCase verb_noun naming (addMarker, updateLayerStyle, removeEntity, flyTo). Minor deviations include snake_case list_toolsets/enable_toolset and a few noun-only or verb-only names like screenshot, highlight, and measure.
At 41 tools, the surface is heavy for a single MCP server even though the Cesium map domain is broad. Several tools are internal transport or toolset-management utilities, which adds surface area beyond the core mapping workflow.
Coverage is broad: sessions, layers, resources, viewpoints, camera control, entity CRUD, styling, measurement, screenshots, basemap, export, and toolset discovery are all present. Minor gaps remain, notably no creation tools for animations/trajectories despite clearAll referencing them, and no import counterpart to exportScene.
Maintenance
Related MCP Connectors
Geospatial AI MCP server — satellite imagery, embeddings, weather, GNS governance
Real-time planetary signal engine and Model Context Protocol (MCP) server for autonomous AI agents.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Geocoding, routing, isochrones, traffic, weather, and place search for AI agents. 19 MCP tools.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables users to search for geographic locations and visualize them on an interactive 3D globe powered by CesiumJS and OpenStreetMap. It provides tools for geocoding addresses and rendering maps with specific bounding boxes through the Model Context Protocol.MIT
- AlicenseAqualityDmaintenanceConnect QGIS to Claude AI through the Model Context Protocol (MCP), enabling Claude to directly control QGIS — manage layers, edit features, run processing algorithms, render maps, and more.1001MIT
- AlicenseNot gradedqualityDmaintenanceConnects AI assistants (Claude, Cursor, etc.) to QGIS 4.x via MCP, enabling natural language-driven GIS workflows through 37+ tools, including data loading, processing, and spatial analysis.GPL 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform geospatial analysis, spatial data processing, vector and raster operations, coordinate transformations, spatial statistics, mapping, and access to climate, satellite, and other geospatial data through MCP-compatible clients.MIT