2 Commits

Author SHA1 Message Date
31dff49351 Fix colormap parsing against live GIBS API
Two bugs found via headless Claude CLI integration testing:

1. Colormap ID extraction: _detect_colormap returned the layer
   identifier as colormap_id, but GIBS layers often share colormaps
   under different filenames (e.g., AMSRU2_Sea_Ice_Concentration_12km
   -> colormap AMSR2_Sea_Ice_Concentration.xml). Now parses the actual
   filename from the metadata xlink:href.

2. Entries wrapper: GIBS v1.3 colormap XML nests ColorMapEntry elements
   inside an <Entries> wrapper. The parser only searched direct children
   of <ColorMap>, finding zero entries from live data. Now checks
   Entries/ColorMapEntry first, falling back to direct children.

Updated test fixture to use the real <Entries> wrapper structure.
2026-02-18 15:47:52 -07:00
f7fad32a9e Implement mcgibs FastMCP server for NASA GIBS
Complete implementation of all modules:
- constants.py: GIBS API endpoints, projections, TileMatrixSet defs
- models.py: Pydantic models for layers, colormaps, geocoding
- geo.py: Nominatim geocoding with rate limiting and caching
- capabilities.py: WMTS GetCapabilities XML parser with search
- colormaps.py: Colormap v1.3 parser with natural-language summaries
- client.py: Async GIBS HTTP client wrapping all API interactions
- server.py: FastMCP 3.0 tools, resources, and prompts

11 MCP tools, 3 resources, 2 prompts. 47 tests, all passing.
2026-02-18 14:55:41 -07:00