Skip to main content
Glama
Planetary Computer MCP Server

Planetary Computer MCP Server

by isaaccorley

Planetary Computer MCP Server

A Python implementation of the Planetary Computer MCP server, providing unified access to satellite and geospatial data through natural language queries.

Sample Outputs

Related MCP server: Google Earth Engine MCP Server

Features

  • Unified Interface: Single download_data tool that automatically detects datasets from natural language queries

  • Natural Language Geocoding: Automatically converts place names (e.g., "San Francisco", "the Alps", "Amazon rainforest") to geospatial bounding box coordinates using the Nominatim geocoding service—no need to manually specify coordinates

  • Multi-format Support: Raster (GeoTIFF), Vector (GeoParquet), and Zarr data

  • Automatic Visualization: Generate RGB/JPEG previews for LLM analysis

  • Fast Downloads: Uses odc-stac for efficient COG access

Installation

uv sync

Usage

As MCP Server

python -m planetary_computer_mcp.server

Direct API Usage

from planetary_computer_mcp.tools.download_data import download_data

# Download Sentinel-2 data for San Francisco
result = download_data(
    query="sentinel-2 imagery",
    aoi="San Francisco",
    time_range="2024-01-01/2024-01-31"
)

print(f"Raw data: {result['raw']}")
print(f"Visualization: {result['visualization']}")

Tools

download_data

Unified tool for raster, DEM, land cover, and climate data.

Parameters:

  • query: Natural language query (e.g., "sentinel-2", "elevation data")

  • aoi: Bounding box [W,S,E,N] or place name

  • time_range: ISO8601 datetime range

  • max_cloud_cover: Maximum cloud cover (optical data)

Returns:

  • Raw GeoTIFF/Zarr/Parquet file

  • RGB/JPEG visualization

  • Metadata

download_geometries

Tool for vector/building data.

Parameters:

  • collection: Collection ID (e.g., "ms-buildings")

  • aoi: Bounding box or place name

  • limit: Maximum features

Returns:

  • GeoParquet file

  • Map visualization

  • Feature count

Supported Datasets

See collections.md for the complete list of supported datasets.

Development

Setup

uv sync --dev

Testing

uv run pytest

Linting/Formatting

uv run pre-commit run --all-files

Architecture

src/
├── core/           # Core utilities
│   ├── stac_client.py    # STAC search wrapper
│   ├── geocoding.py      # Place name → bbox
│   ├── collections.py    # Dataset metadata
│   ├── raster_utils.py   # odc-stac helpers
│   ├── vector_utils.py   # DuckDB helpers
│   ├── visualization.py  # Matplotlib viz
│   └── zarr_utils.py     # Xarray Zarr helpers
├── tools/          # MCP tools
│   ├── download_data.py
│   └── download_geometries.py
└── server.py       # MCP server entry point

License

Apache 2.0 License

Available Tools

2 tools
download_data_toolA

Download satellite/raster data from Microsoft Planetary Computer.

Automatically detects collection from natural language queries, handles geocoding for place names, downloads and crops data, generates RGB visualizations.

Parameters

query : str Natural language query describing the data you want. Examples: "sentinel-2 imagery", "landsat", "naip aerial photos", "elevation data", "land cover" aoi : str or list[float] Required. Area of interest as either: - Place name string: "Seattle, WA", "Paris, France", "Central Park, NY" - Bounding box list: [west, south, east, north] in degrees Example: [-122.4, 47.5, -122.3, 47.6] time_range : str or None, optional ISO8601 datetime range. Defaults to last 7 days if not provided. Examples: "2024-01-01/2024-01-31", "2024-06-01/2024-06-30" output_dir : str, optional Directory to save outputs. Defaults to current directory. max_cloud_cover : int, optional Maximum cloud cover percentage for optical data (0-100). Default: 20

Returns

list[TextContent] File paths and metadata

Examples

Download recent Sentinel-2 imagery of Paris: query="sentinel-2 imagery", aoi="Paris, France"

Download Landsat for a specific bbox and time: query="landsat", aoi=[-122.4, 47.5, -122.3, 47.6], time_range="2024-06-01/2024-06-30"

Download NAIP aerial imagery: query="naip aerial photos", aoi="Central Park, NY"

Inputs: query (required), aoi (required), time_range, output_dir, +1 more. Returns: result

download_geometries_toolB

Download vector geometries from Planetary Computer.

Parameters

collection : str Collection ID (e.g., "ms-buildings") aoi : list[float] or str Bounding box [W,S,E,N] or place name string output_dir : str, optional Directory to save outputs

Returns

list[TextContent] File paths and metadata

Inputs: collection (required), aoi (required), output_dir. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 2 tools

    Disambiguation5/5

    Both tools have clearly distinct purposes: one for raster satellite data with natural language querying, and one for vector geometries with a collection ID. No overlap in functionality.

    Naming Consistency5/5

    Both tools follow a consistent download_<type>_tool pattern using snake_case, making the naming predictable and clear.

    Tool Count2/5

    With only 2 tools, the server feels very thin for the broad scope of Microsoft Planetary Computer. Even a minimal interface would benefit from additional tools like listing collections or searching items.

    Completeness2/5

    The server covers raster and vector data downloads but lacks critical supporting operations such as querying available collections, filtering items, or exploring data metadata. Users must know collection IDs or rely on natural language detection without discovery tools.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A Python-based MCP server that provides access to Ordnance Survey APIs, allowing querying of geographic data through a standardized protocol with features like collection management, feature search, and spatial filtering.
      2
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      An MCP server that connects AI agents to cloud-native geospatial data via STAC metadata and DuckDB with H3 spatial indexing, enabling zero-configuration SQL queries on terabyte-scale datasets over S3.
      22
      BSD 3-Clause
    • A
      license
      C
      quality
      D
      maintenance
      MCP server for the Geopera geospatial data platform that enables AI agents to discover imagery, place and manage orders, and run analytics using the same API as other Geopera clients.
      100
      MIT