IP cameras (ONVIF/RTSP)
v0.5.1MCP server for local IP cameras (ONVIF/RTSP): snapshots, recordings, pan/tilt, presets
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_cameras List cameras
List configured cameras with their ids (names), uids, types, scenes (the place each one watches) and capabilities (camera, ptz). include_removed=true also lists removed cameras whose files are still on disk ("removed": true), e.g. to clean them up with delete_camera.
| Parameter | Type | Description |
|---|---|---|
include_removed | boolean |
camera_snapshot Take a snapshot
Take a still picture from a camera. Returns the image (downscaled to at most 1280 px wide) and the path of the full-size JPEG saved on the local machine. quality: "high" = main stream (full resolution set on the camera); "low" = sub stream (smaller, quicker). crop: [x, y, w, h] as fractions of the frame (0-1) to see a detail at full resolution. region: a named ninth of the frame instead of crop (not both). from_path: reuse an earlier full-size snapshot (e.g. the one just viewed, or one from scene_timeline) instead of taking a new one; combine with crop/region to zoom into it. The camera is no…
| Parameter | Type | Description |
|---|---|---|
camera | ||
crop | ||
from_path | ||
quality | string | |
region |
camera_save_baseline Save a baseline snapshot
Take a snapshot and keep it as a named reference for camera_compare (e.g. 'door-closed').
| Parameter | Type | Description |
|---|---|---|
camera * | string | |
name * | string | |
quality | string |
camera_compare Compare with a previous snapshot
Take a new snapshot and report what changed compared with this camera's previous snapshot in its current scene, or with a named baseline saved in that scene. Use the reported cells as `region` in camera_snapshot to look closer.
| Parameter | Type | Description |
|---|---|---|
camera * | string | |
baseline | ||
quality | string |
list_scenes List scenes
The scenes (places watched): their configured cameras, removed cameras that were there, the time of the oldest and newest capture, and how many there are.
scene_snapshot Snapshot every camera in a scene
Take a snapshot with every camera in the scene, labelled with the camera's name.
| Parameter | Type | Description |
|---|---|---|
scene * | string | |
quality | string |
scene_compare Compare every camera in a scene
camera_compare for every camera in the scene, labelled with the camera's name.
| Parameter | Type | Description |
|---|---|---|
scene * | string | |
baseline | ||
quality | string |
scene_record Record every camera in a scene
Record a video clip (1-60 s) with every camera in the scene at the same time, labelled with the camera's name. Returns each file's path and size, not the video. quality: "high" = main stream (full resolution set on the camera); "low" = sub stream (smaller file).
| Parameter | Type | Description |
|---|---|---|
scene * | string | |
quality | string | |
seconds | integer |
scene_timeline Scene timeline
The scene's snapshots, recordings and baselines, newest first, from every camera that watched it (removed ones too). start/end: YYYY-MM-DD (whole day) or an ISO datetime. limit: 1-500 entries. Open a snapshot with camera_snapshot(from_path=...).
| Parameter | Type | Description |
|---|---|---|
scene * | string | |
end | ||
limit | integer | |
start |
camera_record Record a video clip
Record a video clip (1-60 s) from a camera to an mp4 file on the local machine. Returns the file path and size; the video itself is not returned, so take a snapshot if you need to see the scene. quality: "high" = main stream (full resolution set on the camera); "low" = sub stream (smaller file).
| Parameter | Type | Description |
|---|---|---|
camera * | string | |
quality | string | |
seconds | integer |
ptz_move Pan or tilt the camera
Pan or tilt a camera. Directions are as seen in the camera image ("left" turns the view left). amount: "small" is a slight nudge, "medium" a noticeable turn, "large" a big sweep. Waits until the camera has stopped, then returns its pan/tilt position if the camera reports one. Take a snapshot afterwards to see the new view.
| Parameter | Type | Description |
|---|---|---|
camera * | string | |
direction * | string | |
amount | string |
ptz_list_presets List PTZ presets
List the saved camera positions (presets) of a pan/tilt camera.
| Parameter | Type | Description |
|---|---|---|
camera * | string |
ptz_goto_preset Go to a PTZ preset
Move a pan/tilt camera to a saved preset, given by name or token.
| Parameter | Type | Description |
|---|---|---|
camera * | string | |
preset * | string |
ptz_save_preset Save a PTZ preset
Save the camera's current position as a preset. Refuses an existing name unless overwrite=true.
| Parameter | Type | Description |
|---|---|---|
camera * | string | |
name * | string | |
overwrite | boolean |
ptz_remove_preset Remove a PTZ preset
Delete a saved preset by name or token. This cannot be undone.
| Parameter | Type | Description |
|---|---|---|
camera * | string | |
preset * | string |
reload_cameras Reload cameras.toml
Re-read cameras.toml after it was edited by hand and list the cameras, in the same format as list_cameras.
add_camera Add a camera
Add an ONVIF/RTSP IP camera. Ask the user for the camera's IP address (from its app or router) and pick a short name such as "garage". Credentials are never passed as arguments: by default the user is shown a login form; with credentials_via="file" a secrets file is created for the user to fill in, then call add_camera again with credentials_via="file". Use credentials_via="file" when the user is on Remote Control or a phone and the form does not appear. onvif_port: only if the camera uses a non-standard ONVIF port (80 and 2020 are tried). scene: the place it watches, if not its own name (se…
| Parameter | Type | Description |
|---|---|---|
host * | string | |
name * | string | |
credentials_via | string | |
onvif_port | ||
scene |
rename_camera Rename a camera
Change a camera's name. Its baselines, snapshots and recordings stay with it.
| Parameter | Type | Description |
|---|---|---|
new * | string | |
old * | string |
set_scene Move a camera to a scene
Move a camera to another scene (the place it watches). Its earlier snapshots stay with the earlier scene; camera_compare only compares within the current scene. If removed cameras watched that scene, the user is asked in a form whether this camera replaces one of them (it then continues that camera's compare and baselines). Call it with the camera's current scene to answer that question later.
| Parameter | Type | Description |
|---|---|---|
camera * | string | |
scene * | string |
remove_camera Remove a camera from the config
Remove a camera from the configuration. Never deletes snapshots or recordings (delete_camera does, after the user approves).
| Parameter | Type | Description |
|---|---|---|
name * | string |
delete_camera Delete a camera and its files
Delete a camera and all its snapshots, recordings and baselines, or the leftover files of a removed camera with that name. The user approves in a form that lists what will be deleted; you cannot approve it. Without form support nothing is deleted and the result says how to do it by hand.
| Parameter | Type | Description |
|---|---|---|
name * | string |