Cozmo
MCP server for DDL/Anki Cozmo robots using PyCozmo
claude mcp add --transport stdio builderpepc-cozmo-mcp python C:/full-path-goes-here/Cozmo-MCP/server.py
How to use
Cozmo-MCP is a Python-based MCP server that exposes a set of controls for a Cozmo robot via the Model Context Protocol. It leverages the PyCozmo library to connect to and command a physical Cozmo unit, enabling actions such as moving the wheels, turning in place, adjusting the head and lift, and capturing camera images for downstream processing. The server is designed to work with MCP clients like Claude Desktop, which can issue high-level commands that get translated into PyCozmo API calls by the server. You can expect capabilities around connecting/disconnecting from Cozmo, taking sensor readings, and issuing basic locomotion and pose adjustments, with more advanced features planned for future updates.
To use it, configure an MCP client to connect to the running server (for example via Claude Desktop). On startup, the server awaits MCP commands over the configured interface and translates them into PyCozmo actions. Practical workflows include having Claude request a photo from Cozmo’s camera, move the robot to explore a space, or query sensor readings to understand Cozmo’s state (position, arm/head status, power, etc.). Ensure your client and Cozmo are both reachable over the internet/Wi‑Fi network as appropriate for your setup, since PyCozmo communicates with the robot over the Cozmo's own Wi‑Fi network.
How to install
Prerequisites:
- Python 3.8+ installed on the host that will run the MCP server
- Access to the Cozmo robot and its Wi‑Fi network
- Optional: a virtual environment tool (venv, conda, etc.)
Install steps:
-
Clone the repository: git clone https://github.com/builderpepc/Cozmo-MCP cd Cozmo-MCP
-
(Recommended) Create and activate a virtual environment: python -m venv venv
Windows
venv\Scripts\activate
macOS/Linux
source venv/bin/activate
-
Install dependencies from requirements.txt: pip install -r requirements.txt
-
Run the MCP server (example): python server.py
Notes:
- The setup assumes you will run the server directly via Python. If you later package this for Docker or another runtime, adjust the commands accordingly.
- If you use Claude Desktop, update its mcpServers configuration to point at the Python script as shown in the example.
Additional notes
Tips and caveats:
- Ensure Cozmo is powered on and connected to its Wi‑Fi network before starting the MCP server.
- The MCP client (e.g., Claude Desktop) must be configured to connect to Cozmo's Wi‑Fi network and have network access to the machine running this server.
- If you run Claude Desktop on Windows and your path to server.py contains spaces or backslashes, ensure the path is correctly escaped in the configuration.
- Depending on your environment, you may need to run the server using python3 instead of python.
- The current feature set supports core motion, camera capture, and sensor readings; more advanced features like camera configuration, audio playback, and face/screen control are slated for future updates.
- If you encounter PyCozmo connection issues, verify that the Cozmo wifi remains active and that there are no blocking firewall rules between the MCP host and the Cozmo device.
Related MCP Servers
Lambda
Creates a simple MCP tool server with "streaming" HTTP.
asterisk
Asterisk Model Context Protocol (MCP) server.
mcp-community
Easily run, deploy, and connect to MCP servers
Zammad
A Model Context Protocol (MCP) server for Zammad integration, enabling AI assistants to interact with tickets, users, and organizations.
mcp -python-template
This template provides a streamlined foundation for building Model Context Protocol (MCP) servers in Python. It's designed to make AI-assisted development of MCP tools easier and more efficient.
Convert-Markdown-PDF
Markdown To PDF Conversion MCP