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
Metadata
Release files for ros2-image-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ros2_image_mcp-0.1.0.tar.gz | 10.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ros2_image_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.9 kB
Release files / ros2_image_mcp-0.1.0.tar.gz
| Download URL | ros2_image_mcp-0.1.0.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fd8bb64c1a071ffa2c7b1230f61b1f8cacc72dbf7b9c7cd8f4565f30e5b4f1c
|
|
BLAKE2b-256 checksum How to use checksums |
89c677fbc38d1631a17663cbbb5be306fac5e8e3d8b915c07529f407339e5627
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 10, 2026.
Transparency logRelease files / ros2_image_mcp-0.1.0-py3-none-any.whl
| Download URL | ros2_image_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e32206f39d2c315509a2f8e5063b7a8986f173377204aebba18b90bd4aaef367
|
|
BLAKE2b-256 checksum How to use checksums |
8978326c62ea2df5216fcb352f6b2c410fba92ff0e3bd87338493dc3b3c46b86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 10, 2026.
Transparency log