Provides comprehensive tools for interacting with ROS (Robot Operating System) via rosbridge WebSocket connection, enabling topic operations (listing, publishing, monitoring), service calls, and action server management for robotic systems
Rosbridge MCP Server
A Model Context Protocol (MCP) server that provides comprehensive tools for interacting with ROS (Robot Operating System) via rosbridge WebSocket connection. This Python implementation enables AI assistants to monitor and control ROS systems through a standardized interface.
Features
- Topic Operations: List topics, get topic info, and publish messages
- Service Operations: List services and call ROS services
- Action Operations: List action servers, send goals, and cancel actions
Usage
Choose one of these examples based on your needs:
Basic usage (localhost):
Custom rosbridge host:
Remote ROS system:
Configuration
The server can be configured using environment variables:
ROSBRIDGE_HOST
The rosbridge server host (default: "localhost")
Examples:
localhost
: Local rosbridge192.168.1.100
: Remote IP addressros-robot.local
: Hostname
ROSBRIDGE_PORT
The rosbridge server port (default: "9090")
Standard rosbridge WebSocket port is 9090.
Available Tools
Topic Operations
list_topics
List all available ROS topics with their types.
No parameters required.
get_topic_info
Get detailed information about a specific topic including publishers and subscribers.
Parameters:
topic
(required): The ROS topic name (e.g., "/cmd_vel")
publish_topic
Publish a message to a ROS topic.
Parameters:
topic
(required): The ROS topic name (e.g., "/cmd_vel")message_type
(required): The ROS message type (e.g., "geometry_msgs/Twist")message
(required): The message data as a JSON object
Example:
Service Operations
list_services
List all available ROS services.
No parameters required.
publish_service
Call a ROS service.
Parameters:
service
(required): The ROS service name (e.g., "/add_two_ints")service_type
(required): The ROS service type (e.g., "rospy_tutorials/AddTwoInts")request
(required): The service request data as a JSON objecttimeout
(optional): Timeout in seconds (default: 10)
Example:
Action Operations
list_actions
List all available ROS action servers.
No parameters required.
publish_action
Send a goal to a ROS action server.
Parameters:
action_name
(required): The ROS action server name (e.g., "/move_base")action_type
(required): The ROS action type (e.g., "move_base_msgs/MoveBaseAction")goal
(required): The goal data as a JSON objecttimeout
(optional): Timeout in seconds to wait for result (default: 30)
Example:
cancel_action
Cancel a running ROS action goal.
Parameters:
action_name
(required): The ROS action server name (e.g., "/move_base")goal_id
(optional): The specific goal ID to cancel (cancels all if not provided)
Development
- Clone this repository
- Install dependencies using uv
- Start rosbridge on your ROS system
- Run the server
- Test with MCP Inspector (optional)
Publishing to PyPI
This project uses PyPI's Trusted Publishers feature for secure, token-less publishing via GitHub Actions.
1. Configure PyPI Trusted Publisher
- Log in to PyPI (create account if needed)
- Go to https://pypi.org/
- Navigate to Publishing Settings
- Go to your account settings
- Click on "Publishing" or go to https://pypi.org/manage/account/publishing/
- Add GitHub Publisher
- Click "Add a new publisher"
- Select "GitHub" as the publisher
- Fill in:
- Owner:
TakanariShimbo
(your GitHub username/org) - Repository:
rosbridge-mcp-server
- Workflow name:
pypi-publish.yml
- Environment:
pypi
(optional but recommended)
- Owner:
- Click "Add"
2. Configure GitHub Environment (Recommended)
- Navigate to Repository Settings
- Go to your GitHub repository
- Click "Settings" → "Environments"
- Create PyPI Environment
- Click "New environment"
- Name:
pypi
- Configure protection rules (optional):
- Add required reviewers
- Restrict to specific branches/tags
3. Setup GitHub Personal Access Token (for release script)
The release script needs to push to GitHub, so you'll need a GitHub token:
- Create GitHub Personal Access Token
- Go to https://github.com/settings/tokens
- Click "Generate new token" → "Generate new token (classic)"
- Set expiration (recommended: 90 days or custom)
- Select scopes:
- ✅
repo
(Full control of private repositories)
- ✅
- Click "Generate token"
- Copy the generated token (starts with
ghp_
)
- Configure Git with Token
4. Release New Version
Use the release script to automatically version, tag, and trigger publishing:
5. Verify Publication
- Check GitHub Actions
- Go to "Actions" tab in your repository
- Verify the "Publish to PyPI" workflow completed successfully
- Verify PyPI Package
- Visit: https://pypi.org/project/rosbridge-mcp-server/
- Or run:
pip show rosbridge-mcp-server
Release Process Flow
release.sh
script updates version in all files- Creates git commit and tag
- Pushes to GitHub
- GitHub Actions workflow triggers on new tag
- Workflow uses OIDC to authenticate with PyPI (no tokens needed!)
- Workflow builds project and publishes to PyPI
- Package becomes available globally via
pip install
oruvx
Code Quality
This project uses ruff
for linting and formatting:
Project Structure
License
MIT
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A Model Context Protocol server that provides tools to publish messages to ROS topics via rosbridge WebSocket, enabling integration between language models and ROS-based robotics systems.
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server that enables natural language interactive control of Universal Robots collaborative robots, allowing users to control robot motion, monitor status, and execute programs through direct commands to large language models.Last updated -293Python
- -securityAlicense-qualityA Model Context Protocol server that allows interaction with RSS feeds, enabling users to import subscriptions via OPML files, fetch and update articles automatically, and filter content by source and status.Last updated -24JavaScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that allows users to create and manage meeting bots capable of joining video calls, speaking, sending chat messages, and retrieving meeting transcripts.Last updated -1212TypeScriptMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server implementation that enables real-time data communication between web pages and client applications through WebSocket connections.Last updated -2594TypeScript