cesium-mcp-dev

v1.139.2
io.github.gaopengbin/cesium-mcp-dev Checked 8 hours ago Published 8 months ago

CesiumJS API docs, code generation and development tools for IDE AI assistants.

cesium-mcp-dev helps AI coding assistants (GitHub Copilot, Cursor, Claude Code, etc.) write better CesiumJS code by providing API documentation lookup, code snippet generation, and Entity configuration building -- all through the MCP protocol. The stable stdio server uses MCP SDK v2 and negotiates both MCP 2025-11-25 and 2026-07-28 clients. Query Cesium API documentation by class name, method, or property.

Summary extracted from the README.

cesium-mcp-dev

Usage statistics are on by default, with a startup notice on stderr. Set CESIUM_TELEMETRY_DISABLED=1, DO_NOT_TRACK=1, or pass --no-telemetry to disable. Collected fields and privacy.

English | 中文

MCP Server for IDE AI assistants -- Cesium API documentation, code generation, and Entity builder.

npm version license

What is this?

cesium-mcp-dev helps AI coding assistants (GitHub Copilot, Cursor, Claude Code, etc.) write better CesiumJS code by providing API documentation lookup, code snippet generation, and Entity configuration building -- all through the MCP protocol.

The stable stdio server uses MCP SDK v2 and negotiates both MCP 2025-11-25 and 2026-07-28 clients.

IDE AI Assistant <--MCP stdio--> cesium-mcp-dev --> API docs, code snippets, Entity configs

Install & Run

npx -y cesium-mcp-dev

IDE Configuration

VS Code (Copilot)

In .vscode/mcp.json:

{
  "servers": {
    "cesium-dev": {
      "command": "npx",
      "args": ["cesium-mcp-dev"]
    }
  }
}

Cursor

In .cursor/mcp.json:

{
  "mcpServers": {
    "cesium-dev": {
      "command": "npx",
      "args": ["cesium-mcp-dev"]
    }
  }
}

Claude Desktop

{
  "mcpServers": {
    "cesium-dev": {
      "command": "npx",
      "args": ["cesium-mcp-dev"]
    }
  }
}

MCP Tools (3)

cesium_api_lookup

Query Cesium API documentation by class name, method, or property.

Input: "Viewer"
Output: Constructor signature, properties, methods, and usage examples

Covered classes: Viewer, Entity, Camera, Cartesian3, Color, GeoJsonDataSource, ImageryLayer, Cesium3DTileset, Material, ScreenSpaceEventHandler, flyTo, setView (12 classes)

cesium_code_gen

Generate Cesium code from natural language descriptions.

Input: "Add a red point marker at Tiananmen Square"
Output: Complete TypeScript code snippet ready to use

Built-in snippets: fly to location, add marker, load GeoJSON, draw polyline, draw polygon, load 3D Tiles, switch basemap, click handler, screenshot, heatmap, trajectory animation (11 scenarios)

cesium_entity_builder

Build Entity configurations interactively by specifying type and properties.

Input: type: "polygon", position: {lon: 116.4, lat: 39.9}, color: "#ff6600"
Output: Complete Entity definition with material, style, and ground clamping

Supported types: point, billboard, label, polyline, polygon, model, ellipse, box (8 types)

Example Interactions

AI assistant asks: "How do I load a 3D Tiles model from Cesium Ion?"

The assistant calls cesium_api_lookup with "Cesium3DTileset", gets the API reference, then calls cesium_code_gen with the user's specific requirements to generate ready-to-use code.

AI assistant asks: "Create an Entity for a semi-transparent blue polygon"

The assistant calls cesium_entity_builder with type: "polygon", color: "#0066ff", opacity: 0.5 and gets complete code output.

Compatibility

cesium-mcp-dev Cesium
1.145.x ~1.145.0

License

MIT