kakimochi_ros2-mcp-server
0
ros2-mcp-server is a Python-based server for integrating MCP with ROS 2 to enable AI-based control of robots. It uses FastMCP to process commands asynchronously and is designed to run as a ROS 2 node, allowing for time-based control of robot movements. The project requires ROS 2 Humble and Python 3.10 for operation.
ros2-mcp-server
ros2-mcp-server
is a Python-based server integrating the Model Context Protocol (MCP) with ROS 2 for AI-assisted robot control. It publishes messages to the /cmd_vel
topic for movement commands.
Features
- MCP Integration using FastMCP
- Operates as a ROS 2 node
- Time-Based Control for movement commands
- Asynchronous Processing with
asyncio
Prerequisites
- ROS 2 Humble
- Python 3.10
- Dependencies:
rclpy
,fastmcp
,numpy
Installation
- Clone the repository.
- Ensure Python version is 3.10.
- Create and activate a virtual environment using
uv
. - Install dependencies.
MCP Server Configuration
Set up as an MCP server for clients like Claude and Cline.
Usage
- Send commands via Claude to control robot movement.
- Direct tool usage for command specifications.
Testing
Use simulators like Gazebo or a real robot subscribing to /cmd_vel
.
Troubleshooting
- Set
ROS_LOG_DIR
for logging errors. - Ensure Python 3.10 compatibility.
Limitations
- Supports only
/cmd_vel
and basic commands. Extensions needed for additional topics.