mcp-drone-agent
Enables natural language control of a simulated drone for search missions, with tools for takeoff, movement, scanning, and landing via MCP.
README
mcp-drone-agent
Give Claude actual flight control over a drone via the Model Context
Protocol. This is the demo project for the "drones" video: an LLM agent
reads a plain-English mission, plans a search pattern itself, and calls real
MCP tools (takeoff, move_to, scan, land, ...) to fly it.
Why a simulator instead of a real flight stack
The paper this is inspired by ("Taking Flight with Dialogue," PX4-based
Drone Agent, arXiv 2506.07509) uses
PX4 + ROS 2 + NVIDIA Isaac Sim, which needs a GPU Linux box and a fair
amount of setup. This project keeps the same idea -- natural language in,
tool calls out, flight path as the payoff -- but swaps the flight stack for
a small deterministic Python simulator (drone_sim.py) so it runs anywhere
in about 10 seconds with no GPU, no ROS2, no simulator install. The MCP
server (mcp_server.py) is real, not a mock -- swap drone_sim.World for a
PX4/MAVSDK backend later and the tool layer above it doesn't change.
How it's wired together
mission text --> agent.py --(MCP stdio)--> mcp_server.py --> drone_sim.py
| |
LLM (Ollama / Claude) physics / world
decides which tool state / flight log
to call next
drone_sim.py-- a 60x60m field, three static obstacles, three hidden targets (one is the mission objective, two are decoys), simple kinematics, battery drain, and a flight event log. Pure Python, no dependencies.mcp_server.py-- wraps the simulator in five MCP tools using the official MCP Python SDK (FastMCP), served over stdio.agent.py-- the MCP client.--mode ollama(default) uses a local LLM via Ollama.--mode mockis a scripted lawnmower search (no LLM).--mode claudeuses Anthropic's API.visualize.py-- renders the flight log into a top-down PNG: field boundary, obstacles, the flown path, detections, obstacle detours, home/landing markers.demo_mission.py-- runs the whole pipeline in one command.
Setup
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
Local LLM (recommended)
Install Ollama, pull a tool-capable model, and keep
ollama serve running:
ollama pull qwen2.5:7b
Default model is qwen2.5:7b (strong tool calling). Also works with
llama3.1:8b / llama3.2 if already pulled. Prefer models whose Ollama
card lists tools support.
Cloud Claude (optional)
For --mode claude, copy .env.example to .env and set
ANTHROPIC_API_KEY. agent.py loads .env via python-dotenv.
Live web console (recommended)
Same teal theme / sidebar layout as medical-assistant. Backend streams
telemetry over WebSocket; the map animates the drone in real time.
# Terminal 1 — API
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
# Terminal 2 — UI
cd frontend
npm install
npm run dev
Open http://localhost:3000/mission, pick Mock or Ollama, hit Start mission.
CLI demo
# Local LLM via Ollama (default) -- real agent, no Anthropic bill
python demo_mission.py --mode ollama
# Scripted search, no LLM -- proves MCP + sim only
python demo_mission.py --mode mock
# Cloud Claude (needs credits / API key)
python demo_mission.py --mode claude
# Pick another local model
python demo_mission.py --mode ollama --model llama3.1:8b
All modes write flight_logs/latest.jsonl (raw event log),
flight_logs/agent_transcript.json (every tool call + LLM reasoning
text, if any).
Same seed (--seed 42 by default) = same field layout every run, so you can
re-record a take without the obstacle/target positions moving around on you.
Point Claude Desktop at it directly
Since mcp_server.py is a real MCP server, you can also add it straight to
Claude Desktop's config and fly missions from the chat window instead of the
script:
{
"mcpServers": {
"drone-agent": {
"command": "python3",
"args": ["/absolute/path/to/mcp-drone-agent/mcp_server.py"]
}
}
}
Restart Claude Desktop, then just type a mission in chat, e.g. "take off, search the field, and land next to the survivor marker."
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。