home / mcp / stac mcp server

STAC MCP Server

Provides access to STAC catalogs for geospatial data discovery with dual text and JSON outputs.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bnjam-stac-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/wayfinder-foundry/stac-mcp",
        "stac-mcp"
      ]
    }
  }
}

You can query and explore STAC catalogs through an MCP server that exposes STAC APIs and returns results in either plain text or structured JSON. This makes geospatial data discovery and access easy for AI assistants and applications, with flexible output formats and robust capability discovery.

How to use

You interact with the server using an MCP client. Start the server, then send MCP messages to request discovery, search, or data size estimation. The server supports both text and json outputs for all tools, enabling straightforward chaining and machine consumption when you want structured results.

Key capabilities let you fetch root metadata, browse conformance, search collections, retrieve specific collections or items, and estimate dataset sizes. You can choose between text and json output modes; json mode delivers a compact envelope that preserves compatibility while enabling structured processing.

How to install

Prerequisites: you need Python and a working environment for running the MCP server. You may also run the server in a container for convenience.

Install the package in development mode to enable local development and testing.

# Local development setup
git clone https://github.com/wayfinder-foundry/stac-mcp.git
cd stac-mcp
pip install -e ".[dev]"

Additional sections

Configuration is expressed through MCP commands in code samples. The server is designed to be run in stdio MCP transport mode, where the command and its arguments are provided to start the server and enable communication with the MCP client.

Containerized development and testing are supported. You can build a development image and run the container, or use docker-compose for a development workflow.

# 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

MCP server connection and runtime configuration

The server is configured via an MCP JSON snippet that specifies the stdio transport, the runtime command, and the arguments to start the MCP server. This enables an agent or client to communicate with the STAC MCP Server using the MCP protocol.

Usage examples and notes

When you start a client request, you can choose the output format for each tool invocation. JSON output provides a machine-friendly envelope, while text output offers a readable result for quick inspection. Random access and paging are supported through the standard STAC querying capabilities, including spatial, temporal, and attribute filters.

Development status and testing

The project includes test coverage to validate functionality. You can run tests locally to verify behavior and ensure changes maintain compatibility across outputs and capabilities.

Available tools

get_root

Fetch root document containing id, title, description and links for conformance.

get_conformance

List all conformance classes; optionally verify specific URIs.

search_collections

List and search available STAC collections.

get_collection

Get detailed information about a specific collection.

search_items

Search for STAC items using spatial, temporal, and attribute filters.

get_item

Get detailed information about a specific STAC item.

estimate_data_size

Estimate data size for STAC items using lazy loading and AOI clipping.