How snick-m/auto_mcp works
Project Type and Purpose
• This is a ROS2 “drop-in” package named auto_mcp that exposes a Model Context Protocol (MCP) server over HTTP/SSE for any ROS-based robot.
• It introspects the live ROS topic graph at startup and publishes those topics (and their message interfaces) via an SSE endpoint on port 5000 so an LLM‐based client can subscribe and act on them.
File Structure Analysis
• Top-level files:
• package.xml, setup.py, setup.cfg – ROS2 and Python packaging metadata
• resource/auto_mcp – marker resource for ROS2 package discovery
• auto_mcp/ directory contains four modules:
• introspect.py – uses ROS2 introspection APIs to gather topic names and types
• fast_server.py – sets up the HTTP/SSE server (likely on 0.0.0.0:5000) and ties in the MCP SDK
• hello.py – sample or placeholder module (can represent basic sanity checks)
• __init__.py – package initializer
• test/ directory with linters and style checks, indicating CI and code quality gates.
README Insights
• Describes two logical phases:
a. Introspection Phase: run last, queries ROS2 for all live topics/interfaces
b. MCP Server Phase: spins up an SSE‐over‐HTTP transport using the MCP Python SDK
• External dependency: mcp Python SDK for the Model Context Protocol
• Usage: ros2 run auto_mcp server → introspection → SSE at /sse