Skip to content

sahars93/Langgraph-mcp-ROS2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP + LangGraph Integration for ROS 2 Robot Agent

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.

Features

  • Python-based client-server architecture
  • Uses MCP to connect local language models
  • Integrates with ROS 2 (Humble)
  • Designed for robotic decision-making workflows

Files

  • 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

Requirements

  • Python 3.10+
  • ROS 2 Humble
pip install fastmcp
pip install langchain-mcp-adapters

Usage

Make sure you have ROS 2 Humble installed. You can follow the official guide here: ROS 2 Installation Instructions

🐢 Install and Run Turtlesim

sudo apt update
sudo apt install ros-humble-turtlesim

Run turtlesim in a terminal:

ros2 run turtlesim turtlesim_node

🤖 Run ROS Agent (Client)

Clone this repo:

git clone git@github.com:sahars93/Langgraph-mcp-ROS2.git

And, run:

python3 client.py

Demo

Demo GIF

About

MCP tool integration with LangGraph for a ROS 2 robot agent.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages