This project integrates the Model Context Protocol (MCP) tool with LangGraph to build an LLM-powered ROS 2 robot agent.
This project utilizes few tools defined in the ROSA repository, as MCP tools.
- Python-based client-server architecture
- Uses MCP to connect local language models
- Integrates with ROS 2 (Humble)
- Designed for robotic decision-making workflows
client.py: Connects to MCP-enabled server and handles language model interaction, it has beed tested with the LLM model LLaMA 3.1:70B.new_server.py: Handles server-side logic and MCP node management
- Python 3.10+
- ROS 2 Humble
pip install fastmcp
pip install langchain-mcp-adaptersMake sure you have ROS 2 Humble installed. You can follow the official guide here: ROS 2 Installation Instructions
sudo apt update
sudo apt install ros-humble-turtlesimRun turtlesim in a terminal:
ros2 run turtlesim turtlesim_nodeClone this repo:
git clone git@github.com:sahars93/Langgraph-mcp-ROS2.gitAnd, run:
python3 client.py