cesium-mcp
演示
https://github.com/user-attachments/assets/8a40565a-fcdd-47bf-ae67-bc870611c908
软件包
软件包 | 描述 | npm |
浏览器 SDK — 嵌入到您的 CesiumJS 应用中,通过 WebSocket 接收指令 | ||
MCP 服务器 (stdio + HTTP) — 58 个工具 (12 个工具集) + 2 个资源,支持动态发现 | ||
IDE MCP 服务器 — 为编码助手提供 CesiumJS API 辅助 |
架构
flowchart LR
subgraph clients ["AI Clients"]
A["Claude / Cursor\nVS Code"]
D["Dify / n8n\nRemote MCP"]
end
subgraph server ["cesium-mcp-runtime\n(Node.js)"]
R["MCP Server\n58 tools · 12 toolsets"]
end
subgraph browser ["Browser"]
B["cesium-mcp-bridge"]
C["CesiumJS Viewer"]
end
A -- "stdio / MCP" --> R
D -- "Streamable HTTP" --> R
R -- "WebSocket\nJSON-RPC" --> B
B --> C
style clients fill:#1e293b,stroke:#528bff,color:#e2e8f0
style server fill:#1e293b,stroke:#155EEF,color:#e2e8f0
style browser fill:#1e293b,stroke:#12B76A,color:#e2e8f0快速开始
1. 在您的 CesiumJS 应用中安装 bridge
npm install cesium-mcp-bridgeimport { CesiumBridge } from 'cesium-mcp-bridge';
const bridge = new CesiumBridge(viewer);2. 启动 MCP 运行时
# stdio mode (default — for Claude Desktop, VS Code, Cursor)
npx cesium-mcp-runtime
# HTTP mode (for Dify, remote/cloud MCP clients)
npx cesium-mcp-runtime --transport http --port 30003. 连接您的 AI 智能体
添加到您的 MCP 客户端配置中(例如 Claude Desktop):
{
"mcpServers": {
"cesium": {
"command": "npx",
"args": ["-y", "cesium-mcp-runtime"]
}
}
}现在您可以问 AI:“飞到埃菲尔铁塔并添加一个红色标记”
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(相机服务器、实体服务器、动画服务器)的功能,并集成到本项目的统一 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 控制
Star 历史
许可证
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gaopengbin/cesium-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server