MCP server (FastMCP) exposing ROS 2 image topics to VLM agents
Project description
ros2-image-mcp
MCP server (FastMCP) that exposes ROS 2 sensor_msgs/Image topics to VLMs and agents.
Tools: get_latest_ros_image · get_recent_ros_image_frames
Requirements
- ROS 2 sourced (
source /opt/ros/<distro>/setup.bash) - Python 3.10+
Install
source /opt/ros/humble/setup.bash # or your distro
cd /path/to/ros2_img_mcp
pip install -U pip setuptools
pip install -e .
Optional demo extras: pip install -e ".[langgraph-demo]"
Quick start
-
Publish images on a topic (synthetic test pattern, or a real camera):
python3 scripts/publish_test_image.py --topic /test/camera/image # webcam example: add --device 4 (for /dev/video4)
-
Run the MCP server (separate terminal, ROS sourced):
ros2-image-mcp --default-topic /test/camera/image
-
Point your MCP client at the server — stdio (default above) or HTTP:
ros2-image-mcp --default-topic /test/camera/image --transport http --port 8012
HTTP endpoint:
http://127.0.0.1:8012/mcp(path/mcpby default).
Cursor (stdio) — ROS must be sourced inside the command:
{
"mcpServers": {
"ros2-camera": {
"command": "bash",
"args": [
"-lc",
"source /opt/ros/humble/setup.bash && ros2-image-mcp --default-topic /test/camera/image"
]
}
}
}
LangGraph-style HTTP — transport: "http" and url: "http://127.0.0.1:8012/mcp" (or streamable_http if your client expects that name; URL unchanged).
Limitations
- Depth / float formats (e.g.
32FC1) are not converted; use an RGB topic or encode topng/jpegon the ROS side. - Very large images are heavy on MCP payloads; consider downscaling in ROS if needed.
More detail : DEVELOPERS.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ros2_image_mcp-0.1.0.tar.gz.
File metadata
- Download URL: ros2_image_mcp-0.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fd8bb64c1a071ffa2c7b1230f61b1f8cacc72dbf7b9c7cd8f4565f30e5b4f1c
|
|
| MD5 |
a41042f82d6b92b49030dfe1778e86e4
|
|
| BLAKE2b-256 |
89c677fbc38d1631a17663cbbb5be306fac5e8e3d8b915c07529f407339e5627
|
Provenance
The following attestation bundles were made for ros2_image_mcp-0.1.0.tar.gz:
Publisher:
pypi-publish.yml on madhawap/ros2_image_mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ros2_image_mcp-0.1.0.tar.gz -
Subject digest:
8fd8bb64c1a071ffa2c7b1230f61b1f8cacc72dbf7b9c7cd8f4565f30e5b4f1c - Sigstore transparency entry: 1268752991
- Sigstore integration time:
-
Permalink:
madhawap/ros2_image_mcp@859ee6730b17994d1cdf2944021ae8e8738b0deb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/madhawap
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@859ee6730b17994d1cdf2944021ae8e8738b0deb -
Trigger Event:
release
-
Statement type:
File details
Details for the file ros2_image_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ros2_image_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e32206f39d2c315509a2f8e5063b7a8986f173377204aebba18b90bd4aaef367
|
|
| MD5 |
1ecbbbe6e504c421e9e498dd142ce868
|
|
| BLAKE2b-256 |
8978326c62ea2df5216fcb352f6b2c410fba92ff0e3bd87338493dc3b3c46b86
|
Provenance
The following attestation bundles were made for ros2_image_mcp-0.1.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on madhawap/ros2_image_mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ros2_image_mcp-0.1.0-py3-none-any.whl -
Subject digest:
e32206f39d2c315509a2f8e5063b7a8986f173377204aebba18b90bd4aaef367 - Sigstore transparency entry: 1268753177
- Sigstore integration time:
-
Permalink:
madhawap/ros2_image_mcp@859ee6730b17994d1cdf2944021ae8e8738b0deb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/madhawap
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@859ee6730b17994d1cdf2944021ae8e8738b0deb -
Trigger Event:
release
-
Statement type: