io.github.wise-vision/mcp_server_ros_2
平台与服务by wise-vision
通过 MCP 查看 ROS 2 的 nodes 与 topics,并调用 services 和 actions,便于机器人调试与集成。
什么是 io.github.wise-vision/mcp_server_ros_2?
通过 MCP 查看 ROS 2 的 nodes 与 topics,并调用 services 和 actions,便于机器人调试与集成。
README
ROS2 MCP Server

A Python implementation of the Model Context Protocol (MCP) for ROS 2. This server enables AI tooling to connect with ROS 2 nodes, topics, and services using the MCP standard over stdio. Designed to be the easiest ROS 2 MCP server to configure.
✨ Tools
- List available topics
- List available services
- Lists available actions with their types and request fields
- Call services
- Subscribe to topics to collect messages
- Publish messages to topics
- Echo messages on topics
- Get fields from message types
- Sends an action goal and optionally waits for the result
- Requests the result of an action goal
- Subscribes to feedback messages from an action
- Subscribes to status updates of an action
- Cancels a specific goal or all active goals
- Get messages from WiseVision Data Black Box (InfluxDB alternative to Rosbag2)
🤖 Available Prompts
📘 Want to create a custom prompt? Check the guide here
📊 base.ros2-topic-echo-and-analyze
Subscribe to a ROS2 topic, collect messages for a specified duration, and provide statistical analysis of the collected data.
➡️ Can auto-detect topic if only one is available. Analyzes message rates, counts, and statistics on numeric fields.
🔄 base.ros2-topic-relay
Subscribe to one ROS2 topic and republish messages to another topic with optional transformations.
➡️ Supports identity relay, rate limiting, and change-based filtering.
🏥 base.ros2-node-health-check
Check if expected ROS2 topics and services are available and functioning correctly with optional publication rate monitoring.
➡️ Provides comprehensive health report with status indicators and recommendations.
🔍 base.ros2-topic-diff-monitor
Compare two ROS2 topics and report differences in their messages with detailed field-by-field analysis.
➡️ Useful for comparing raw sensor data with filtered/processed versions or verifying topic synchronization.
ROS2 MCP has Prompts extension with additional prompts See here
💡 Don’t know what prompts are? See the MCP spec here.
Note: To call a service with a custom (non-default) type, source the package that defines it before starting the server.
🎯 Why Choose This MCP Server?
Save hours of development time with native AI integration for your ROS 2 projects:
Why this ROS 2 MCP server ⭐
- ⚡ 1-minute setup - World's easiest ROS 2 MCP configuration
- 0️⃣ Zero-friction setup - stdio transport, no brokers, no webserver.
- 🔌 Auto type discovery - a built-in “list interfaces” tool dynamically enumerates available topics and services together with their message/service definitions (fields, types, schema) — so the client always knows exactly what data can be published or called.
- ✨ Nested field support: Handle complex message structures with ease.
- 🤖 AI-powered debugging - Let AI help you troubleshoot ROS 2 issues in real time
- 📊 Smart data analysis - Query your robot's sensor data using natural language
- 🚀 Boost productivity - Control robots, analyze logs, and debug issues through AI chat
- 💡 No ROS 2 expertise required - AI translates your requests into proper ROS 2 commands
- 🐋 Dockerized: Ready-to-use Docker image for quick deployment.
- 🔧 Auto QoS selection: Automatically selects appropriate Quality of Service settings for topics and services, ensuring optimal communication performance without manual configuration.
Perfect for: Robotics developers, researchers, students, and anyone working with ROS 2 who wants to leverage AI for faster development and debugging.
If you find this useful, please ⭐ star the repo — it helps others discover it.
🚀 Enjoying this project?
Feel free to contribute or reach out for support! Write issues, submit PRs, or join our Discord community to connect with other ROS 2 and AI enthusiasts.
🚀 Drone Mission Using Prompts

🌍 Real-world examples:

⚙️ Installation
Follow the installation guide for step-by-step instructions:
- 🧩 Install in Visual Studio Code Copilot
- 🤖 Install in Claude Desktop
- 💻 Install in Warp
- 🐳 Build Docker Image locally
💡 Want to try it in simulation?
Check out the Gazebo Drone Demo section
🔧 ROS 2 Tools
📋 Topics
| Tool | Description | Inputs | Outputs |
|---|---|---|---|
ros2_topic_list | Returns list of available topics | – | topic_name (string): Topic name <br> topic_type (string): Message type |
ros2_topic_subscribe | Subscribes to a ROS 2 topic and collects messages for a duration or message limit | topic_name (string) <br> duration (float) <br> message_limit (int) <br> (defaults: first msg, 5s) | messages <br> count <br> duration |
ros2_get_messages | Retrieves past messages from a topic (data black box) | topic_name (string) <br> message_type (string) <br> number_of_messages (int) <br> time_start (str) <br> time_end (str) | timestamps <br> messages |
ros2_get_message_fields | Gets field names and types for a message type | message_type (string) | Field names + types |
ros2_topic_publish | Publishes message to a topic | topic_name (string) <br> message_type (string) <br> data (dict) | status |
🛠 Services
| Tool | Description | Inputs | Outputs |
|---|---|---|---|
ros2_service_list | Returns list of available services | – | service_name (string) <br> service_type (string) <br> request_fields (array) |
ros2_service_call | Calls a ROS 2 service | service_name (string) <br> service_type (string) <br> fields (array) <br> force_call (bool, default: false) | result (string) <br> error (string, if any) |
🎯 Actions
| Tool | Description | Inputs | Outputs |
|---|---|---|---|
ros2_list_actions | Returns list of available ROS 2 actions with their types and request fields | – | actions[] (array) <br> └ name (string) <br> └ types[] (array of string) <br> └ request_fields (array) |
ros2_send_action_goal | Sends a goal to an action. Optionally waits for the result. | action_name (string) <br> action_type (string) <br> goal_fields (object) <br> wait_for_result (bool, default: false) <br> timeout_sec (number, default: 60.0) | accepted (bool) <br> goal_id (string|null) <br> send_goal_stamp (object|null) <br> waited (bool) <br> result_timeout_sec (number|null) <br> status_code (int|null) <br> status (string|null) <br> result (object|null) | error (string) |
ros2_cancel_action_goal | Cancels a specific goal or all goals for an action | action_name (string) <br> goal_id_hex (string, required if cancel_all=false) <br> cancel_all (bool, default: false) <br> stamp_sec (int, default: 0) <br> stamp_nanosec (int, default: 0) <br> wait_timeout_sec (number, default: 3.0) | service (string) <br> return_code (int) <br> return_code_text (string) <br> goals_canceling[] (array of {goal_id, stamp}) | error (string) |
ros2_action_request_result | Waits for the RESULT of a given goal via GetResult | action_name (string) <br> action_type (string) <br> goal_id_hex (string, 32-char UUID) <br> timeout_sec (number|null, default: 60.0) <br> wait_for_service_sec (number, default: 3.0) | service (string) <br> goal_id (string) <br> waited (bool) <br> result_timeout_sec (number|null) <br> status_code (int|null) <br> status (string|null) <br> result (object|null) | error (string) |
ros2_action_subscribe_feedback | Subscribes to feedback messages for an action. Can filter by goal_id. Collects messages for duration or max count. | action_name (string) <br> action_type (string) <br> goal_id_hex (string|null) <br> duration_sec (number, default: 5.0) <br> max_messages (int, default: 100) | topic (string) <br> action_type (string) <br> goal_id_filter (string|null) <br> duration_sec (number) <br> messages[] (array of {goal_id, feedback, recv_stamp}) | error (string) |
ros2_action_subscribe_status | Subscribes to an action's status topic and returns collected status frames | action_name (string) <br> duration_sec (number, default: 5.0) <br> max_messages (int, default: 100) | topic (string) <br> duration_sec (number) <br> frames[] (array of {stamp, statuses[]}) | error (string) |
🐞 Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector uv --directory /path/to/ros2_mcp run mcp_ros_2_server
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
📚 Origins and evolution
We built this server to make AI‑assisted ROS 2 development fast and reliable. Internally, we needed a simple way for agents to discover message types, publish/subscribe to topics, and call services—without boilerplate or flaky networking. That led to a few core design goals:
- Handle all ROS 2 message types (including nested fields) so agents can write and test any code
- Integrate topic pub/sub and service calls to validate behavior end‑to‑end
- Work seamlessly with GitHub Copilot in VS Code and other MCP clients
- Use a simple stdio transport to avoid network complexity
After dogfooding it, we open‑sourced the project to help the broader ROS 2 community build faster with AI. It’s now useful not only for development, but also for controlling robots, running QoS experiments, and analyzing live data and robot/swarm state. The project is actively maintained—features and improvements ship regularly based on user feedback. If this project helps you, please star the repo and share your use case!
常见问题
io.github.wise-vision/mcp_server_ros_2 是什么?
通过 MCP 查看 ROS 2 的 nodes 与 topics,并调用 services 和 actions,便于机器人调试与集成。
相关 Skills
MCP构建
by anthropics
聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。
✎ 想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。
Slack动图
by anthropics
面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。
✎ 帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。
MCP服务构建器
by alirezarezvani
从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。
✎ 帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。
相关 MCP Server
Slack 消息
编辑精选by Anthropic
Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。
✎ 这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。
by netdata
io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。
✎ 这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。
by d4vinci
Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。
✎ 这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。