ros2-mcp
MCP server for AI agents to inspect and control ROS2 graphs, enabling topic listing, node info, service calls, parameter management, and pub/echo without manual ROS2 CLI usage.
README
ros2-mcp
ros2-mcp is an MCP (Model Context Protocol) server so AI agents (Grok, Cursor, Claude, …) can inspect and control ROS2 graphs — topics, nodes, services, TF, actions — without hand-writing every ros2 CLI call.
Product: mergeos-bounties/ros2-mcp
Table of contents
- Modes
- Highlights
- Screenshots
- Quick start
- CLI reference
- MCP host config
- Diagrams
- Repository layout
- Development
- MergeOS bounties
- License
Modes
| Mode | When | Behavior |
|---|---|---|
| mock (default) | Windows / CI / no ROS2 install | Seeded turtlesim-like graph: topics, pub, echo, services, TF, actions |
| live | Host has ROS2 + CLI | Real graph via ros2 subprocess bridge (secrets redacted in logs) |
Highlights
| Capability | Description |
|---|---|
| Offline demo | ros2-mcp demo exercises doctor, topics, pub/echo, spawn, TF, actions |
| MCP stdio serve | Plug into agent hosts as an MCP server |
| One-shot call | ros2-mcp call without a full MCP host |
| Tool list | Discover registered MCP tools |
| Lappa-friendly | Complements Lappa package IDE workflows |
Screenshots
| Mock graph | Pub + echo |
|---|---|
![]() |
![]() |
| Seeded graph / doctor | cmd_vel pub + pose echo |
Quick start
cd ros2-mcp
python -m venv .venv
.\.venv\Scripts\activate
pip install -e ".[dev]"
ros2-mcp version
ros2-mcp demo
ros2-mcp tools list
Mock mode needs no ROS2 install.
CLI reference
| Command | Purpose |
|---|---|
ros2-mcp version |
Version + mode |
ros2-mcp demo |
Offline smoke of core backend APIs |
ros2-mcp serve |
MCP server over stdio (for hosts) |
ros2-mcp call … |
One-shot tool call (mock/live) |
ros2-mcp tools list |
List MCP tools |
# MCP for Cursor / Claude / Grok-compatible hosts
ros2-mcp serve
MCP host config
Example stdio server entry (adjust path to your venv):
{
"mcpServers": {
"ros2-mcp": {
"command": "ros2-mcp",
"args": ["serve"],
"env": {
"ROS2_MCP_MODE": "mock"
}
}
}
}
Set ROS2_MCP_MODE=live only on machines with a working ROS2 environment.
Diagrams
System architecture and workflow — full width. Open the HTML files for dark/light theme and export (PNG/SVG).
Architecture
<p align="center"> <img src="docs/diagrams/architecture.svg" alt="ros2-mcp architecture" width="100%" /> </p>
Workflow
<p align="center"> <img src="docs/diagrams/workflow.svg" alt="ros2-mcp workflow" width="100%" /> </p>
Generated with archify.
Repository layout
AI agent (MCP host)
│ stdio
▼
ros2-mcp server
│
┌────┴────┐
│ mock │ seeded graph (CI / Windows)
│ live │ ros2 CLI subprocess bridge
└─────────┘
src/ros2_mcp/
cli.py
backend/ # mock + live backends
server.py # FastMCP tools
docs/screenshots/
docs/diagrams/
Development
pytest -q
ruff check src tests
ros2-mcp demo
Live mode tests should mock subprocesses — CI must not require a ROS2 distro.
MergeOS bounties
Tools for actions/TF, live parsers, Lappa HTTP bridge, publish allowlists.
Star → claim → PR master → MRG 25–200. Evidence: CLI logs / MCP host config snippets (redact secrets).
Tiếng Việt
ros2-mcp cho AI điều khiển ROS2 qua MCP. Offline: ros2-mcp demo (mock). Live: máy có ROS2 + ROS2_MCP_MODE=live.
License
MIT · MergeOS / ThanhTrucSolutions
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

