Production-ready Model Context Protocol (MCP) server for go2rtc. Inspect camera feeds, probe video/audio codecs, take live JPEG snapshots, generate streaming URLs, and execute visual security patrolsβwith strict, automated credential redaction.
Built from the ground up for Linux media servers, Home Assistant OS, and modern AI environments.
Every tool return value, resource payload, client error message, and log record is recursively scrubbed of RTSP/HTTP credentials, ONVIF passwords, and API tokens.
Dangerous go2rtc sources like exec:, echo:, and expr: are strictly rejected by default before network requests are dispatched, preventing RCE vulnerabilities.
Captures real-time camera frames and feeds them directly to multimodal LLMs (Claude 3.7, Gemini 2.5 Flash/Pro, GPT-4o) for automated visual verification.
Probes live video and audio streams via /api/probe to diagnose codecs (H.264, H.265, AAC, Opus, PCMU) and identify WebRTC compatibility issues.
Instantly generate client-ready WebRTC (WHEP), MSE, HLS, MP4, MJPEG, and RTSP streaming links for direct browser or mobile playback.
Includes production-tested systemd unit files, environment files, and zero-install uvx execution for headless Linux and Home Assistant deployments.
Real RTSP streams expose camera credentials in producer URLs. go2rtc-mcp masks them automatically before LLMs ever see them.
Integrate go2rtc-mcp into your favorite MCP-compatible client in seconds.
Add to ~/.config/Claude/claude_desktop_config.json (Linux) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"go2rtc": {
"command": "uvx",
"args": ["go2rtc-mcp"],
"env": {
"GO2RTC_URL": "http://127.0.0.1:1984"
}
}
}
}
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"go2rtc": {
"command": "uvx",
"args": ["go2rtc-mcp"],
"env": {
"GO2RTC_URL": "http://127.0.0.1:1984"
}
}
}
}
Plugin configuration in mcp_config.json:
{
"mcpServers": {
"go2rtc": {
"command": "uvx",
"args": ["go2rtc-mcp"],
"env": {
"GO2RTC_URL": "http://127.0.0.1:1984"
}
}
}
}
Create /etc/systemd/system/go2rtc-mcp.service for headless background operation:
[Unit]
Description=go2rtc Model Context Protocol Server
After=network.target go2rtc.service
[Service]
Type=simple
User=root
WorkingDirectory=/opt/go2rtc-mcp
Environment="GO2RTC_URL=http://127.0.0.1:1984"
Environment="GO2RTC_TIMEOUT=15.0"
ExecStart=/root/.cargo/bin/uvx go2rtc-mcp
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
12 Tools, 4 MCP Resources, and 5 Specialized Prompts available out of the box.
GET /apiGET /api/streamssrc (string, required) β Stream name.src (string, required) β Stream name or media URL.src (string, required) β Stream name.mimeType: image/jpeg.
src (string, required) β Stream name.name (string), src (string or list of strings).exec:, echo:, expr: sources unless enabled.
GET /api/logConfigure go2rtc-mcp using environment variables or a .env file.
| Variable | Default | Description |
|---|---|---|
GO2RTC_URL |
http://localhost:1984 |
Base URL of the go2rtc server or Home Assistant go2rtc instance. |
GO2RTC_USERNAME |
(none) | Optional HTTP Basic Auth username for secured go2rtc instances. |
GO2RTC_PASSWORD |
(none) | Optional HTTP Basic Auth password for secured go2rtc instances. |
GO2RTC_TIMEOUT |
15.0 |
Timeout in seconds for HTTP requests to go2rtc. |
GO2RTC_ALLOW_EXEC_STREAMS |
false |
Allow adding streams with exec:, echo:, or expr: prefixes. |