Nico0302

Demo Setup

Community Nico0302
Updated

Expose arbitrary ROS 2 services and topics as MCP tools and list topics as resources.

ros2mcp

Expose arbitrary ROS 2 services as MCP tools and list topics as resources.

The mcp_server node can translate any ROS topic and service into a MCP resource or tool (including source comments as parameter descriptions).

Demo Setup

The demo can be run on Linux, macOS, and Windows using Pixi.

  1. Clone the repository.
git clone https://github.com/nico0302/ros2mcp.git
  1. Start Gazebo and Rviz2:
pixi run start-tb4

This might take a while on the first run as it downloads the necessary assets.

  1. After Gazebo and Rviz2 are running, select the 2D Pose Estimate tool in Rviz2 to set the robot's initial position by clicking in the center of the map and dragging to right:Rviz2 selecting 2D pose estimate

  2. Launch the MCP server and demo node (this will also run build):

pixi run demo-tb4
  1. Connect a MCP client to the demo server on http://localhost:8080This project includes a simple MCP client that can be run with:
# make sure to set your OPENAI_API_KEY environment variable
export OPENAI_API_KEY=your_openai_api_key
pixi run demo-client

MCP Server ยท Populars

MCP Server ยท New