- Explore MCP Servers
- mcp-ros-cli
Mcp Ros Cli
What is Mcp Ros Cli
mcp-ros-cli is a Model Context Protocol interface designed for the ROS 2 command line interface, enabling language models to introspect ROS installations, execute commands, and retrieve results.
Use cases
Use cases for mcp-ros-cli include automating ROS command executions, integrating language models for enhanced command line interactions, and facilitating development workflows in Visual Studio Code.
How to use
To use mcp-ros-cli, clone the repository, install the required packages using pip, and configure Visual Studio Code to use the MCP tool. Ensure that the ROS environment is sourced in your shell configuration.
Key features
Key features include the ability to introspect ROS installations, execute commands, and retrieve results directly from the command line interface, all within the Visual Studio Code environment.
Where to use
mcp-ros-cli is primarily used in robotics development environments, particularly those utilizing ROS 2 for building and managing robotic applications.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Ros Cli
mcp-ros-cli is a Model Context Protocol interface designed for the ROS 2 command line interface, enabling language models to introspect ROS installations, execute commands, and retrieve results.
Use cases
Use cases for mcp-ros-cli include automating ROS command executions, integrating language models for enhanced command line interactions, and facilitating development workflows in Visual Studio Code.
How to use
To use mcp-ros-cli, clone the repository, install the required packages using pip, and configure Visual Studio Code to use the MCP tool. Ensure that the ROS environment is sourced in your shell configuration.
Key features
Key features include the ability to introspect ROS installations, execute commands, and retrieve results directly from the command line interface, all within the Visual Studio Code environment.
Where to use
mcp-ros-cli is primarily used in robotics development environments, particularly those utilizing ROS 2 for building and managing robotic applications.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Model Context Protocol (MCP) interface for the ROS 2 command line interface
A Model Context Protocol interface to the ROS 2 command line interface allowing language models to introspect ROS installations, execute commands, and retrieve results. It is designed to be use within Visual Studio Code, with the Github Copilot MCP Server support, and is not tested outside that environment.
NOTE: This project assumes that the ROS environment is part of the user’s login shell. For example on bash, the following lines should be in your
~/.bashrcfile:
# Source ROS 2 installation
source /opt/ros/humble/setup.bash
Walkthrough
Installation
Clone the repository and install the package using pip:
cd ~
git clone https://github.com/Ranch-Hand-Robotics/mcp-ros-cli.git
pip install -r mcp-ros-cli/requirements.txt
Open Visual Studio Chat (top of the screen using the github icon), login to Github if nessesary. Set the chat to use agent mode. Then select the tool icon, and add the mcp-ros-cli tool to your workspace. The resulting json file should look like:
Contributing
Contributions are welcome! Please fork the repository and submit a pull request with your changes. If you have any questions or suggestions, feel free to open an issue.
Development
To set up a development environment, we recommend using the “Server Side events” feature of the MCP. This allows you to run the MCP server separately from the chat and connect to it from your local machine. To do this, follow these steps:
cd ~
git clone https://github.com/Ranch-Hand-Robotics/mcp-ros-cli.git
pip install -r mcp-ros-cli/requirements.txt
Then, in visual studio code, open the folder mcp-ros-cli, then run the provided python debug entry.
Update .vscode/mcp.json to use the sse option
{
"servers": {
"ros2": {
"type": "sse",
"url": "http://localhost:3002/sse"
}
}
}
License
This project is licensed under the MIT License. See the LICENSE file for details.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










