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.
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
| Tool | Description |
|---|
| List users | Returns a paginated list of Leaf users for your account. Filterable by email, name, or external ID. |
| Get Leaf user configuration | Returns configuration settings for a Leaf user. If the user has no custom configuration, settings are inherited from the API owner. |
| Get API owner configuration | Returns the default configuration for the API owner, including operation image creation, auto-sync, and merge settings. |
Fields
| Tool | Description |
|---|
| List fields | Returns a paginated list of fields for a Leaf user. Filterable by type, farm ID, or provider. |
| Get field | Returns a single field by its UUID. |
| Get field boundary | Returns the active boundary geometry for a field. |
Field operations
| Tool | Description |
|---|
| List operations | Returns a paginated list of field operations. Filterable by provider, time range, operation type, and field. |
| Get operation | Returns a single operation by its UUID. |
| Get operation summary | Returns aggregated statistics (area, elevation, speed, and operation-specific properties) for an operation. |
| Get operation units | Returns the property-to-unit mapping for an operation. |
Machine files
| Tool | Description |
|---|
| List files | Returns a paginated list of machine files. Filterable by provider, status, origin, operation type, time range, and more. |
| Get file | Returns a single machine file by its UUID. |
| Get file summary | Returns the summary for a machine file. |
| Get file units | Returns the property-to-unit mapping for a machine file. |
| Get file status | Returns the processing status for every step of the Leaf pipeline for a file. |
Batch uploads
| Tool | Description |
|---|
| List batches | Returns a paginated list of manual-upload batches. Filterable by provider and status. |
| Get batch | Returns a single batch by its UUID. |
| Get batch status | Returns the processing status of all files inside a batch. |
Weather
| Tool | Description |
|---|
| 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
| Tool | Description |
|---|
| List contracts | Returns all billing contracts for your account. |
| Get contract | Returns a single contract by ID, including product type, date range, region, and quota. |
| Get consumption | Returns consumption data for a contract. Optionally pass a timestamp to query a specific day. |
Provider credentials
| Tool | Description |
|---|
| Get John Deere credential events | Returns connection events and status for a Leaf user’s John Deere credentials. |
| Get Climate FieldView credential events | Returns connection events and status for a Leaf user’s Climate FieldView credentials. |
| Get CNHI credential events | Returns 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.