MCP Server

Give your AI assistant real-time satellite crop intelligence. Connect Claude, Cursor, Windsurf, or any MCP-compatible agent to live Sentinel-2 data with a single config block.

What is AgroSat MCP

The Model Context Protocol (MCP) is an open standard that lets AI assistants call external tools during a conversation. AgroSat exposes its full REST API as a set of MCP tools — so instead of writing API calls yourself, you describe what you need in plain language and the AI handles the rest.

The same API key and monthly quota cover both the REST API and the MCP server. You can use one key for both, or generate separate keys for each integration.

Connect

The AgroSat MCP server runs at mcp.agrosat.dev. No installation required — choose your client below and follow the steps.

Available transports
StreamableHTTPmcp.agrosat.dev/mcpClaude.ai, programmatic apps — real-time progress updates
SSEmcp.agrosat.dev/sseClaude Desktop, Cursor, Windsurf — legacy transport — real-time progress updates

Claude.ai uses OAuth 2.0 — no config files or headers needed. The server handles authentication automatically once you enter your credentials.

  1. Open claude.ai and go to Settings → Integrations
  2. Click Add custom connector and paste this URL:
https://mcp.agrosat.dev/mcp
  1. Claude.ai will prompt for your OAuth Client ID and Client Secret. Find them in your Developer Dashboard (Client ID) and the email you received when you signed up (Client Secret).
  2. Save — AgroSat tools appear immediately in your Claude conversations.

No key yet? Generate free credentials — 500 calls/month at no cost.

Authentication

AgroSat MCP supports two authentication methods — both draw from the same API key and monthly quota.

Claude.ai
OAuth 2.0 (Authorization Code + PKCE)Claude.ai redirects you to authorize.agrosat.dev to enter your Client Secret. No config files or headers needed.
Claude Desktop / Cursor / Windsurf
X-API-Key headerPass your API key in the headers block of the JSON config.
Custom applications
X-API-Key or OAuth BearerPass X-API-Key on the connection, or use the client_credentials grant at /oauth/token.

OAuth credentials (Client ID and Client Secret) are generated when you claim your API key. The Client ID is always visible in your Developer Dashboard. The Client Secret is shown once when you claim your key — store it safely.

No account yet? Generate free credentials — 500 calls per month at no cost.

Build an application

If you are building your own AgriTech application with an AI assistant, connect to the MCP server programmatically. Your application manages the conversation loop — Claude decides when to call AgroSat tools and your code executes them against the server.

# pip install "mcp>=1.8.0" anthropic
import asyncio
import anthropic
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

AGROSAT_KEY   = "agrosat_live_..."
ANTHROPIC_KEY = "sk-ant-..."

async def main() -> None:
    async with streamablehttp_client(
        "https://mcp.agrosat.dev/mcp",
        headers={"X-API-Key": AGROSAT_KEY},
    ) as (read, write, _):
        async with ClientSession(read, write) as session:
            await session.initialize()

            # Fetch AgroSat tools and convert to Anthropic format
            tools_resp = await session.list_tools()
            tools = [
                {"name": t.name, "description": t.description, "input_schema": t.inputSchema}
                for t in tools_resp.tools
            ]

            client = anthropic.Anthropic(api_key=ANTHROPIC_KEY)
            messages = [{"role": "user", "content": "What is the crop health at -6.79, 39.21?"}]

            # Agentic loop — Claude calls tools until it has an answer
            while True:
                response = client.messages.create(
                    model="claude-opus-4-7",
                    max_tokens=1024,
                    tools=tools,
                    messages=messages,
                )

                if response.stop_reason == "end_turn":
                    print(response.content[0].text)
                    break

                messages.append({"role": "assistant", "content": response.content})
                tool_results = []
                for block in response.content:
                    if block.type == "tool_use":
                        result = await session.call_tool(block.name, block.input)
                        tool_results.append({
                            "type": "tool_result",
                            "tool_use_id": block.id,
                            "content": result.content[0].text,
                        })
                messages.append({"role": "user", "content": tool_results})

asyncio.run(main())

If your application calls specific endpoints from its own logic rather than letting the AI decide, the REST API is a simpler and more predictable fit than MCP.

Tools

The MCP server exposes the following tools. Each tool maps directly to a REST endpoint — the tool descriptions guide the AI on when to call each one. Full parameter reference is at /docs.

ToolWhat it doesCalls
analyze_fieldCurrent NDVI, NDWI, and health score for a single field1
get_timeseries30-day NDVI and NDWI history (one point per satellite pass)1
detect_anomalyCurrent NDVI vs 3-year historical baseline for the same month1
check_flood_riskNDWI spike and waterlogging detection from 30-day trend1
get_growing_seasonPlanting date, peak greenness, and harvest estimate from 12-month curve1
compare_field_datesBefore and after NDVI snapshots for two specific dates2
seasonal_compareMean NDVI for current window vs same calendar window last year2
batch_analyzeCurrent health for up to 50 fields in one requestN (max 50)
batch_timeseries30-day timeseries for up to 20 fields in one requestN (max 20)
region_summaryAggregate NDVI health across a 3x3 grid within a bounding box9
region_timeseries30-day NDVI timeseries aggregated across a 3x3 grid9
get_quotaCheck calls used, remaining budget, and reset date for your key0

Example prompts

After connecting, you can ask your AI assistant questions like these. The assistant resolves the right tool and calls it automatically.

What is the current crop health at latitude -6.79, longitude 39.21?

analyze_field

Show me the NDVI trend for this field over the last 30 days.

get_timeseries

Is this field performing unusually compared to historical May readings?

detect_anomaly

Did heavy rainfall last week cause waterlogging at these coordinates?

check_flood_risk

How does this season compare to last year for this area?

seasonal_compare

How many API calls do I have left this month?

get_quota

Call costs

Every tool call draws from your monthly quota. The free tier includes 500 calls per month. Batch and region tools consume multiple calls in one request — the tool description for each states the exact cost.

Satellite analysis takes up to 30 seconds on the first call for a location. Cached results return in under a second. When using the StreamableHTTP transport (mcp.agrosat.dev/mcp), the server sends real-time progress messages during longer calls so the AI assistant knows the request is in flight. The SSE transport delivers the result at the end of the call without intermediate updates.

Batch and region requests run a quota check before processing starts. If the batch size would exceed your remaining monthly budget, the entire request is rejected before any satellite data is fetched.

Ready to connect?

Get a free API key and wire it into any AI Assistant application in under a minute.

Get free API key