Skip to main content

Overview

Terrafloww provides a Model Context Protocol (MCP) server that enables AI agents to interact with the Marketplace. Your agent can search datasets, retrieve code examples, and understand data schemas.

Connection Details

Connect your AI agent to the Terrafloww MCP server:
EndpointURL
SSE Endpointhttps://api.terrafloww.com/api/mcp/sse
Message Endpointhttps://api.terrafloww.com/api/mcp/message

Authentication

The MCP server requires authentication via:
  • API Token - Include in the Authorization header
  • Session Cookie - For browser-based integrations
Authorization: Bearer your_api_token_here

Available Tools

search_datasets

Search for datasets within the Terrafloww catalog. Arguments:
ArgumentTypeRequiredDescription
querystringNoSearch query. Use * to list all datasets
limitnumberNoMax results (default: 10, max: 50)
Example:
{
  "name": "search_datasets",
  "arguments": {
    "query": "sentinel-2 cloud cover",
    "limit": 5
  }
}
Response:
[
  {
    "id": "terrafloww/sentinel-2-l2a",
    "slug": "sentinel-2-l2a",
    "name": "Sentinel-2 Level 2A",
    "description": "Surface reflectance imagery",
    "org_slug": "terrafloww"
  }
]

get_dataset_code_example

Get a Python code snippet to access a dataset using the Rasteret library. Arguments:
ArgumentTypeRequiredDescription
dataset_slugstringYesDataset slug
org_slugstringNoOrganization slug (optional if authenticated)
Example:
{
  "name": "get_dataset_code_example",
  "arguments": {
    "dataset_slug": "sentinel-2-l2a",
    "org_slug": "terrafloww"
  }
}
Response:
Dataset Reference: terrafloww/sentinel-2-l2a

Spatial Extent: [-180, -90, 180, 90]
Temporal Coverage: 2015-06-27/..

Available Bands:
- B02
- B03
- B04
- B08

Code Snippet:
import rasteret

ds = rasteret.get_xarray(
    geometries=[bbox],
    bands=["B02", "B03", "B04", "B08"],
    date_range=("2025-01-01", "2025-01-31"),
    dataset="terrafloww/sentinel-2-l2a",
    cloud_cover_lt=20,
)

get_dataset_yaml_schema

Get the JSON schema for dataset YAML definitions. Arguments: None Example:
{
  "name": "get_dataset_yaml_schema",
  "arguments": {}
}
Returns a complete JSON schema describing all available fields for dataset configuration.

IDE Integration

VS Code with Continue

Add to your ~/.continue/config.json:
{
  "mcpServers": [
    {
      "name": "terrafloww",
      "transport": {
        "type": "sse",
        "url": "https://api.terrafloww.com/api/mcp/sse",
        "headers": {
          "Authorization": "Bearer YOUR_API_TOKEN"
        }
      }
    }
  ]
}

Claude Desktop

Add to your Claude Desktop configuration:
{
  "mcpServers": {
    "terrafloww": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-proxy"],
      "env": {
        "MCP_TRANSPORT": "sse",
        "MCP_URL": "https://api.terrafloww.com/api/mcp/sse",
        "MCP_HEADERS": "Authorization:Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Use Cases

Dataset Discovery

Let your AI agent search and explore available geospatial datasets.

Code Generation

Get ready-to-use Python snippets for accessing specific datasets.

Schema Understanding

Help your agent understand how to create and configure datasets.

Workflow Automation

Build automated pipelines that interact with the Marketplace.

Next Steps