How it works
The MCP server exposes Leaf API functionality as MCP tools. When your AI assistant needs to look up a field boundary or check the status of a machine file, it calls the appropriate tool. The server authenticates with your Leaf token, makes the API request, and returns the result to the assistant. No SDK installation required. The server runs remotely atmcp.withleaf.io/mcp using Streamable HTTP transport.
Authentication
Every request to the MCP server requires a valid Leaf API token passed as aLEAF_TOKEN header. The server extracts the token from the MCP request headers and uses it for all downstream API calls.
Generate a token the same way you would for direct API use. See Authentication for details.
Connecting from Cursor
Add this to your.cursor/mcp.json file (project-level) or ~/.cursor/mcp.json (global):
Connecting from Claude Code
Run this command in your terminal:Connecting from other MCP clients
Any client that supports Streamable HTTP transport can connect. Point it athttps://mcp.withleaf.io/mcp and include the LEAF_TOKEN header. The server does not use SSE or stdio transport.
Available tools
The MCP server exposes tools across these categories:| Category | Tools | What they do |
|---|---|---|
| Documentation | 2 | Browse Leaf API docs without leaving your editor |
| Configuration | 2 | Read API owner and Leaf user configuration settings |
| Provider credentials | 3 | Check credential status for John Deere, Climate FieldView, and CNHi |
| User management | 1 | List and filter Leaf users |
| Fields | 3 | List fields, get field details and boundaries |
| Field operations | 4 | List and inspect field operations with summaries and units |
| Machine files | 5 | List, inspect, and check processing status of machine files |
| Batch uploads | 3 | List and inspect batch uploads |
| Weather | 8 | Forecast and historical weather by field or coordinates, daily or hourly |
| Billing | 5 | List contracts, check consumption by API owner or Leaf user |
Common use cases
- Troubleshoot customer issues: Ask your AI assistant to look up a Leaf user’s credential events, file processing status, or field boundaries without leaving your editor.
- Explore data interactively: Query field operations, machine files, and summaries by provider, date range, or operation type in natural language.
- Monitor billing: Check contract consumption at the API owner or Leaf user level to catch unexpected usage spikes.
What to do next
- Tools Reference for the complete tool list with parameters and types.
- Authentication to generate your Leaf API token.

