Get the FREE Ultimate OpenClaw Setup Guide →

Cozmo

MCP server for DDL/Anki Cozmo robots using PyCozmo

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone the repository: git clone https://github.com/builderpepc/Cozmo-MCP cd Cozmo-MCP

  2. (Recommended) Create and activate a virtual environment: python -m venv venv

    Windows

    venv\Scripts\activate

    macOS/Linux

    source venv/bin/activate

  3. Install dependencies from requirements.txt: pip install -r requirements.txt

  4. 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

Sponsor this space

Reach thousands of developers