/ Каталог / Песочница / ros-mcp-server
● Сообщество robotmcp ⚡ Сразу

ros-mcp-server

автор robotmcp · robotmcp/ros-mcp-server

Let Claude or GPT drive a ROS-connected robot — publish topics, call services, read sensors — via rosbridge, no code changes.

robotmcp/ros-mcp-server connects AI models to ROS 1 and ROS 2 robots via rosbridge. Publish to topics, subscribe, call services and actions, set parameters, read sensor data. Works across ROS distros including Humble and Jazzy.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

ros.replay ▶ готово
0/0

Установка

Выберите клиент

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "ros": {
      "command": "uvx",
      "args": [
        "ros-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "ros": {
      "command": "uvx",
      "args": [
        "ros-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "ros": {
      "command": "uvx",
      "args": [
        "ros-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "ros": {
      "command": "uvx",
      "args": [
        "ros-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "ros",
      "command": "uvx",
      "args": [
        "ros-mcp-server"
      ]
    }
  ]
}

Continue использует массив объектов серверов, а не map.

~/.config/zed/settings.json
{
  "context_servers": {
    "ros": {
      "command": {
        "path": "uvx",
        "args": [
          "ros-mcp-server"
        ]
      }
    }
  }
}

Добавьте в context_servers. Zed перезагружается автоматически.

claude mcp add ros -- uvx ros-mcp-server

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: ros-mcp-server

How to drive a simulated robot from chat

👤 ROS learners, robotics devs prototyping behaviors ⏱ ~30 min intermediate

Когда использовать: You want to test high-level robot behaviors quickly.

Предварительные требования
  • ROS 2 (Humble/Jazzy) or ROS 1 running — Docker containers for Humble work great for quick starts
  • rosbridge_suite installed + running — ros2 launch rosbridge_server rosbridge_websocket_launch.xml
  • Python 3.10+ + uvx — brew install [email protected] uv
Поток
  1. Connect to rosbridge
    Configure the MCP with ROSBRIDGE_URL=ws://localhost:9090 and verify connection.✓ Скопировано
    → List of active topics returned
  2. Move the robot
    Publish to /cmd_vel a Twist message moving forward at 0.2 m/s for 3 seconds, then stop.✓ Скопировано
    → Robot moves in sim
  3. Read a sensor
    Subscribe to /scan for 2 seconds and report obstacles within 1m.✓ Скопировано
    → Range data summary

Итог: A live robot responding to natural-language commands.

Подводные камни
  • Sending too-fast velocity commands crashes/tips the robot — Rate-limit commands in your prompt; start with small velocities
  • Unsafe autonomy — no geofence — Always run first in simulation (Gazebo); never wire this to a physical robot without e-stop

How to produce a natural-language robot health summary

👤 Robotics ops teams ⏱ ~15 min beginner

Когда использовать: You want a quick 'what's the robot doing' readout.

Поток
  1. List topics
    List all active topics.✓ Скопировано
    → Topic catalog
  2. Sample key sensors
    Subscribe to /battery_state and /odom for 3 seconds each; summarize.✓ Скопировано
    → Battery % + pose summary
  3. Check parameters
    Get the value of /navigation.max_velocity.✓ Скопировано
    → Parameter value

Итог: Operator-friendly summary of robot state.

How to call a ROS action (e.g., navigate to pose) from chat

👤 Robotics devs testing nav stacks ⏱ ~15 min intermediate

Когда использовать: You want to trigger a goal without writing a client.

Поток
  1. Send goal
    Call action /navigate_to_pose with goal x=2.0 y=1.0 yaw=0.✓ Скопировано
    → Goal accepted, feedback streamed
  2. Monitor feedback
    Stream feedback until goal reached or 30s elapses.✓ Скопировано
    → Progress + outcome

Итог: Navigation test without writing a client.

Подводные камни
  • rosbridge action support varies by version — Use ROS 2 + rosbridge 2.x for best action coverage

Комбинации

Сочетайте с другими MCP — эффект x10

Log robot runs to disk for later analysis

Subscribe to /odom for 60 seconds and write the trajectory to /logs/run-2026-04-14.csv.✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
list_topics Discover the robot free
publish_topic topic: str, type: str, msg: obj Command the robot free
subscribe_topic topic: str, duration_s?: int Read sensor data free
call_service service: str, request: obj One-shot RPC to the robot free
send_action_goal action: str, goal: obj Long-running tasks (nav, manipulation) free
get_param name: str Inspect config free
set_param name, value Tune at runtime free

Стоимость и лимиты

Во что обходится

Квота API
None — local rosbridge WebSocket
Токенов на вызов
Topic messages can be large (images, pointclouds); avoid streaming high-bandwidth topics into the LLM
Деньги
Free
Совет
Never subscribe to image or pointcloud topics into an LLM — summarize on the robot side first.

Безопасность

Права, секреты, радиус поражения

Минимальные скоупы: Network access to the rosbridge WebSocket
Хранение учётных данных: None by default; put rosbridge behind auth for non-local use
Исходящий трафик: ROS topics flow to the LLM provider — treat sensor data as going to a third party
Никогда не давайте: Do not expose rosbridge to the public internet Do not grant autonomy without a hardware e-stop

Устранение неполадок

Частые ошибки и исправления

Cannot connect to rosbridge

Ensure rosbridge_server is running and reachable at the URL. For ROS 2: ros2 launch rosbridge_server rosbridge_websocket_launch.xml

Проверить: nc -vz localhost 9090
Topic publish rejected — unknown type

Pass the exact message type (e.g., geometry_msgs/msg/Twist). Use list_topics to see registered types.

Action feedback not streaming

Older rosbridge versions have spotty action support. Upgrade to 2.x.

High-bandwidth topic crashes the agent

Do not subscribe to /camera/image_raw or /velodyne_points through the LLM. Summarize on-robot.

Альтернативы

ros-mcp-server в сравнении

АльтернативаКогда использоватьКомпромисс
rosa (NASA JPL)You want a LangChain-based ROS agent, not MCPDifferent architecture; not pluggable into Claude Desktop

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills