# mcp-farmbot **Repository Path**: ncnynl/mcp-farmbot ## Basic Information - **Project Name**: mcp-farmbot - **Description**: 用于提供farmbot的mcp服务 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-17 - **Last Updated**: 2025-09-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MCP-FarmBot | MCP 农业机器人扩展 A powerful MCP-based interface for controlling FarmBot robots, enabling AI-driven planting, watering, environmental monitoring, and automation. 一个基于 MCP 的强大接口,用于控制 FarmBot 农业机器人,实现 AI 驱动的播种、浇水、环境监测与自动化。 --- ## Overview | 概述 MCP-FarmBot extends the **Model Context Protocol (MCP)** to connect AI with FarmBot. Through this integration, AI agents can directly invoke FarmBot sequences (watering, planting, moving, camera capture, etc.), monitor real-time status, and automate farming tasks. MCP-FarmBot 扩展了 **模型上下文协议(MCP)**,将 AI 与 FarmBot 相连接。 通过该集成,AI 可以直接调用 FarmBot 的序列(浇水、播种、移动、拍照等)、实时监控状态,并自动化农业任务。 --- ## Features | 特性 - 🌱 AI-driven FarmBot control | AI 驱动的 FarmBot 控制 - 🔄 Sequence management (run, stop) | 序列管理(运行, 停止) - 📡 Real-time telemetry streaming (position, status, sensors) | 实时遥测(位置、状态、传感器数据) - 📷 Camera capture integration | 摄像头图像采集集成 - 🔒 Secure WebSocket communication | 安全的 WebSocket 通信 - 🛠️ Easy extension with custom tools | 简单扩展自定义工具 --- ## Quick Start | 快速开始 1. 安装依赖: ```bash pip install -r requirements.txt ``` 2. Set up environment variables | 设置环境变量: 从小智语音https://xiaozhi.me/获取MCP接入点地址 ```bash export MCP_ENDPOINT= export MCP_FARMBOT_URL= export MCP_FARMBOT_EMAIL= export MCP_FARMBOT_PASSWORD= export MCP_FARMBOT_MQTT_BROKER= export MCP_FARMBOT_MQTT_PORT= #build mcp_point.sh, put export MCP_ENDPOINT= into it , modify for your's cp mcp_point_example.sh mcp_point.sh vim mcp_point.sh # use it source ./mcp_point.sh ``` 3. 运行 MCP-FarmBot: ```bash python mcp_pipe.py farmbot.py ``` 也可以通过 `start.sh` 启动服务: ```bash ./start.sh ``` --- ## Project Structure | 项目结构 - `mcp_pipe.py`: MCP 主通信管道,处理连接和进程管理 - `farmbot.py`: FarmBot 的 MCP 工具实现,封装控制和状态查询 - `requirements.txt`: 项目依赖 --- ## Use Cases | 使用场景 - 🌱 精准播种与浇水 - 📷 作物生长图像采集 - 📊 环境与传感器数据采集 - 🔄 自动执行农业管理流程 - 🤖 AI 农业助理与智能种植 --- ## Requirements | 环境要求 - Python 3.8+ - websockets>=11.0.3 - python-dotenv>=1.0.0 - mcp>=1.8.1 - mcp-proxy>=0.8.2 - farmbot-api (本地 FarmBot API 封装) --- ## Contributing | 贡献指南 Contributions are welcome! Please feel free to submit a Pull Request. 欢迎贡献代码!请随时提交 Pull Request。 --- ## License | 许可证 This project is licensed under the MIT License - see the LICENSE file for details. 本项目采用 MIT 许可证 - 详情请查看 LICENSE 文件。 --- ## Acknowledgments | 致谢 - Thanks to the FarmBot open-source project | 感谢 FarmBot 开源项目 - Thanks to MCP contributors for enabling AI extensibility | 感谢 MCP 贡献者推动 AI 可扩展性