PlugWiki
UniFi Protect MCP logo

UniFi Protect MCP Server by sirkirby: Setup for Claude, Cursor and Other Apps

CommunityLocal

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.

Install UniFi Protect MCP

Claude Code

  1. 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. 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_index

  • Runs 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_execute

  • Runs 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_batch

  • Checks 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_status

  • Adds 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_tools

  • Lists 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_cameras

  • Shows 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_camera

  • Shows 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_analytics

  • Gets 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_streams

  • Takes 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_snapshot

  • Changes 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_settings

  • Turns 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_recording

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

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-onlySet 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 toYour UniFi Protect controller on your network
Sign-in and keysThe 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

GitHubPyPIOfficial 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 5
  1. github.com · github.com
  2. github.com · github.com
  3. github.com · github.com
  4. github.com · github.com
  5. github.com · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.