ros2-mcp-server logo

ros2-mcp-server

by kakimochi

The `ros2-mcp-server` is a Python-based server that integrates the Model Context Protocol (MCP) with ROS 2, enabling AI assistants to control robots via ROS 2 topics. It processes commands through FastMCP and runs as a ROS 2 node, publishing `geometry_msgs/Twist` messages to the `/cmd_vel` topic to control robot movement.

View on GitHub

Last updated: N/A

What is ros2-mcp-server?

The ros2-mcp-server is a ROS 2 node that acts as an MCP server, allowing AI assistants like Claude to send commands to control a robot's movement. It uses FastMCP to parse commands and publishes geometry_msgs/Twist messages to the /cmd_vel topic.

How to use ros2-mcp-server?

To use the server, you need to install ROS 2 Humble, Python 3.10, and the required dependencies. After cloning the repository, create and activate a virtual environment, install the dependencies, and configure the MCP server in your AI assistant's settings (e.g., Claude Desktop or Cline). Then, you can send commands to the robot through the AI assistant.

Key features of ros2-mcp-server

  • MCP Integration with FastMCP

  • ROS 2 Native Node

  • Time-Based Control for Movement

  • Asynchronous Processing

Use cases of ros2-mcp-server

  • Controlling robot movement with natural language commands

  • Integrating AI assistants with ROS 2 robots

  • Automating robot tasks through AI

  • Testing robot control algorithms with AI feedback

FAQ from ros2-mcp-server

What ROS 2 distribution is required?

ROS 2 Humble is required.

What Python version is required?

Python 3.10 is required for compatibility with ROS 2 Humble.

What is FastMCP?

FastMCP is a framework used for implementing MCP servers.

How do I configure the server for Claude?

You need to add a new MCP server in Claude's settings with the provided JSON configuration, ensuring the path to the repository is correct.

What topic does the server publish to?

The server publishes geometry_msgs/Twist messages to the /cmd_vel topic.