How lpigeon/ros-mcp-server works
Project type and purpose
• This is a middleware robotics service (“ROS MCP Server”) that exposes a WebSocket-based Model Context Protocol (MCP) interface for converting natural-language/LLM requests into ROS/ROS2 commands via rosbridge.
• It sits between any LLM or AI client and a running ROS/ROS2 ecosystem, translating function calls into topic publishes or service calls.
File structure
• Top level
• server.py: entry point for the WebSocket MCP server
• Dockerfile: containerizes the MCP server
• smithery.yaml: Smithery installer config
• pyproject.toml / uv.lock: Python project and dependency lock files
• MCPFUNCTIONS.md: lists the exposed robot control functions
• Directories
• msgs/: Python definitions for ROS message types (geometry_msgs/Twist, sensor_msgs/Image, sensor_msgs/JointState)
• utils/websocket_manager.py: manages WebSocket connections to clients and to rosbridge
• img/: static images (used in README)
• Configuration
• mcp.json (user-provided) configures how Claude or other clients launch server.py via uv
Key architectural insights from the README
• The server uses rosbridge_websocket on ROS 1 or ROS 2 to talk to the robot’s topics/services.
• Clients connect over WebSocket to server.py, send MCP function calls, receive responses.
• The server can optionally invoke native ROS/ROS2 libraries directly instead of rosbridge.