STAC MCP Server

STAC MCP Server

Enables AI assistants to search and access geospatial datasets through STAC (SpatioTemporal Asset Catalog) APIs. Supports querying satellite imagery, weather data, and other geospatial assets with spatial, temporal, and attribute filters.

Category
Visit Server

README

STAC MCP Server

PyPI Version Build Status Container Python License

An MCP (Model Context Protocol) Server that provides access to STAC (SpatioTemporal Asset Catalog) APIs for geospatial data discovery and access.

Overview

This MCP server enables AI assistants and applications to interact with STAC catalogs to:

  • Search and browse STAC collections
  • Find geospatial datasets (satellite imagery, weather data, etc.)
  • Access metadata and asset information
  • Perform spatial and temporal queries

Features

Available Tools

  • search_collections: List and search available STAC collections
  • get_collection: Get detailed information about a specific collection
  • search_items: Search for STAC items with spatial, temporal, and attribute filters
  • get_item: Get detailed information about a specific STAC item

Supported STAC Catalogs

By default, the server connects to Microsoft Planetary Computer STAC API, but it can be configured to work with any STAC-compliant catalog.

Installation

PyPI Package

pip install stac-mcp

Development Installation

git clone https://github.com/BnJam/stac-mcp.git
cd stac-mcp
pip install -e .

Container

The STAC MCP server is available as a secure distroless container image with semantic versioning:

# Pull the latest stable version
docker pull ghcr.io/bnjam/stac-mcp:latest

# Pull a specific version (recommended for production)
docker pull ghcr.io/bnjam/stac-mcp:0.1.0

# Run the container (uses stdio transport for MCP)
docker run --rm -i ghcr.io/bnjam/stac-mcp:latest

Container images are tagged with semantic versions:

  • ghcr.io/bnjam/stac-mcp:1.2.3 (exact version)
  • ghcr.io/bnjam/stac-mcp:1.2 (major.minor)
  • ghcr.io/bnjam/stac-mcp:1 (major)
  • ghcr.io/bnjam/stac-mcp:latest (latest stable)

Building the Container

To build the container locally using the provided Containerfile:

# Build with Docker
docker build -f Containerfile -t stac-mcp .

# Or build with Podman  
podman build -f Containerfile -t stac-mcp .

The container uses a multi-stage build with:

  • Builder stage: Python 3.12 slim image for building dependencies
  • Runtime stage: Distroless Python image for security and minimal size
  • Security: Runs as non-root user, minimal attack surface
  • Transport: Uses stdio for MCP protocol communication

Usage

As an MCP Server

Native Installation

Configure your MCP client to connect to this server:

{
  "mcpServers": {
    "stac": {
      "command": "stac-mcp"
    }
  }
}

Container Usage

To use the containerized version with an MCP client:

{
  "mcpServers": {
    "stac": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "ghcr.io/bnjam/stac-mcp:latest"]
    }
  }
}

Or with Podman:

{
  "mcpServers": {
    "stac": {
      "command": "podman", 
      "args": ["run", "--rm", "-i", "ghcr.io/bnjam/stac-mcp:latest"]
    }
  }
}

Command Line

Native Installation

stac-mcp

Container Usage

# With Docker
docker run --rm -i ghcr.io/bnjam/stac-mcp:latest

# With Podman
podman run --rm -i ghcr.io/bnjam/stac-mcp:latest

Examples

Search Collections

# Find all available collections
search_collections(limit=20)

# Search collections from a different catalog
search_collections(catalog_url="https://earth-search.aws.element84.com/v1", limit=10)

Search Items

# Search for Landsat data over San Francisco
search_items(
    collections=["landsat-c2l2-sr"],
    bbox=[-122.5, 37.7, -122.3, 37.8],
    datetime="2023-01-01/2023-12-31",
    limit=10
)

# Search with additional query parameters
search_items(
    collections=["sentinel-2-l2a"],
    bbox=[-74.1, 40.6, -73.9, 40.8],  # New York area
    query={"eo:cloud_cover": {"lt": 10}},
    limit=5
)

Get Collection Details

# Get information about a specific collection
get_collection("landsat-c2l2-sr")

Get Item Details

# Get detailed information about a specific item
get_item("landsat-c2l2-sr", "LC08_L2SR_044034_20230815_02_T1")

Development

Setup

git clone https://github.com/BnJam/stac-mcp.git
cd stac-mcp
pip install -e ".[dev]"

Testing

pytest

Linting

black stac_mcp/
ruff check stac_mcp/

Version Management

The project uses semantic versioning (SemVer) with automated version management based on branch naming:

Branch-Based Automatic Versioning

When PRs are merged to main, versions are automatically incremented based on branch prefixes:

  • hotfix/ branches → patch increment (0.1.0 → 0.1.1) for bug fixes
  • feature/ branches → minor increment (0.1.0 → 0.2.0) for new features
  • release/ branches → major increment (0.1.0 → 1.0.0) for breaking changes

Manual Version Management

You can also manually manage versions using the version script:

# Show current version
python scripts/version.py current

# Increment version based on change type
python scripts/version.py patch    # Bug fixes (0.1.0 -> 0.1.1)
python scripts/version.py minor    # New features (0.1.0 -> 0.2.0)  
python scripts/version.py major    # Breaking changes (0.1.0 -> 1.0.0)

# Set specific version
python scripts/version.py set 1.2.3

The version system maintains consistency across:

  • pyproject.toml (project version)
  • stac_mcp/__init__.py (version)
  • stac_mcp/server.py (server_version in MCP initialization)

Container Development

To develop with containers:

# Build development image
docker build -f Containerfile -t stac-mcp:dev .

# Test the container
docker run --rm -i stac-mcp:dev

# Using docker-compose for development
docker-compose up --build

# For debugging, use an interactive shell (requires modifying Containerfile)
# docker run --rm -it --entrypoint=/bin/sh stac-mcp:dev

The Containerfile uses a secure multi-stage build approach:

  • Distroless base: Minimal attack surface with no shell or package manager
  • Non-root user: Container runs as unprivileged user
  • Minimal dependencies: Only runtime dependencies included in final image
  • Build optimization: Dependencies built in separate stage and copied over
  • Production ready: Includes resource limits and security best practices

STAC Resources

License

Apache 2.0 - see LICENSE file for details.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured