feat: add imagery-server with imagery_add, imagery_remove, imagery_list tools#22
Conversation
|
Could you add README.md for this mcp server to match other mcp servers, also list a new mcp server under those READMEs: https://github.com/CesiumGS/cesium-ai-integrations/blob/main/mcp/README.md |
|
There are some formatting issues: https://github.com/CesiumGS/cesium-ai-integrations/actions/runs/23234847210/job/67715534364?pr=22 |
|
Thanks for the review feedback! All issues have been addressed: Commit
Commit
All 3 CI checks are now passing. Thanks for the reminder about running |
| Rectangle, | ||
| } from "cesium"; | ||
|
|
||
| export interface ImageryAddResult extends MCPCommandResult { |
There was a problem hiding this comment.
move interfaces into separate file under types folder
|
Hi @MKartaviciute, all 6 comments addressed in this push:
Also updated the README to document |
…st tools Server-side (servers/imagery-server/): - 3 MCP tools: imagery_add, imagery_remove, imagery_list - 10 imagery provider types: UrlTemplate, WMS, WMTS, ArcGisMapServer, BingMaps, TileMapService, OpenStreetMap, SingleTile, Ion, MapboxStyle - Zod v4 schema validation for all tool inputs - WebSocket communication on port 3005 - 68 unit tests with 100%/96%/100%/100% coverage - ESLint and Prettier clean Client-side (test-applications/): - ImageryManager in client-core: handles imagery_add/remove/list commands - Supports both sync constructors and async fromUrl() factory patterns - Registered in cesium-app.ts alongside existing managers - web-app configured with MCP_IMAGERY_PORT=3005 Port fix: changed default from 3004 to 3005 to avoid conflict with Animation Server
- Add README.md for imagery-server with full tool documentation - Add imagery-server to mcp/README.md (table, getting started, architecture) - Add imagery-server to mcp/cesium-js/README.md (packages, tools, build, run, config) - Fix prettier formatting in imagery-manager.ts
…nd missing fields - Align switch cases with ImageryProviderTypeSchema full names - Extract interfaces to types/imagery-types.ts - Add 23 unit tests for imagery-manager - Add assetId and key fields to ImageryAddInputSchema - Populate url and ready in listImagery response - Add .env.example for imagery-server - Update README with assetId and key params
d6b7fc3 to
07ae80a
Compare
|
Hi @MKartaviciute 👋 I've rebased to the latest
All CI checks are green. Would appreciate a re-review when you have a moment. Thanks! 🙏 |
|
Hi @gaopengbin — I’ve left a few more comments. |
412c943 to
a01cfb3
Compare
- Use buildSuccessResponse helper in imagery-list for consistency - Fix removedCount reporting 1 on empty removeAll (now returns 0) - Make url field optional in schema (not required for IonImageryProvider) - Replace GoogleEarthEnterpriseImageryProvider fallback with proper fromMetadata implementation and add to getProviderTypeName detection - Add unit tests for empty removeAll and GoogleEarthEnterprise provider - Update affected tests for new response format and optional url
a01cfb3 to
1ab32ed
Compare
|
@gaopengbin Looks good!. Approved PR. |
Summary
Adds a new imagery-server MCP server that provides 3 tools for managing CesiumJS imagery layers through AI interactions.
imagery_server.mp4
New Tools
imagery_addimagery_removeimagery_listSupported Provider Types
UrlTemplate,WMS,WMTS,ArcGisMapServer,BingMaps,TileMapService,OpenStreetMap,SingleTile,Ion,MapboxStyleArchitecture
servers/imagery-server/): Full MCP server with Zod v4 schema validation, WebSocket communication on port 3005test-applications/):ImageryManagerin client-core handles all 3 commands in the browserfromUrl()factory patterns (CesiumJS 1.134+)MCP_IMAGERY_PORT=3005Quality
Files Changed
Server (19 new files):
servers/imagery-server/— package.json, tsconfig, vitest configsrc/index.ts— Server entry point (port 3005)src/schemas/— Zod v4 schemas for providers, tools, responsessrc/tools/— imagery-add, imagery-remove, imagery-list handlerssrc/utils/— Type definitionstest/— 4 test files covering schemas, add, remove, listClient (6 modified/new files):
client-core/src/managers/imagery-manager.ts— NEW: Browser-side handlerclient-core/src/cesium-app.ts— Register ImageryManagerweb-app/src/app.ts— Add Imagery Server to MCP server listweb-app/.env.example— Add MCP_IMAGERY_PORTweb-app/esbuild.config.cjs— Add port definePort Allocation