This MCP server enables AI agents to control multiple robots simultaneously through existing FastAPI robot control servers. It provides a unified interface for movement, audio, camera access, and status monitoring across multiple robots.
Ensure you have a Python 3.10 environment active, then install dependencies using UV:
uv pip install -e .
Important: The Claude desktop client now automatically runs the MCP server for you. There's no need to manually start the server with python server.py
as the functionality is integrated directly into the Claude desktop client.
Before using the MCP server, ensure your robot control FastAPI servers are running:
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 capabilitiesHere are some examples of how to control multiple robots:
# 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 image data in a format that can be properly handled by the client without additional conversion.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "multi-robot-control" '{"command":"python","args":["-m","multi_robot_control.server"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"multi-robot-control": {
"command": "python",
"args": [
"-m",
"multi_robot_control.server"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"multi-robot-control": {
"command": "python",
"args": [
"-m",
"multi_robot_control.server"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect