Skip to main content
Glama
isaaccorley

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"

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
aoiYes
time_rangeNo
output_dirNo.
max_cloud_coverNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses key behaviors: automatic collection detection, geocoding, cropping, and RGB visualization. It also mentions the output directory default. However, it omits important traits such as overwrite behavior, disk usage, network requirements, and error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections for general description, parameters, returns, and examples. It is front-loaded with the core purpose. While detailed, it avoids repetition and unnecessary content; minor improvements could tighten the opening sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (mentioned in context) and 5 parameters, the description covers the main functionality but lacks operational context such as rate limits, data size restrictions, internet requirements, and error handling. More completeness would benefit an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no descriptions (0% coverage), so the description fully compensates. Each parameter is explained with types, defaults, and concrete examples (e.g., aoi accepts place names or bboxes, time_range format). This adds significant value beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool downloads satellite/raster data from Microsoft Planetary Computer and mentions automatic collection detection, geocoding, and visualization. However, it does not explicitly contrast with the sibling tool (download_geometries_tool), which would strengthen purpose clarity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus the sibling or alternatives. There is no mention of prerequisites, constraints, or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

ParametersJSON Schema
NameRequiredDescriptionDefault
collectionYes
aoiYes
output_dirNo.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Only states 'Download vector geometries' without disclosing side effects (e.g., file creation, overwrite behavior), authentication needs, or idempotency. Minimal behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise docstring format with clear sections (description, parameters, returns). Purpose is front-loaded. No unnecessary text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers parameters and returns, but lacks details such as output file format (GeoJSON, Shapefile?), behavior for missing directories, and how it compares to sibling tool. Adequate but incomplete for a download operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but description adds significant meaning: gives example for collection ('ms-buildings'), clarifies aoi as bbox or place name, and documents output_dir default. Greatly enhances schema bare data.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'Download vector geometries from Planetary Computer' with specific verb and resource. Distinguishes from sibling download_data_tool by specifying vector geometries, but does not explicitly differentiate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides parameter details but no guidance on when to use this tool versus the sibling download_data_tool, nor any prerequisites, limitations, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.3.3
    • First observeddownload_data_tool
    • First observeddownload_geometries_tool

TDQS

A3.5/5.0
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 issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    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.
    23
    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

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/isaaccorley/planetary-computer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server