0D

0xkoda/drone-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

26 stars 6 forks 质量 52 趋势 11

一个用于控制无人机的MCP服务器

概览

一款用于控制DJI Tello无人机的模型上下文协议(MCP)服务器实现。该服务器允许任何兼容MCP的客户端通过标准化接口控制Tello无人机。 - MCP 支持 - 通过 SSE(服务器发送事件)实现实时无人机控制 - 强大的错误处理和日志记录 - 支持 CORS 支持网页客户端(如 mcp 检查器)- 支持基本的 Tello 无人机命令:- 起飞 - 着陆 - 移动(上下/左/右/前/后)- 旋转(顺时针/逆时针) - Python 3.7+ - DJI Tello 无人机 - 与 Tello 无人机的网络连接 - Root/sudo 访问(UDP socket 绑定所需) 为了使MCP客户端能够连接到Tello无人机服务器,请在mcp.json文件中添加以下配置(通常位于~/.cursor/mcp.json或项目目录中): 这种配置允许支持MCP的工具和模型自动发现并连接到你的Tello无人机服务器。 1.

概述(AI 翻译)

一款用于控制DJI Tello无人机的模型上下文协议(MCP)服务器实现。该服务器允许任何兼容MCP的客户端通过标准化接口控制Tello无人机。

这还在积极开发中,阅读为安全考虑

特色

  • MCP 支持
  • 通过SSE(服务器发送事件)实现实时无人机控制
  • 稳健的错误处理和日志记录
  • 支持 CORS 支持网页客户端(如 MCP Inspector)
  • 支持基本的Tello无人机指令:
  • 起飞
  • 土地
  • 移动(上/下/左/右/前/后)
  • 旋转(顺时针/逆时针)

先修条件

  • Python 3.7+
  • DJI Tello 无人机
  • 与Tello无人机的网络连接
  • root/sudo 访问(UDP 套接字绑定所需)

安装

  1. 克隆此仓库:

  2. 安装依赖:

MCP 配置

为了使MCP客户端连接到Tello无人机服务器,请在你的mcp.json文件中添加以下配置(通常位于~/.cursor/mcp.json或项目目录中):

这种配置允许支持MCP的工具和模型自动发现并连接到你的Tello无人机服务器。

用途

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Tello Drone MCP Server

A Model Context Protocol (MCP) server implementation for controlling the DJI Tello drone. This server allows any MCP-compatible client to control a Tello drone through a standardized interface.

This is under active development, read security considerations

Features

  • MCP Support
  • Real-time drone control through SSE (Server-Sent Events)
  • Robust error handling and logging
  • CORS-enabled for web clients (like mcp inspector)
  • Supports basic Tello drone commands:
    • Takeoff
    • Land
    • Move (up/down/left/right/forward/back)
    • Rotate (clockwise/counter-clockwise)

Prerequisites

  • Python 3.7+
  • DJI Tello drone
  • Network connection to the Tello drone
  • Root/sudo access (required for UDP socket binding)

Installation

  1. Clone this repository:
git clone 
cd drone-mcp
  1. Install dependencies:
pip install -r requirements.txt

MCP Configuration

To enable your MCP client to connect to the Tello drone server, add the following configuration to your mcp.json file (usually located at ~/.cursor/mcp.json or in your project directory):

{
  "tello-drone": {
    "url": "http://localhost:3000/sse"
  }
}

This configuration allows MCP-enabled tools and models to automatically discover and connect to your Tello drone server.

Usage

  1. Connect to your Tello drone’s WiFi network (usually starts with “TELLO-”).

  2. Start the MCP server:

sudo python tello_mcp.py

The server will:

  • Initialize connection with the Tello drone
  • Start the MCP server on http://0.0.0.0:3000
  • Set up SSE endpoint at /sse
  • Handle messages at /message

Ensure the server is running before you plan to use it in your client (cursor, windsurf, code).

Available Tools

The server provides the following MCP tools:

1. Takeoff

{
    "name": "takeoff",
    "description": "Commands the Tello drone to take off",
    "inputSchema": {
        "type": "object",
        "properties": {}
    }
}

2. Land

{
    "name": "land",
    "description": "Commands the Tello drone to land",
    "inputSchema": {
        "type": "object",
        "properties": {}
    }
}

3. Move

{
    "name": "move",
    "description": "Moves the Tello drone in a specified direction",
    "inputSchema": {
        "type": "object",
        "properties": {
            "direction": {
                "type": "string",
                "enum": ["up", "down", "left", "right", "forward", "back"]
            },
            "distance": {
                "type": "integer",
                "minimum": 20,
                "maximum": 500
            }
        },
        "required": ["direction", "distance"]
    }
}

4. Rotate

{
    "name": "rotate",
    "description": "Rotates the Tello drone clockwise or counter-clockwise",
    "inputSchema": {
        "type": "object",
        "properties": {
            "direction": {
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →