Skip to main content
Glama

演示

https://github.com/user-attachments/assets/8a40565a-fcdd-47bf-ae67-bc870611c908

软件包

软件包

描述

npm

cesium-mcp-bridge

浏览器 SDK — 嵌入到您的 CesiumJS 应用中,通过 WebSocket 接收指令

npm

cesium-mcp-runtime

MCP 服务器 (stdio + HTTP) — 58 个工具 (12 个工具集) + 2 个资源,支持动态发现

npm

cesium-mcp-dev

IDE MCP 服务器 — 为编码助手提供 CesiumJS API 辅助

npm

架构

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-bridge
import { 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 3000

3. 连接您的 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 (默认)

flyTo, setView, getView, zoomToExtent, saveViewpoint, loadViewpoint, listViewpoints, exportScene

entity (默认)

addMarker, addLabel, addModel, addPolygon, addPolyline, updateEntity, removeEntity, batchAddEntities, queryEntities, getEntityProperties

layer (默认)

addGeoJsonLayer, listLayers, removeLayer, clearAll, setLayerVisibility, updateLayerStyle, getLayerSchema, setBasemap

interaction (默认)

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, loadTerrain, loadImageryService, loadCzml, loadKml

trajectory

playTrajectory

heatmap

addHeatmap

scene

setSceneOptions, setPostProcess

geolocation

geocode

与 CesiumGS 官方 MCP 服务器的关系cameraentity-extanimation 工具集原生融合了 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}

段落

含义

示例

1.139

跟踪 CesiumJS 版本 — 基于 Cesium ~1.139.0 构建和测试

1.139.8 → Cesium 1.139

.8

MCP 补丁 — 用于新工具、错误修复、文档的独立迭代

1.139.71.139.8

当 CesiumJS 发布新的次要版本(例如 1.140)时,我们将相应地升级版本号:1.140.0

相关项目

Star 历史

许可证

MIT

Install Server
A
security – no known vulnerabilities
A
license - permissive license
B
quality - B tier

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