ROS1 Noetic MCP Server
Enables LLMs to interact with ROS1 Noetic robotic systems by providing tools for topic management, service calls, and parameter configuration. It also supports node inspection, coordinate transform queries, and message introspection via the Model Context Protocol.
README
ROS1 Noetic MCP Server
An MCP (Model Context Protocol) server that provides LLM access to ROS1 Noetic robotic systems. Built with FastMCP and deployed as a Docker container.
Claude Code Quick Start
Add ROS MCP to Claude Code with a single command:
claude mcp add ros \
-e ROS_MASTER_URI=http://localhost:11311 \
-- docker run -i --rm --network host \
-e ROS_MASTER_URI \
ghcr.io/lopisan/ros-mcp --transport stdio
For remote ROS master:
claude mcp add ros \
-e ROS_MASTER_URI=http://192.168.1.100:11311 \
-e ROS_IP=192.168.1.50 \
-- docker run -i --rm --network host \
-e ROS_MASTER_URI -e ROS_IP \
ghcr.io/lopisan/ros-mcp --transport stdio
Features
- Topic Management: List, publish, subscribe, and echo ROS topics
- Service Management: List and call ROS services
- Parameter Management: Get, set, list, and delete ROS parameters
- Node Inspection: List nodes and get detailed node information
- TF Transforms: Query coordinate frame transforms, transform points/poses
- Message Introspection: View message and service definitions
Quick Start
Prerequisites
- Docker and Docker Compose
- Running ROS1 Noetic system with roscore
Running with Docker Compose
- Clone this repository:
git clone <repository-url>
cd ros_mcp
- Set environment variables (optional):
export ROS_MASTER_URI=http://localhost:11311
export ROS_IP=127.0.0.1
- Start the MCP server:
docker compose up -d
The server will be available at http://localhost:8000/mcp.
Running with stdio transport (for local development)
docker compose --profile stdio up ros-mcp-server-stdio
Testing the Server
Using MCP Inspector
The easiest way to test the MCP server is using the official MCP Inspector:
npx @modelcontextprotocol/inspector http://localhost:8000/mcp
This opens an interactive web UI where you can:
- Browse available tools and resources
- Test tool calls with custom parameters
- View server responses in real-time
Configuration
Environment Variables
| Variable | Default | Description |
|---|---|---|
ROS_MASTER_URI |
http://localhost:11311 |
URI of the ROS master |
ROS_IP |
127.0.0.1 |
IP address of this machine for ROS networking |
MCP_TRANSPORT |
http |
Transport mode: http, sse, or stdio |
MCP_PORT |
8000 |
Port for HTTP transport |
MCP Client Configuration
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"ros": {
"url": "http://localhost:8000/mcp"
}
}
}
Claude Code Configuration
Add the MCP server to Claude Code using stdio transport:
# Local ROS master
claude mcp add ros \
-e ROS_MASTER_URI=http://localhost:11311 \
-- docker run -i --rm --network host \
-e ROS_MASTER_URI \
ros_mcp-ros-mcp-server --transport stdio
# Remote ROS master
claude mcp add ros \
-e ROS_MASTER_URI=http://192.168.1.100:11311 \
-e ROS_IP=192.168.1.50 \
-- docker run -i --rm --network host \
-e ROS_MASTER_URI -e ROS_IP \
ros_mcp-ros-mcp-server --transport stdio
Other useful commands:
# List configured MCP servers
claude mcp list
# Remove the server
claude mcp remove ros
Available Tools
Topic Tools
| Tool | Description |
|---|---|
ros_list_topics |
List all active ROS topics |
ros_get_topic_info |
Get detailed information about a topic |
ros_publish |
Publish a message to a topic |
ros_subscribe_once |
Get a single message from a topic |
ros_echo_topic |
Get multiple messages from a topic |
Service Tools
| Tool | Description |
|---|---|
ros_list_services |
List all available services |
ros_get_service_info |
Get service details |
ros_call_service |
Call a ROS service |
Parameter Tools
| Tool | Description |
|---|---|
ros_list_params |
List all parameters |
ros_get_param |
Get a parameter value |
ros_set_param |
Set a parameter value |
ros_delete_param |
Delete a parameter |
ros_has_param |
Check if parameter exists |
ros_search_param |
Search for a parameter |
Node Tools
| Tool | Description |
|---|---|
ros_list_nodes |
List all active nodes |
ros_get_node_info |
Get node publications, subscriptions, services |
ros_ping_node |
Check if a node is responsive |
ros_get_master_info |
Get ROS master information |
Message Tools
| Tool | Description |
|---|---|
ros_show_msg |
Show message type definition |
ros_show_srv |
Show service type definition |
ros_list_msg_types |
List available message types |
ros_list_srv_types |
List available service types |
ros_msg_md5 |
Get message type MD5 sum |
TF Transform Tools
| Tool | Description |
|---|---|
ros_list_frames |
List all TF frames |
ros_lookup_transform |
Get transform between frames |
ros_can_transform |
Check if transform is available |
ros_get_frame_tree |
Get TF tree structure |
ros_transform_point |
Transform a point between frames |
ros_transform_pose |
Transform a pose between frames |
Available Resources
| Resource URI | Description |
|---|---|
ros://system/status |
System connectivity status |
ros://topics |
List of all topics |
ros://nodes |
List of all nodes |
ros://services |
List of all services |
ros://params |
List of all parameters |
ros://topic/{name} |
Topic info and latest message |
ros://node/{name} |
Node information |
ros://param/{name} |
Parameter value |
ros://tf/frames |
List of TF frames |
Example Usage
List all topics
Use the ros_list_topics tool to see what topics are available.
Get robot position
Use ros_subscribe_once on the /odom topic to get the current odometry.
Send a velocity command
Use ros_publish to send a geometry_msgs/Twist message to /cmd_vel with linear.x = 0.5.
Check TF transform
Use ros_lookup_transform to get the transform from base_link to map.
Development
Building locally
# Build the Docker image
docker build -t ros-mcp-server .
# Run with custom settings
docker run --network host \
-e ROS_MASTER_URI=http://localhost:11311 \
ros-mcp-server
Running without Docker
Requires ROS Noetic environment:
# Source ROS
source /opt/ros/noetic/setup.bash
# Install dependencies
pip install -e .
# Run the server
python -m ros_mcp_server --transport http --port 8000
Project Structure
ros_mcp/
├── Dockerfile
├── docker-compose.yml
├── pyproject.toml
├── requirements.txt
├── README.md
└── src/
└── ros_mcp_server/
├── __init__.py
├── __main__.py
├── server.py
├── tools/
│ ├── topics.py
│ ├── services.py
│ ├── params.py
│ ├── nodes.py
│ ├── messages.py
│ └── transforms.py
├── resources/
│ └── ros_resources.py
└── utils/
├── ros_bridge.py
└── message_utils.py
Troubleshooting
Cannot connect to ROS master
- Ensure roscore is running
- Check
ROS_MASTER_URIis correct - Verify network connectivity (use
network_mode: hostin Docker)
Transform lookup fails
- Wait for TF data to be published
- Check that both frames exist with
ros_list_frames - Verify the transform chain exists with
ros_get_frame_tree
Message type not found
- Ensure the message package is installed in the Docker container
- For custom messages, mount the workspace or rebuild the Docker image
License
MIT License
References
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。