Farm OS MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Farm OS MCP Server show me the summary for farm 1"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Farm OS MCP Server
A Model Context Protocol (MCP) server for Farm OS using FastMCP, built with Python and managed with uv.
Features
This MCP server provides tools for managing farm data including:
Farm information and summaries
Field management and crop tracking
Livestock monitoring
Equipment tracking
Sensor readings
All data is currently static for testing purposes.
Related MCP server: farmbot-agent
Setup
Prerequisites
Python 3.10 or higher
uvpackage manager (install from https://docs.astral.sh/uv/)
Installation
Install
uv(if not already installed):Windows (PowerShell):
irm https://astral.sh/uv/install.ps1 | iexmacOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | shSync dependencies:
uv syncInstall the project:
uv pip install -e .
Usage
Run the MCP Server
uv run python farmos_server.pyTest the Tools
Run the test script to see all available tools in action:
uv run python test_server.pyAvailable Tools
get_farm_info(farm_id)- Get detailed information about a specific farmlist_all_farms()- List all available farmsget_field_info(field_id)- Get information about a specific fieldlist_fields_by_farm(farm_id)- List all fields for a farmget_livestock_info(livestock_id)- Get information about livestocklist_livestock_by_farm(farm_id)- List all livestock for a farmget_equipment_info(equipment_id)- Get information about equipmentlist_equipment_by_farm(farm_id)- List all equipment for a farmget_sensor_readings(field_id)- Get sensor readings for a fieldsearch_by_crop_type(crop_type)- Search fields by crop typeget_farm_summary(farm_id)- Get comprehensive farm summary with statistics
Project Structure
fastmcp/
├── farmos_server.py # Main MCP server with all tools
├── static_data.py # Static test data
├── test_server.py # Test script
├── pyproject.toml # Project configuration
└── setup.py # Setup helper scriptStatic Test Data
The project includes static test data for:
3 farms
4 fields
3 livestock groups
3 equipment items
3 sensor devices
All data is defined in static_data.py and can be modified for testing purposes.
Available Tools
11 toolsget_equipment_infoC
Get information about specific equipment.
Args: equipment_id: The unique identifier for the equipment
Returns: Dictionary containing equipment information
Inputs: equipment_id (required). Returns: object
get_farm_infoB
Get information about a specific farm.
Args: farm_id: The unique identifier for the farm (e.g., 'farm_001')
Returns: Dictionary containing farm information
Inputs: farm_id (required). Returns: object
get_farm_summaryC
Get a comprehensive summary of a farm including all its assets.
Args: farm_id: The unique identifier for the farm
Returns: Dictionary containing comprehensive farm summary
Inputs: farm_id (required). Returns: object
get_field_infoB
Get information about a specific field.
Args: field_id: The unique identifier for the field (e.g., 'field_001')
Returns: Dictionary containing field information
Inputs: field_id (required). Returns: object
get_livestock_infoC
Get information about specific livestock.
Args: livestock_id: The unique identifier for the livestock group
Returns: Dictionary containing livestock information
Inputs: livestock_id (required). Returns: object
get_sensor_readingsC
Get all sensor readings for a specific field.
Args: field_id: The unique identifier for the field
Returns: List of sensor readings for the field
Inputs: field_id (required). Returns: result
list_all_farmsB
List all available farms.
Returns: List of all farms with basic information
Inputs: no named parameters. Returns: result
list_equipment_by_farmB
List all equipment for a specific farm.
Args: farm_id: The unique identifier for the farm
Returns: List of equipment belonging to the farm
Inputs: farm_id (required). Returns: result
list_fields_by_farmB
List all fields for a specific farm.
Args: farm_id: The unique identifier for the farm
Returns: List of fields belonging to the farm
Inputs: farm_id (required). Returns: result
list_livestock_by_farmB
List all livestock for a specific farm.
Args: farm_id: The unique identifier for the farm
Returns: List of livestock belonging to the farm
Inputs: farm_id (required). Returns: result
search_by_crop_typeA
Search for fields by crop type.
Args: crop_type: The type of crop to search for (e.g., 'Corn', 'Wheat')
Returns: List of fields matching the crop type
Inputs: crop_type (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Every tool has a clearly distinct purpose targeting specific resources (equipment, farms, fields, livestock, sensors) with no overlap in functionality. The get_* tools retrieve specific entities, list_* tools enumerate resources by farm, and search_by_crop_type provides unique filtering capability.
All tools follow a consistent verb_noun pattern with snake_case throughout. The naming convention is perfectly predictable: get_* for retrieving specific entities, list_* for enumerating collections, and search_* for filtering operations.
With 11 tools, this is well-scoped for a farm management system. Each tool earns its place by covering distinct aspects of farm operations including equipment, farms, fields, livestock, and sensors without being overwhelming.
The server provides excellent read operations but lacks any write/update capabilities. For a farm management system, obvious gaps include creating/updating farms, fields, equipment, or livestock records, and managing sensor data. The surface is complete for querying but incomplete for full lifecycle management.
Related MCP Connectors
Public, read-only MCP server for FarmNeural company facts, packages, and capabilities.
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Built-environment forecasts, public benchmarks, and permit or zoning readiness through remote MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA FastAPI-based Model Context Protocol server that exposes herd data through a discoverable API, with local and containerized deployment options.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server and CLI for controlling FarmBot hardware, enabling AI agents to manage gardening tasks through tools like gantry movement and device status monitoring. It supports executing Lua scripts and core hardware commands like homing and emergency stops via the Model Context Protocol.3MIT
- AlicenseNot gradedqualityDmaintenanceExposes real-time soil sensor metrics as MCP Resources and irrigation valve controls as MCP Tools, enabling AI-driven agronomic decisions with built-in safety guardrails.Apache 2.0
- FlicenseAqualityCmaintenanceEnables management of SAP Intelligent Agriculture farming platform, including areas, farms, fields, crop zones, and reference data through natural language.25-