Skip to main content
Use this page to understand what the remote Leaf MCP server exposes after you connect a client to https://mcp.withleaf.io/mcp. It is a tool reference, not a REST API reference, and it groups the available capabilities by product area.

Overview

The Leaf MCP (Model Context Protocol) server exposes tools that AI assistants can call to interact with the Leaf API programmatically. Instead of making REST calls directly, your MCP-compatible client (such as Cursor, Claude Desktop, or a custom agent) invokes typed tools and receives structured responses.
The MCP server is a tool server, not a REST API. There is no base URL — you configure the server in your MCP client, and it handles communication with the Leaf API on your behalf.

Configuration

To use the Leaf MCP server, point your MCP client at the remote Leaf server and pass your Leaf API token as a LEAF_TOKEN header. The server authenticates every tool call against the Leaf API using this token.
{
  "mcpServers": {
    "leaf": {
      "url": "https://mcp.withleaf.io/mcp",
      "headers": {
        "LEAF_TOKEN": "YOUR_TOKEN"
      }
    }
  }
}
Use the remote HTTP server as the canonical setup. Older local npx-based examples are outdated.

Available tools

The server groups its tools into the categories listed below. Each tool accepts typed parameters and returns JSON matching the corresponding Leaf API response.

User management

ToolDescription
List usersReturns a paginated list of Leaf users for your account. Filterable by email, name, or external ID.
Get Leaf user configurationReturns configuration settings for a Leaf user. If the user has no custom configuration, settings are inherited from the API owner.
Get API owner configurationReturns the default configuration for the API owner, including operation image creation, auto-sync, and merge settings.

Fields

ToolDescription
List fieldsReturns a paginated list of fields for a Leaf user. Filterable by type, farm ID, or provider.
Get fieldReturns a single field by its UUID.
Get field boundaryReturns the active boundary geometry for a field.

Field operations

ToolDescription
List operationsReturns a paginated list of field operations. Filterable by provider, time range, operation type, and field.
Get operationReturns a single operation by its UUID.
Get operation summaryReturns aggregated statistics (area, elevation, speed, and operation-specific properties) for an operation.
Get operation unitsReturns the property-to-unit mapping for an operation.

Machine files

ToolDescription
List filesReturns a paginated list of machine files. Filterable by provider, status, origin, operation type, time range, and more.
Get fileReturns a single machine file by its UUID.
Get file summaryReturns the summary for a machine file.
Get file unitsReturns the property-to-unit mapping for a machine file.
Get file statusReturns the processing status for every step of the Leaf pipeline for a file.

Batch uploads

ToolDescription
List batchesReturns a paginated list of manual-upload batches. Filterable by provider and status.
Get batchReturns a single batch by its UUID.
Get batch statusReturns the processing status of all files inside a batch.

Weather

ToolDescription
Forecast (field, daily)Returns daily forecasted weather for a Leaf user’s field.
Forecast (field, hourly)Returns hourly forecasted weather for a Leaf user’s field.
Forecast (lat/lon, daily)Returns daily forecasted weather for a coordinate pair.
Forecast (lat/lon, hourly)Returns hourly forecasted weather for a coordinate pair.
Historical (field, daily)Returns daily historical weather for a Leaf user’s field.
Historical (field, hourly)Returns hourly historical weather for a Leaf user’s field.
Historical (lat/lon, daily)Returns daily historical weather for a coordinate pair.
Historical (lat/lon, hourly)Returns hourly historical weather for a coordinate pair.
Weather tools accept optional model and units parameters. Time parameters use ISO 8601 format.

Billing

ToolDescription
List contractsReturns all billing contracts for your account.
Get contractReturns a single contract by ID, including product type, date range, region, and quota.
Get consumptionReturns consumption data for a contract. Optionally pass a timestamp to query a specific day.

Provider credentials

ToolDescription
Get John Deere credential eventsReturns connection events and status for a Leaf user’s John Deere credentials.
Get Climate FieldView credential eventsReturns connection events and status for a Leaf user’s Climate FieldView credentials.
Get CNHI credential eventsReturns connection events and status for a Leaf user’s CNHI credentials.
Credential event tools are intended for troubleshooting. They expose authentication status and error details for provider connections.
Last modified on March 24, 2026