
UniFi Protect MCP Server by sirkirby: Setup for Claude, Cursor and Other Apps
Lets Claude, Cursor and other assistants check UniFi Protect cameras, search detections and events, and change cameras, lights, chimes and alarms.
This community server connects your assistant to a UniFi Protect NVR. It can list cameras, take snapshots, search events and smart detections, and, when you allow changes, adjust cameras, floodlights, chimes and the Alarm Manager. It runs on your computer and signs in to your own controller with a local admin login. It is not made by Ubiquiti.
Good for
- Home and small-office owners who run UniFi cameras
- Security staff who search footage events by person, vehicle or time
- Home-lab users who want chat control of lights, chimes and alarm profiles
Works in
12 should work
Tap an app to see how to set it up and any known problems.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Client does not support this transport.
Client does not support this transport.
Install UniFi Protect MCP
Claude Code
- 1
Copy this prompt.
Add the UniFi Protect MCP server to Claude Code. Run this command: /plugin marketplace add sirkirby/unifi-mcp Ask me for UNIFI_PROTECT_HOST, UNIFI_PROTECT_USERNAME, UNIFI_PROTECT_PASSWORD and only put the values in that config, nowhere else. Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires uv (Python 3.13+).
Read-only mode: Set UNIFI_PROTECT_READ_ONLY=true, or set UNIFI_POLICY_PROTECT_CREATE, UNIFI_POLICY_PROTECT_UPDATE and UNIFI_POLICY_PROTECT_DELETE to false.
Some camera and floodlight settings need UNIFI_PROTECT_API_KEY as well. Set the policy variables from the permissions guide to limit what the assistant can change.
From the project README. Source.
Tools
Lists the Protect tools you can call
Shows the Protect tools by category so the assistant can pick one without loading them all.
Try: “What Protect tools are there for cameras?”
Read ·
protect_tool_indexRuns any Protect tool by name
Runs the Protect tool you name with the arguments you give. It has the effects of that tool, including camera changes.
Try: “Use protect_execute to list my cameras.”
Runs code ·
protect_executeRuns several Protect tools in parallel
Starts a group of tool calls at once and returns job IDs. Each call carries the effects of its tool.
Try: “Get a snapshot from every camera at once.”
Runs code ·
protect_batchChecks the progress of a batch
Reports whether a batch job is running, done or failed, with its result.
Try: “Is my batch done?”
Read ·
protect_batch_statusAdds Protect tools to the assistant's tool list
Registers chosen Protect tools so the assistant can call them directly instead of through the runner.
Try: “Load the camera tools.”
Write ·
protect_load_toolsLists every camera with state and recording mode
Returns each camera on the NVR with its name, model, connection state and recording mode.
Try: “Which cameras are offline?”
Network ·
protect_list_camerasShows full details for one camera
Returns firmware, IP, MAC, microphone and speaker settings and more for a camera.
Try: “Show details for the driveway camera.”
Network ·
protect_get_cameraShows motion and smart detection stats for a camera
Returns the current detection state, last detections and counts for a camera.
Try: “How active was the driveway camera today?”
Network ·
protect_get_camera_analyticsGets a camera's stream addresses
Returns RTSP and RTSPS stream URLs for each channel (high, medium, low) with their resolution.
Try: “Give me the stream URL for the front door camera.”
Network ·
protect_get_camera_streamsTakes a still image from a camera
Fetches a JPEG from a camera. By default it returns a reference URL, and it returns the image data when you ask for it.
Try: “Take a snapshot from the backyard camera.”
Network ·
protect_get_snapshotChanges camera settings
Updates settings such as IR mode, HDR, microphone and speaker volume, status light and motion detection. Needs confirm=true, and some settings need an API key.
Try: “Turn the status light off on the garage camera.”
Write ·
protect_update_camera_settingsTurns recording on or off for a camera
Enables recording (set to always) or disables it for a camera. Turning it off stops footage being kept.
Try: “Stop recording on the garage camera.”
Write ·
protect_toggle_recordingTurns a camera's RTSP stream on or off
Publishes or stops the RTSP stream on a camera channel. Turning it on exposes a stream address on your network.
Try: “Enable the RTSP stream on the high channel of the shed camera.”
Write ·
protect_toggle_rtspRestarts a camera
Reboots a camera, which makes it unavailable for a short time and interrupts any recording. Needs confirm=true.
Try: “Reboot the garage camera.”
Write ·
protect_reboot_cameraPans and tilts a PTZ camera
Moves a PTZ camera using normalized pan and tilt speeds. Needs confirm=true.
Try: “Pan the lot camera to the left.”
Write ·
protect_ptz_moveZooms a PTZ camera
Zooms a PTZ camera using a normalized speed, separate from pan and tilt. Needs confirm=true.
Try: “Zoom in on the lot camera.”
Write ·
protect_ptz_zoomMoves a PTZ camera to a saved position
Sends a PTZ camera to a preset slot and lists the presets it has.
Try: “Go to preset 2 on the lot camera.”
Write ·
protect_ptz_presetShows recording mode for cameras
Returns the recording state (always, never, detections) for one or all cameras.
Try: “Which cameras are not recording?”
Network ·
protect_get_recording_statusShows what footage exists for a time range
Returns the recording window available for a camera in a time range.
Try: “Do we have footage from the driveway for last night?”
Network ·
protect_list_recordingsPrepares a video clip export
Requests a clip for a time range, up to 2 hours, with optional timelapse speed. It returns size and duration but not the video itself.
Try: “Export yesterday 2 to 3 pm from the front door camera.”
Network ·
protect_export_clipExplains that recordings cannot be deleted
Does not delete anything. It returns a note that the library cannot delete single recordings and that the NVR manages retention.
Try: “Delete last night's recording from the garage.”
Read ·
protect_delete_recordingSearches the event history
Queries motion and other events with filters from the NVR database.
Try: “Show events from the front door camera today.”
Network ·
protect_list_eventsShows one event
Returns the type, camera, time, score and smart detection details of one event.
Try: “Show details for event abc123.”
Network ·
protect_get_eventGets the thumbnail image for an event
Returns a base64 JPEG thumbnail once the NVR has made it.
Try: “Show the thumbnail for that event.”
Network ·
protect_get_event_thumbnailShows the latest events from a live buffer
Returns recent events from an in-memory buffer without calling the API.
Try: “What just happened on the cameras?”
Network ·
protect_recent_eventsExplains how to stream live events
Returns the resource address of the event stream and guidance for subscribing.
Try: “How do I watch live Protect events?”
Read ·
protect_subscribe_eventsMarks an event as a favorite
Flags an event as a favorite on the NVR, which is the closest the API gets to acknowledging it.
Try: “Acknowledge the 2 am motion event.”
Write ·
protect_acknowledge_eventLists person, vehicle, animal and package detections
Returns smart detection events with filters by type, camera and time.
Try: “List vehicle detections from last night.”
Network ·
protect_list_smart_detectionsSearches detections across all cameras
Runs a Find Anything style search across cameras using the controller's filter vocabulary.
Try: “Find red cars in the driveway this week.”
Network ·
protect_search_detectionsLists the labels the search accepts
Returns the legal filter values your controller supports for detection search.
Try: “What labels can I search for?”
Network ·
protect_detection_search_labelsCollects events for one incident window
Gathers read-only event evidence for a time window into one structured report.
Try: “Collect evidence for the incident at 2 am.”
Network ·
protect_get_incident_evidenceLists known face groups
Returns face recognition groups, with named people and unlabeled groups.
Try: “Who are the known faces?”
Network ·
protect_list_known_facesEdits a known face group
Changes the metadata of a face group, such as its name. Only fields you pass change.
Try: “Name this face group Sam.”
Write ·
protect_update_known_faceMerges two face groups
Folds one face group into another, and the target group survives.
Try: “Merge the two groups for Sam.”
Write ·
protect_merge_known_facesDeletes a face group
Removes a face recognition group. This is destructive and needs confirm=true.
Try: “Delete the unlabeled face group 4.”
Delete ·
protect_delete_known_faceLists known license plates
Returns license plate identities, including named ones.
Try: “What plates are known?”
Network ·
protect_list_known_license_platesEdits a license plate identity
Changes the metadata of a plate identity. Only fields you pass change.
Try: “Label this plate as the delivery van.”
Write ·
protect_update_known_license_plateDeletes a license plate group
Removes a plate recognition group. This is destructive and needs confirm=true.
Try: “Delete the unknown plate group 7.”
Delete ·
protect_delete_known_license_plateLists floodlights
Returns each floodlight with its state, brightness and motion sensor settings.
Try: “Which floodlights are on?”
Network ·
protect_list_lightsChanges a floodlight
Sets on or off, LED brightness (1 to 6) and motion sensitivity (0 to 100). Some settings need an API key.
Try: “Turn the yard floodlight on at brightness 4.”
Write ·
protect_update_lightLists sensors
Returns motion, door and window, temperature, humidity, light and leak sensors with their readings.
Try: “Which door sensors are open?”
Network ·
protect_list_sensorsChanges sensor settings
Updates settings of a sensor taken from the sensor list.
Try: “Change the sensitivity of the garage door sensor.”
Write ·
protect_update_sensor_settingsLists chimes
Returns each chime with its volume and per-camera ring settings.
Try: “What are the chime volumes?”
Network ·
protect_list_chimesChanges chime settings
Sets global speaker volume (0 to 100) and repeat times, or settings for one camera.
Try: “Set the chime volume to 40.”
Write ·
protect_update_chimePlays a chime now
Rings the chime on a device, with optional volume and repeat count.
Try: “Ring the hallway chime once.”
Write ·
protect_trigger_chimeLists connected viewers
Returns viewers such as UP-Viewer with their state and firmware.
Try: “Which viewers are connected?”
Network ·
protect_list_viewersChanges a viewer
Updates a viewer's name or its liveview assignment.
Try: “Assign the lobby liveview to the front desk viewer.”
Write ·
protect_update_viewerLists liveview layouts
Returns each liveview with its multi-camera layout.
Try: “What liveviews do I have?”
Network ·
protect_list_liveviewsChecks a liveview request (does not create it)
Only validates the camera IDs and returns a preview. The description says to use the Protect web interface to create liveviews.
Try: “Create a liveview with the front and back cameras.”
Read ·
protect_create_liveviewChecks a liveview deletion (does not delete it)
Only returns information about the liveview. The description says to use the Protect web interface to delete it.
Try: “Delete the old lobby liveview.”
Read ·
protect_delete_liveviewLists alarm profiles
Returns the Alarm Manager profiles with their ID, name and state.
Try: “What alarm profiles exist?”
Network ·
protect_alarm_list_profilesShows whether the alarm is armed
Returns the armed or disarmed state and the active profile.
Try: “Is the alarm armed?”
Network ·
protect_alarm_get_statusArms an alarm profile
Arms an Alarm Manager profile and checks the result against the controller.
Try: “Arm the Away profile.”
Write ·
protect_alarm_armDisarms the alarm
Disarms the Alarm Manager. This turns off a security feature.
Try: “Disarm the alarm.”
Write ·
protect_alarm_disarmLists alarm rules
Returns every alarm rule, including AI-powered ones, with triggers and actions.
Try: “List my alarm rules.”
Network ·
protect_alarm_list_rulesShows one alarm rule
Returns a single rule with its triggers, actions and scope.
Try: “Show the rule for night motion.”
Network ·
protect_alarm_get_ruleCreates an alarm rule
Creates a new alarm rule from the rule format returned by the list tool.
Try: “Add a rule that alerts on a person at the gate.”
Write ·
protect_alarm_create_ruleEdits an alarm rule
Changes only the fields you pass and keeps the rest.
Try: “Disable the night motion rule.”
Write ·
protect_alarm_update_ruleDeletes an alarm rule
Deletes an alarm rule by ID. It needs confirm=true, and without it shows a preview.
Try: “Delete the old garage rule.”
Delete ·
protect_alarm_delete_ruleShows firmware updates available
Reports update availability for the NVR and every adopted device.
Try: “Do any cameras need a firmware update?”
Network ·
protect_get_firmware_statusShows NVR health
Returns CPU load and temperature, memory use and storage use.
Try: “How is the NVR doing?”
Network ·
protect_get_healthShows NVR model, firmware and storage
Returns the NVR model, firmware, uptime, storage and device counts.
Try: “What NVR do I have and how full is it?”
Network ·
protect_get_system_infoBuilds a cleaned-up report for troubleshooting
Creates sanitized evidence about the Protect setup for you to review, with bounded live checks that are marked.
Try: “Make a support bundle for Protect.”
Network ·
protect_get_support_bundle
Read from the source code
Permissions
high risk · 9 things to watch · 2 advisories
High risk
The assistant can read camera snapshots and events, and with changes allowed it can disarm alarms, stop recording and delete rules. Allow only the actions you need with the policy variables, and read each confirm preview.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
It can disarm your alarm and stop recording
protect_alarm_disarm turns off the Alarm Manager and protect_toggle_recording can stop a camera recording. Both are allowed after confirm=true until you set UNIFI_POLICY_PROTECT_ALARM_UPDATE and UNIFI_POLICY_PROTECT_CAMERAS_UPDATE to false. github.com
It can delete rules and recognition groups
It can delete alarm rules, known face groups and license plate groups. Each needs confirm=true, so read the preview before you approve. github.com
Camera images and faces go to your AI app
Snapshots, event thumbnails and face and plate names are passed to the assistant you use. Use an app you trust with that footage. github.com
The runner tool can call any other tool
The execute and batch tools run whatever tool they name, so they carry the same effects. Approve each call with the named tool in view. github.com
The docs disagree on whether changes are denied by default
apps/protect/docs/permissions.md says Protect denies all mutations by default, but its own Zero config section says every tool works with a confirm step, and the policy code allows an action when no gate variable is set. Treat changes as allowed after confirm=true. To block them set UNIFI_POLICY_PROTECT_CREATE, UNIFI_POLICY_PROTECT_UPDATE and UNIFI_POLICY_PROTECT_DELETE to false, or set UNIFI_PROTECT_READ_ONLY=true. github.com
Turning on RTSP opens a stream address
The RTSP tool makes the controller publish a camera stream on your network. Turn it on only for streams you want to expose. github.com
Confirmation can be switched off
Setting UNIFI_TOOL_PERMISSION_MODE=bypass or UNIFI_PROTECT_TOOL_PERMISSION_MODE=bypass skips the preview and confirm step for every change that policy allows. The deprecated UNIFI_AUTO_CONFIRM=true does the same. Leave these unset unless you run automation. github.com
Some tools only preview
The delete-recording and liveview create and delete tools do not change anything. They return a note to use the Protect web interface. github.com
Gate names by category
Alarm arm and disarm use UNIFI_POLICY_PROTECT_ALARM_UPDATE, camera recording and reboot use UNIFI_POLICY_PROTECT_CAMERAS_UPDATE, face and plate deletes use UNIFI_POLICY_PROTECT_RECOGNITION_DELETE, alarm rule deletes use UNIFI_POLICY_PROTECT_ALARM_DELETE. The docs warn that a singular name such as UNIFI_POLICY_PROTECT_CAMERA_UPDATE is never read. github.com
Security advisories
Technical details
| Turning on read-only | Set UNIFI_PROTECT_READ_ONLY=true (or UNIFI_READ_ONLY=true for every UniFi server). Read-only mode denies every non-read action whatever the UNIFI_POLICY_* gates say. Setting the create, update and delete gates to false has the same effect. |
|---|---|
| Talks to | Your UniFi Protect controller on your network |
| Sign-in and keys | The controller address and a local admin username and password sit in your client config as environment variables. Some settings also need an API key. |
Questions
Is the UniFi Protect MCP server official?
No. It is a community project by sirkirby, not made by Ubiquiti. The same repository also has servers for UniFi Network and UniFi Access.
What credentials does it need?
The controller address plus a local admin username and password. An API key is optional and is needed for some camera and floodlight settings.
Can it delete my recordings?
No. The delete-recording tool only returns a note that single recordings cannot be deleted through the library. The NVR manages retention itself.
Can it run read-only?
Yes. Set UNIFI_PROTECT_READ_ONLY=true and every change is denied, whatever the UNIFI_POLICY_* variables say. Or set UNIFI_POLICY_PROTECT_CREATE, UNIFI_POLICY_PROTECT_UPDATE and UNIFI_POLICY_PROTECT_DELETE to false. With neither set, changes are allowed after a confirm step, even though one docs section says they are denied.
Does it run on my computer or in the cloud?
On your computer. It talks to your controller over your own network.
Why does the tool list look short at first?
The default mode loads a few discovery tools first and adds the rest on demand, to save context. You can switch to loading everything.
Can it show me camera pictures?
Yes. The snapshot tool returns a reference URL by default, or the image data if you ask for it. The assistant then sees that image.
Is it free?
Yes. The repository is MIT licensed. The published package metadata on PyPI declares no license.
Information
updated Nov 2, 2026
- Publisher
- Community
- Package
unifi-protect-mcp- Registry
- PyPI
- Transport
- stdio
- Auth
- token in env
- Version
- 0.11.0
- License
- MIT
- Last commit
- Oct 30, 2026
- Open issues
- 13
- Listed in
- Official MCP registry
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 5Hide
- github.com · github.com
- github.com · github.com
- github.com · github.com
- github.com · github.com
- github.com · github.com