
多机器人控制
STDIO多机器人控制的MCP服务器
多机器人控制的MCP服务器
This project creates an MCP (Model Context Protocol) server that allows AI agents to control multiple robots via existing FastAPI robot control servers.
uv pip install -e .
Start the robot control FastAPI servers:
Important Update: The Claude desktop client now automatically runs the MCP server for you
python server.py
The MCP server allows AI agents to control multiple robots and access their cameras.
All tools accept a port
parameter (default: 8000) to specify which robot to control.
drive_forward
: Move a robot forwarddrive_backward
: Move a robot backwardturn_left
: Turn a robot leftturn_right
: Turn a robot rightstop
: Stop robot movementdrive
: Control with precise velocity valuesbeep
: Play a sound through a robot's speakerget_camera_image
: Get an image from a robot's camerarobot_status
: Get robot status informationlist_available_robots
: List all available robots and their statusrobot://info/{port}
: Get information about a specific robot's capabilities# Get status from robot on port 8000 status_robot1 = await client.robot_status(port=8000) # Get status from robot on port 8001 status_robot2 = await client.robot_status(port=8001) # Make both robots beep with different tones await client.beep(port=8000, frequency=440, duration=1.0) # A4 note on robot 1 await client.beep(port=8001, frequency=523.25, duration=1.0) # C5 note on robot 2 # Get a list of all available robots robots = await client.list_available_robots()
The camera image tools use MCP's native Image
class for handling image data. This allows the AI agent to receive the image data in a format that can be properly handled by the client without need for additional conversion.