explaingit

kieranklaassen/farmbot-agent-cli-mcp

Analysis updated 2026-05-18

3JavaScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A CLI and MCP server that lets you or an AI assistant control a FarmBot farming robot, moving its arm, checking status, and running commands safely.

Mindmap

mindmap
  root((repo))
    What it does
      CLI robot control
      MCP AI control
      Lua execution
    Tech stack
      JavaScript
      MQTT
      MCP
    Use cases
      Terminal commands
      AI agent control
      Safety limited movement
    Audience
      Developers
      FarmBot owners

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Control a FarmBot robot's arm and status from a terminal.

USE CASE 2

Let an AI assistant like Claude move and monitor a FarmBot through MCP.

USE CASE 3

Run custom Lua scripts on FarmBot hardware from the command line.

What is it built with?

JavaScriptNode.jsMQTTMCP

How does it compare?

kieranklaassen/farmbot-agent-cli-mcpamarjitjim/browserpilotboneskull/buggin
Stars333
LanguageJavaScriptJavaScriptJavaScript
Last pushed2022-12-30
MaintenanceDormant
Setup difficultymoderatemoderateeasy
Complexity3/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires an actual FarmBot device and an authentication token from the FarmBot API.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

farmbot-agent is a command-line tool and server for controlling FarmBot, an open-source farming robot that automates planting, watering, and garden management. It offers two ways to send instructions to the robot: typing commands directly into a terminal, or connecting it to an AI assistant so the AI can operate the robot on its own. The terminal interface lets you authenticate, check the robot's current status and position, move its motorized arm to specific coordinates, send it home, trigger an emergency stop, unlock it afterward, and run Lua code directly on the device. Every command supports a flag for structured JSON output, so results can be piped into other tools or scripts. The second mode runs an MCP server. MCP stands for Model Context Protocol, a standard that lets AI assistants call tools on connected systems. Once set up, an AI assistant like Claude can use farmbot-agent to check the robot's state, move it to precise positions, and control its behavior without a person typing each command. Setup involves adding the server to the assistant's configuration file along with an authentication token, which can be generated with a simple API request. Communication with the FarmBot hardware runs over MQTT, a lightweight messaging protocol used for device control. Commands are sent as structured requests carrying a unique identifier, so responses can be matched back to the right command. The project builds in several safety measures: movement coordinates are validated before being sent, a rate limit caps movement to 30 commands per minute to prevent an AI agent from getting stuck in a runaway loop, and emergency stop stays available at all times with a short timeout. Errors are returned as structured messages with codes and recovery suggestions rather than plain failures. The project is built in JavaScript, can be installed with npm, and is released under the MIT license.

Copy-paste prompts

Prompt 1
Help me set up farmbot-agent as an MCP server so Claude can control my FarmBot.
Prompt 2
Show me how to authenticate with FarmBot and move its gantry using the farmbot-agent CLI.
Prompt 3
Explain how farmbot-agent uses MQTT to talk to FarmBot hardware.
Prompt 4
Walk me through the safety limits farmbot-agent puts on AI-driven robot movement.

Frequently asked questions

What is farmbot-agent-cli-mcp?

A CLI and MCP server that lets you or an AI assistant control a FarmBot farming robot, moving its arm, checking status, and running commands safely.

What language is farmbot-agent-cli-mcp written in?

Mainly JavaScript. The stack also includes JavaScript, Node.js, MQTT.

What license does farmbot-agent-cli-mcp use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is farmbot-agent-cli-mcp to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is farmbot-agent-cli-mcp for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.