Get the FREE Ultimate OpenClaw Setup Guide →

ros2_medkit_mcp

MCP server for ros2_medkit. Bridge LLM agents to the SOVD REST API for ROS 2 diagnostics and remote operations.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio selfpatch-ros2_medkit_mcp poetry run ros2-medkit-mcp-http \
  --env ROS2_MEDKIT_BASE_URL="http://localhost:8080/api/v1" \
  --env ROS2_MEDKIT_BEARER_TOKEN=""

How to use

The ros2_medkit_mcp server acts as an MCP adapter that bridges an LLM to the ros2_medkit SOVD HTTP API. It does not implement the API itself but exposes MCP tools that call the existing gateway endpoints for discovery, entity data, operations, and configurations. With either the stdio or HTTP transport, you can query ROS 2 system state, topics, services, and parameters through the MCP toolset. The server supports bearer token authentication and allows configuring the base SOVD URL via environment variables.

To use the tools, run the MCP server (stdio mode for local desktop setups or http mode for remote access). Then invoke the available MCP tools such as sovd_version, sovd_entities_list, sovd_entity_data, sovd_publish_topic, sovd_list_operations, and sovd_create_execution to interact with the ROS 2 system through the ros2_medkit gateway. In VS Code or Claude Copilot, configure the MCP server in your MCP configuration file to enable the tools in your AI-assisted workflows.

How to install

Prerequisites:

Installation steps:

  1. Clone the repository git clone https://github.com/selfpatch/ros2_medkit_mcp.git cd ros2_medkit_mcp

  2. Install Python dependencies via Poetry poetry install

  3. Configure environment variables (example)

  4. Run the MCP server (stdio transport) poetry run ros2-medkit-mcp-stdio

  5. Alternatively, run the HTTP transport poetry run ros2-medkit-mcp-http --host 0.0.0.0 --port 8765

  6. Verify the server is up (example for HTTP transport) curl http://localhost:8765/health

Additional notes

Notes and tips:

  • The MCP server relies on the ros2_medkit gateway being reachable at the configured ROS2_MEDKIT_BASE_URL. If you run the gateway on a separate host or inside Docker, set ROS2_MEDKIT_BASE_URL accordingly and ensure network connectivity.
  • If using Docker or remote hosts, the host network name like host.docker.internal may be required to reach the gateway from containers.
  • Authentication can be enabled via ROS2_MEDKIT_BEARER_TOKEN. Leave it empty if the gateway does not require authentication.
  • The MCP tools include discovery (sovd_version, sovd_entities_list), data access (sovd_entity_data, sovd_entity_topic_data), and operations (sovd_list_operations, sovd_create_execution). They can be wired into IDEs like VS Code or Claude Copilot for seamless ROS 2 queries.
  • When using Docker, you can pass ROS2_MEDKIT_BASE_URL with -e to override the default base URL, and map ports as needed (e.g., -p 8765:8765).
  • Example MCP configurations for VS Code or Claude Desktop show how to embed the command and environment in your mcp.json files.

Related MCP Servers

Sponsor this space

Reach thousands of developers