# Sentinel Hub MCP

> Sentinel Hub connects your AI client directly to massive Earth observation datasets from Sentinel, Landsat, and other missions. Use it to search global satellite imagery by location, calculate specialized indices like NDVI or burn severity, and process the resulting data into actionable maps—all without downloading terabytes of raw files.

## Overview
- **Category:** cloud-infrastructure
- **Price:** Free
- **Tags:** satellite-imagery, earth-observation, geospatial-data, stac, remote-sensing, raster-processing

## Description

You connect your agent straight into massive Earth observation datasets from Sentinel, Landsat, and other missions. You don’t have to manually query dozens of APIs or deal with moving terabytes of raw files; you just tell your client what analysis you need—an index map, a cloud-free view of an area, statistical trends over months—and it runs the whole thing.

**Getting Started and Finding Data**

You'll first check connectivity by running `check_sentinel_hub_status` to verify your API credentials are working. You can confirm your account status and available service quotas using `get_user_info`. To see what data is out there, you use `list_catalog_collections` to pull a list of every major satellite source, like Sentinel-2 or Landsat. If you need specifics on one of those collections, run `list_catalog_collections` to get the detailed information for that specific ID via `get_catalog_collection`. 

Searching is all about filtering down massive catalogs. You use `catalog_search` when you know the general area, specifying a bounding box and date range along with the data collection type. If you're working with a precise geographic identifier, you can narrow your search using `search_by_tile` based on an MGRS tile ID. To ensure quality results, you filter out unusable images by running `search_cloud_free`, which guarantees that any returned imagery meets or exceeds your specified cloud cover threshold. Once you've found a scene, you get deep metadata for one specific item using `get_catalog_item`.

**Building the Analysis Logic**

To figure out what kind of analysis to run, you start by listing available indices. The `list_band_combinations` tool shows all predefined spectral indexes and band pairings, including True Color, NDVI, and Burn Severity (NBR). You'll use this list to create your custom scripts. To make it look like a natural photograph, you generate the standard RGB script with `generate_true_color_evalscript`. If you need to map vegetation health, run `generate_ndvi_evalscript`, which creates a ready-to-use script that colors output from dark tones up through deep green for dense plant life. For a false color view—which is common when mapping urban areas or water bodies—you generate the specific script using `generate_false_color_evalscript`, emphasizing vegetation in red, urban structures in cyan/grey, and water in dark blue.

**Running the Job and Getting Results**

When you've built your custom logic (your evalscript), it’s time to run the job. You execute the full analysis by calling `process_image`, specifying the script, the geographic area, and the date range. For statistical reporting over time, you use `get_statistics` to calculate summaries—like the mean, minimum, or maximum value of a specific band across an area of interest over defined periods.

This whole process lets you analyze data fields like NDVI and NBR on demand without ever downloading terabytes of raw files.

## Tools

### catalog_search
Finds available satellite images by specifying the data collection, a bounding box, and a date range.

### check_sentinel_hub_status
Verifies if your API credentials are working correctly and confirms connectivity to the service.

### generate_false_color_evalscript
Creates a processing script that emphasizes vegetation (red), urban areas (cyan/grey), and water (dark blue).

### generate_ndvi_evalscript
Generates a ready-to-use script for NDVI, coloring the output from dark (water) to deep green (dense vegetation).

### generate_true_color_evalscript
Creates a script that generates standard RGB color images, making them look like natural photos.

### get_catalog_collection
Retrieves detailed information about a specific satellite data collection ID.

### get_catalog_item
Gets deep metadata for one single catalog item, using the ID found during a search.

### get_statistics
Calculates statistical summaries (mean, min, max) over an area of interest across specified time periods.

### get_user_info
Checks your account credentials and reports on available service quotas.

### list_band_combinations
Lists all predefined spectral indices and band combinations, including True Color, NDVI, and Burn Severity (NBR).

### list_catalog_collections
Provides a list of every major satellite data source available, such as Sentinel-2 or Landsat.

### process_image
Executes the full analysis: processes imagery using your custom script over a defined area and date range.

### search_by_tile
Searches for all available satellite scenes within a specific geographical MGRS tile identifier.

### search_cloud_free
Filters the search results to only include imagery that meets or exceeds your specified cloud cover threshold.

## Prompt Examples

**Prompt:** 
```
Show me an NDVI vegetation analysis for the Amazon rainforest region.
```

**Response:** 
```
I'll start by generating the NDVI evalscript... Done. Now processing Sentinel-2 imagery for the Amazon basin (-65,-5,-55,0) from the last 30 days. The processed result shows a 512x512 pixel NDVI map with dense vegetation (deep green) covering 87% of the area, sparse vegetation (yellow-green) at 8%, and water bodies (dark) at 5%. Would you like time-series statistics to track deforestation trends?
```

**Prompt:** 
```
Find cloud-free Sentinel-2 imagery over Paris with less than 10% clouds.
```

**Response:** 
```
Searching for cloud-free scenes over Paris (2.2,48.8,2.5,48.9) with maximum 10% cloud cover... Found 3 scenes from the last month. The cleanest acquisition has 2.1% cloud cover from 5 days ago, captured by Sentinel-2A. The next scene has 7.3% from 10 days ago. Would you like me to generate a true-color image of the cleanest scene?
```

**Prompt:** 
```
What band combinations can I use for wildfire assessment?
```

**Response:** 
```
I've listed the available band combinations. For wildfire assessment, you should use the **Burn Severity (NBR)** index which combines bands B08 (NIR) and B12 (SWIR) from Sentinel-2. For broader context, the **SWIR** composite (B12, B8A, B04) highlights burned areas in distinctive colors. The **False Color (Vegetation)** combination (B08, B04, B03) also clearly distinguishes healthy vegetation from burned areas. Would you like me to process burn severity for a specific region?
```

## Capabilities

### Search global satellite scenes
Find available imagery metadata by specifying a collection, bounding box, and date range.

### Generate spectral scripts for visualization
Create ready-to-use evaluation scripts (evalscripts) to colorize specific bands or calculate standard indices like NDVI.

### Process imagery with custom logic
Run the generated evalscript against a specified geographic area and date range, outputting processed satellite data.

### Calculate statistics over time
Derive statistical metrics (mean, max, std dev) for an area of interest across daily, weekly, or monthly time series.

### Filter out cloudy data
Search only for satellite scenes that fall below a specified cloud cover threshold.

## Use Cases

### Assessing wildfire damage (Emergency Managers)
A manager needs to know how bad a fire was. They ask their agent: 'Find all Sentinel-2 data for the burn zone last month, focusing on NBR.' The agent uses `search_cloud_free` first, then runs `list_band_combinations` to confirm the Burn Severity index, and finally executes `process_image` to deliver a map showing precise damage levels.

### Monitoring crop health (Agricultural Advisors)
A farmer needs to know if their field is struggling. They ask: 'Run an NDVI analysis for the last 30 days in this county.' The agent generates `generate_ndvi_evalscript`, finds clean imagery, and runs `get_statistics` on the resulting time series data, giving a quantifiable metric of decline or recovery.

### Mapping land use change (Urban Planners)
An urban planner needs to track where buildings went up. They request: 'Compare this area from 2015 vs. 2023.' The agent uses `catalog_search` to pull both time slices, and then runs a statistical analysis (`get_statistics`) comparing the mean spectral reflectance between the two periods.

### Finding specific data layers (GIS Professionals)
A GIS expert only wants radar imagery. They ask: 'List all available Sentinel-1 and Landsat collections.' The agent uses `list_catalog_collections` to identify the correct source, then uses `get_catalog_collection` to confirm its exact structure before proceeding.

## Benefits

- **Track Change Over Time:** Use `get_statistics` to calculate mean, min, or max metrics across an area over daily, weekly, or monthly periods. This lets you measure gradual change—like deforestation rates—which is impossible with single-shot data.
- **Filter Out Bad Data:** Don't waste time processing clouds. Run `search_cloud_free` first to guarantee your input imagery meets a low cloud cover threshold (<10% for clean analysis).
- **Generate Specific Maps:** Instead of raw data, use tools like `generate_ndvi_evalscript` to get scripts that automatically colorize the output based on vegetation density. The result is an immediate, usable map.
- **Compare Different Viewpoints:** Use `list_band_combinations` to see if a simple True Color view works, or if you need a False Color composite for better distinction between water and land.
- **Handle Massive Data Volumes:** You never download terabytes of raw data. Everything is processed by the API in place, returning only the final, analyzed output map or metric set.

## How It Works

The bottom line is: you define the area, generate the processing instructions, and run them all in one sequence to get an analyzed output.

1. First, use `search_cloud_free` or `catalog_search` to narrow down the dataset. You define the area and date range, ensuring you only work with high-quality imagery.
2. Next, if you need a specific visualization (like NDVI), run `generate_ndvi_evalscript`. This creates the necessary processing instructions (the evalscript) that tells the server exactly how to combine and colorize the bands.
3. Finally, execute the script using `process_image`, providing the generated evalscript along with the coordinates and date range. The result is a processed image or statistical report.

## Frequently Asked Questions

**How do I find cloud-free images using search_cloud_free?**
You provide a bounding box, date range, and your required maximum cloud cover percentage (e.g., 10%). The tool filters the entire catalog to return only scenes that meet that cleanliness requirement.

**Can I run NDVI analysis without generating_ndvi_evalscript?**
No, you must generate the script first. `generate_ndvi_evalscript` creates the specific processing instructions needed for the `process_image` tool to know how to calculate and colorize the index correctly.

**What is the difference between catalog_search and list_catalog_collections?**
`list_catalog_collections` gives you a master list of all available data sources (like 'Sentinel-2'). `catalog_search` lets you actually search *within* one or more specific collections by date and location.

**How do I get statistics over multiple months using get_statistics?**
You must provide a valid evalscript that defines the index, then specify a time series aggregation (daily, weekly, monthly) along with your bounding box to calculate metrics like mean or standard deviation.

**How do I check if my client_id:client_secret credentials are valid using the `check_sentinel_hub_status` tool?**
Running `check_sentinel_hub_status` confirms your authentication and service connectivity. This is the first step to ensure your AI agent can actually talk to the Sentinel Hub API without hitting credential errors.

**If I want to know which bands are necessary for a specific index, should I use `list_band_combinations`?**
Yes, using `list_band_combinations` provides a comprehensive list of indices and specifies the exact bands required (e.g., B08, B12) and the target collection for each one.

**When is it better to use `search_by_tile` versus general coordinates in a standard `catalog_search`?**
Use `search_by_tile` when you need precise, standardized spatial referencing typical of Sentinel-2 data (e.g., 33UUP). Bounding boxes are good for general areas, but tiles give you the specific MGRS grid alignment.

**I found a potential item ID; how do I confirm all its available metadata using `get_catalog_item`?**
Running `get_catalog_item` pulls the full, detailed metadata for that specific STAC catalog entry. This confirms if the item exists and gives you data points like geometry, cloud cover, and band information.

**What is an evalscript and how do I use one?**
An evalscript is a small JavaScript program that tells Sentinel Hub how to process satellite bands into an output image. It defines which bands to use, how to combine them, and what colors to assign. You can use the generate_ndvi_evalscript or generate_true_color_evalscript tools to get ready-made evalscripts, then pass them to the process_image tool.

**Can I analyze vegetation health with this server?**
Absolutely. Generate an NDVI evalscript with the generate_ndvi_evalscript tool, then process imagery for your area of interest with the process_image tool. For time-series analysis, use the get_statistics tool with temporal aggregation to track vegetation changes over weeks or months. The search_cloud_free tool helps you find clean scenes without cloud contamination.

**What is the difference between this server and the Copernicus Data Space server?**
The Copernicus Data Space server focuses on product catalogue search and download — finding and retrieving raw satellite data files. Sentinel Hub focuses on on-the-fly processing — rendering images, computing indices, and generating statistics without downloading raw data. They complement each other: use Copernicus for data discovery and bulk download, Sentinel Hub for real-time analysis and visualization.