ros2-mcp
Provides tools for inspecting and controlling ROS2 graphs, including topics, nodes, services, parameters, actions, and TF frames, with support for mock and live modes.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ros2-mcplist topics"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ros2-mcp
ros2-mcp is an MCP (Model Context Protocol) server so AI agents can inspect and control ROS2 graphs: topics, nodes, services, parameters, and simple pub/echo — without hand-writing ros2 CLI each time.
Mode | When |
mock (default) | Offline Windows / CI — seeded demo graph (turtlesim-like + cmd_vel) |
live | Host has ROS2 + |
Org: mergeos-bounties · MergeOS MRG bounties.
Why
AI tools need a stable tool schema for robotics work (list → echo → pub → service).
Full ROS2 on every contributor machine is heavy; mock mode is always runnable.
Pairs with Lappa (ROS2 package IDE): Lappa for edit/sim UI, ros2-mcp for agent control.
Related MCP server: WiseVision/mcp_server_ros_2
Quick start
cd D:\ThanhTrucSolutions\ros2-mcp
python -m venv .venv
.\.venv\Scripts\activate
pip install -e ".[dev]"
ros2-mcp demo
ros2-mcp tools list
ros2-mcp serveWire into Grok / Cursor / Claude Desktop
Grok (~/.grok/config.toml):
[mcp_servers.ros2]
command = "ros2-mcp"
args = ["serve"]
# or: command = "python", args = ["-m", "ros2_mcp", "serve"]
enabled = trueCursor / Claude example JSON:
{
"mcpServers": {
"ros2": {
"command": "ros2-mcp",
"args": ["serve"],
"env": { "ROS2_MCP_MODE": "mock" }
}
}
}See examples/.
MCP tools
Tool | Description |
| Get/set backend mode ( |
| List topics (+ optional types) |
| Type, publishers, subscribers |
| Last N messages from buffer / live snapshot |
| Publish JSON payload once or N times |
| List nodes |
| Pubs/subs/services for a node |
| List services |
| Call service with JSON request |
| List parameters (node optional) |
| Parameter get/set |
| Compact graph overview for the model |
| TF frames (mock map→odom→base_link) |
| Actions (mock nav2 + turtlesim) |
| Environment / connectivity check |
| Reset mock turtlesim-like graph |
CLI
ros2-mcp demo # offline smoke of all mock tools
ros2-mcp tools list # print tool names
ros2-mcp serve # stdio MCP server (for hosts)
ros2-mcp call list_topics # one-shot tool call (mock)Env
Variable | Default | Meaning |
|
|
|
|
| Hint for live ROS_DOMAIN_ID |
|
| Path to ros2 CLI |
| (empty) | Comma topics allowed in live publish (safety) |
Layout
src/ros2_mcp/
server.py # FastMCP app
cli.py
backend/ # mock + live ros2 CLI bridge
tools/ # tool registration
examples/ # host config snippets
docs/BOUNTY.mdTests
pip install -e ".[dev]"
ruff check src tests
pytest -q
ros2-mcp demoMergeOS bounties
Star this repo + mergeos
Claim a
bountyissueClaim on MergeOS issue #1
PR to ros2-mcp with tests
Credit MRG 25 / 50 / 100 / 200
See docs/BOUNTY.md.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mergeos-bounties/ros2-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server