UniFi Protect MCP
Exposes read-only UniFi Protect Integration API data and WebSocket monitoring as MCP tools.
Retrieve Protect application version and NVR console details.
List and get cameras, lights, sensors, chimes, viewers, sirens, fobs, relays, speakers, bridges, link stations, alarm hubs, live views, files, arm profiles, users, and ULP users.
Fetch camera JPEG snapshots and active RTSPS stream URLs.
Subscribe to device-update and event WebSockets for 1–30 seconds to capture device changes and events.
Page large device/user lists with limit and offset.
Provides tools for interacting with UniFi Protect, a video surveillance and device management platform by Ubiquiti. Enables listing and managing cameras, lights, sensors, chimes, viewers, sirens, fobs, relays, speakers, bridges, link stations, alarm hubs, arm profiles, live views, files, users, and NVR status, as well as capturing snapshots, streaming RTSPS, and subscribing to device/event WebSocket updates.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@UniFi Protect MCP show me a snapshot from the driveway camera"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
UniFi Protect MCP Server
An MCP (Model Context Protocol) server that exposes UniFi Protect's Integration REST API as tools for Claude Code and other MCP clients. Aligned with UniFi Protect API 7.4.99, with tools covering cameras, lights, sensors, chimes, viewers, sirens, fobs, relays, speakers, bridges, link stations, alarm hubs, arm profiles, live views, files, users, point-of-sale events, NVR status, and WebSocket subscriptions.
Prerequisites
A Node.js release that
engines.nodeinpackage.jsonaccepts (each supported LTS line is tested in CI)A UniFi Protect system with the Integration API enabled
An API key generated from your UniFi Protect console (see Choosing an API key)
Related MCP server: UniFi Internal API MCP Server
Setup
Quick start (npx)
Add to Claude Code with a single command — no clone or build needed:
claude mcp add-json unifi-protect '{"command":"npx","args":["-y","@owine/unifi-protect-mcp@latest"],"env":{"UNIFI_PROTECT_HOST":"192.168.1.1","UNIFI_PROTECT_API_KEY":"your-api-key"}}' -s userUse -s user for global availability across all projects, or -s project for the current project only.
A local console usually has a self-signed certificate, so the server fails to start with a certificate error until you trust it: see Self-signed console certificates.
@latest runs the newest release every time the server starts, including a new major version. To take fixes but choose when to make breaking upgrades, pin the major version you have tested instead (@owine/unifi-protect-mcp@<major>).
From source
If you prefer to build locally:
git clone https://github.com/owine/unifi-protect-mcp.git
cd unifi-protect-mcp
corepack enable # provides pnpm at the version pinned in package.json
pnpm install
pnpm run buildThis project uses pnpm — npm install ignores pnpm-lock.yaml and may resolve different dependency versions than CI.
Then add to Claude Code:
claude mcp add-json unifi-protect '{"command":"node","args":["/path/to/unifi-protect-mcp/dist/index.js"],"env":{"UNIFI_PROTECT_HOST":"192.168.1.1","UNIFI_PROTECT_API_KEY":"your-api-key"}}' -s userEnvironment Variables
Variable | Required | Default | Description |
| Yes | — | IP or hostname of your UniFi Protect console, optionally with |
| Yes | — | API key from the console's integration settings (see Choosing an API key). Surrounding whitespace is trimmed; a key with a control character inside is refused at startup |
| No | — | Absolute path to a PEM file with the console's certificate, to verify a self-signed console without turning verification off (see below). Not allowed with |
| No |
| Set to |
| No |
| Set to |
| No | — | Cloud Connector console ID. Only used when |
| No |
| At startup the server reads Protect's application info and exits if that fails, so the MCP host lists it as failed rather than connected. Set to |
The startup line in the MCP host's server log says whether the server is read-only or read-write. A configuration error names the variable at fault, and the server exits.
Self-signed console certificates
UniFi consoles ship with a self-signed certificate, so against a local console the server usually fails to start with a certificate error. The safe fix is to trust that one certificate. Save it:
openssl s_client -connect 192.168.1.1:443 </dev/null 2>/dev/null | openssl x509 > ~/.config/unifi-protect-console.pemSet UNIFI_PROTECT_CA_CERT to the file's absolute path (for example /home/you/.config/unifi-protect-console.pem); MCP hosts do not expand ~ or $HOME in env. The server then accepts exactly that certificate, even though it is issued to a name like unifi.local and you connect by IP. This also works for a certificate issued by a CA (one you installed on the console yourself): pinning the console's own certificate is enough, without the CA's. Any other certificate must chain to the file and match the hostname. If the network between you and the console is not trusted, compare the fingerprint (openssl x509 -in <file> -noout -fingerprint -sha256) with the console's. If the console later generates a new certificate, save it again.
Setting UNIFI_PROTECT_VERIFY_SSL=false instead turns certificate checks off for this server's connections to the console, and only those (other TLS connections in the process are unaffected). Anyone who can intercept that traffic can then read the API key, so use it only on a network you trust.
Choosing an API key
Use the least-privileged key that works. Create the key from an admin account with no more access than you need. For the default read-only mode, that means an admin with view-only access to Protect; use a full-access admin only with
UNIFI_PROTECT_READ_ONLY=false.Prefer a local console key to a Site Manager key. A Site Manager key (Cloud Connector,
api.ui.com) reaches every console on the account and travels over the internet.
Manual Configuration
Alternatively, add to your ~/.claude.json under the top-level "mcpServers" key, or to Claude Desktop's claude_desktop_config.json the same way:
{
"mcpServers": {
"unifi-protect": {
"command": "npx",
"args": ["-y", "@owine/unifi-protect-mcp@latest"],
"env": {
"UNIFI_PROTECT_HOST": "192.168.1.1",
"UNIFI_PROTECT_API_KEY": "your-api-key",
"UNIFI_PROTECT_CA_CERT": "/absolute/path/to/console.pem"
}
}
}
}Cloud Connector
To reach a console through Ubiquiti's Cloud Connector instead of over the local
network, set UNIFI_PROTECT_HOST=api.ui.com and UNIFI_PROTECT_CONSOLE_ID to
the console's ID, and supply a Site Manager API key (unifi.ui.com →
Settings → API) as UNIFI_PROTECT_API_KEY. That is a different credential
from a local console API key. Requests are routed through
/v1/connector/consoles/{id}.
TLS verification stays on: the server refuses to start with
UNIFI_PROTECT_VERIFY_SSL=false or UNIFI_PROTECT_CA_CERT for api.ui.com.
Ubiquiti's cloud has a publicly trusted certificate, and a pinned certificate
would replace the public certificate authorities for this server's connections.
Find your console ID with:
curl -s https://api.ui.com/v1/hosts -H "X-API-KEY: $KEY" | jq -r '.data[].id'WebSocket subscriptions do not work over Cloud Connector. The connector
proxies REST calls but returns HTTP 404 on a WebSocket upgrade, so
protect_subscribe_devices and protect_subscribe_events fail fast with an
explanatory error. Every other tool, including snapshots and file uploads,
works. Connect directly to the console host if you need subscriptions.
Note that /v1/hosts reports protect under controllers for consoles where
Protect is merely available, not necessarily installed; only consoles actually
running Protect will answer.
Setting UNIFI_PROTECT_CONSOLE_ID against a local host is not fatal: the
server logs a warning and talks to that host directly.
Upgrading to 3.0
3.0 puts more actions behind confirmation: physical outputs, disarming, anything that weakens alarm coverage, and live video and two-way audio. It also scopes TLS settings to this server, keeps every result within what one MCP message can carry, and makes cancellation stop the request to Protect.
If you use the server only through an LLM client (Claude Code, Claude Desktop, …), the model reads the new parameters from the tool schemas, so most setups need no change. Check three things:
Cloud Connector with verification off no longer starts. Unset
UNIFI_PROTECT_VERIFY_SSLwhenUNIFI_PROTECT_HOST=api.ui.com.Spellings of
UNIFI_PROTECT_READ_ONLY/UNIFI_PROTECT_VERIFY_SSLthat 2.x ignored now take effect (table below).Expect more approval prompts. Update tools and every confirm-gated tool are now annotated destructive (below).
Read on if you call tools from scripts or saved agent configurations, or keep allow-lists keyed on tool annotations.
Check your environment variables first
2.x treated only the exact string false as false. 3.0 also accepts 0, no and off, in any case, so a value that 2.x silently ignored now takes effect:
Setting | 2.x | 3.0 |
| Read-only | ⚠️ Write tools enabled |
| Certificate verified | Verification skipped |
| Verification skipped | ⚠️ Startup fails: "TLS verification cannot be disabled for api.ui.com". Unset |
| Turned verification off for every TLS connection in the process | Applies only to this server's connections to the console. Prefer the new |
| Sent as is; every call failed and the error quoted the key | Trimmed |
| Same | Startup fails with a message that does not repeat the key |
Any other unrecognized value keeps the safe default (read-only, verification on), as before. New: UNIFI_PROTECT_CA_CERT verifies a console's self-signed certificate (see Self-signed console certificates). Configuration errors now name the variable at fault, and the startup log line says whether the server is read-only or read-write.
Tool input changes (breaking)
Tool | 2.x | 3.0 |
| No confirmation | Requires |
| Omitting | Requires |
| Omitting | Requires |
| No confirmation | Requires |
| No confirmation | Requires |
| No confirmation | Requires |
| No confirmation | Requires |
| No confirmation | Requires |
| No confirmation | Requires |
| No confirmation | Requires |
Every tool that takes an ID | Any string | Only IDs as list and get tools return them: letters, digits, |
A call that leaves out state or enable, or passes a malformed ID, fails input validation. A call without confirm: true returns an error result ("This action requires confirmation: …"), so the agent can ask you and call again.
Toggling was removed because it is not safe to retry: a repeated toggle flips a gate or lock back to where it started. To act on the current state, read it first: each entry in outputs from protect_get_relay carries a state, and protect_get_alarm_hub reports alarmHub.output keyed by channel.
// 2.x: toggles output 0
{ "id": "<relay id>", "outputId": 0 }
// 3.0: explicit, so a repeat leaves the output as asked (a pulseDuration pulses again)
{ "id": "<relay id>", "outputId": 0, "state": "on", "confirm": true }Relaxed: a dryRun: true preview never needs confirm. In 2.x, protect_disable_mic and protect_trigger_alarm_webhook rejected a dry run without confirm: true. Calls that send both still work.
New: every list tool except protect_list_nvrs takes optional limit and offset. A call with neither returns the whole list, as before.
Annotation changes (breaking for allow-lists)
protect_update_camera, everyprotect_update_<device>tool,protect_update_arm_profileandprotect_update_livevieware nowdestructiveHint: true, and so is every tool that takesconfirm(protect_stop_siren,protect_set_current_arm_profile,protect_create_rtsp_stream,protect_create_talkback,protect_disable_arm_alarm,protect_activate_relay_output,protect_trigger_alarm_hub_outputamong them). MCP clients that auto-approve non-destructive tools will now ask before running them, and allow-lists keyed on the annotation need updating.Every tool now has a
titleandopenWorldHint: false.
Stricter validation
UNIFI_PROTECT_HOSTis parsed as a URL authority. A pastedhttps://192.168.1.1/now works, and:443is dropped. A path, credentials, a non-numeric or out-of-range port, or an unbracketed IPv6 address now fails at startup instead of at the first request. Write IPv6 as[2001:db8::1]or[2001:db8::1]:7443.protect_upload_filerejectsbase64Datathat is not valid base64 (bad characters, length or padding), and empty input, where 2.x uploaded corrupt bytes without an error. Adata:URL prefix and line breaks are accepted. A file too large to fit one MCP message is refused with "File too large to send in one MCP message"; in 2.x an oversized request closed the server's stdio transport and the server exited with nothing logged.protect_update_liveviewrejects a body whosesettings.iddiffers fromid.
Output changes
Text results are compact JSON, not indented.
structuredContentis unchanged; use it if you parse results.Single-object results and dry-run previews now pass MCP clients' output validation. In 2.x, a top-level field the schema did not list, or any dry-run preview of a tool with an output schema, failed with
-32602.A snapshot, response or other result too large for one MCP message is refused with an error saying so. In 2.x it was sent, and the MCP client dropped the connection.
The
protect_upload_filedry-run preview reportsbyteLength(decoded size) in place ofdataLength(base64 string length).protect_subscribe_devices/protect_subscribe_eventsstop at a message cap or a size budget, whichever comes first (both stated in each tool's description), and addtruncated: true.durationis the time actually spent listening. A listen that fails before any message arrives (refused or unauthorized socket) returns an error result; in 2.x it returned{messages: [], error}as a success. One that fails partway still returns what it collected, witherror.A timeout names the call and what to do:
PATCH /cameras/…: Protect did not respond within … s, followed by "Retry when the console responds" for reads, or "The change may still have been applied; check before retrying" for writes. Snapshots and uploads time out before the MCP client's own request timeout, so you see this message instead of a bare client timeout.Network and TLS errors name the underlying cause, e.g.
fetch failed: connect ECONNREFUSED …, instead of a barefetch failed.A subscription that the console refuses, closes or drops before any message arrives returns an error naming why, instead of an empty list that reads as a quiet site. So does one whose window ends before the connection is established, or whose first message is too large to return.
A list tool reads a response of up to several times one MCP message and returns the page asked for, so
limitandoffsetwork on a site whose full list would not fit.Cancelling a tool call aborts its request to Protect, and a cancelled subscription closes its socket. In 2.x a cancelled relay switch could still land afterwards.
The server reports its real package version to MCP clients; 2.x always reported
1.0.0. It also sends server instructions (see Safety Features).
For packagers
undici is a new runtime dependency (scoped TLS and connection keep-alive). Requests go through undici's own fetch rather than Node's, so:
They speak HTTP/1.1, as before, and send
User-Agent: unifi-protect-mcp/<version>.An HTTP proxy is used as Node's built-in
fetchwould: fromHTTPS_PROXY/HTTP_PROXY, minusNO_PROXY, only whenNODE_USE_ENV_PROXY=1or--use-env-proxyis set. A dispatcher installed with undici'ssetGlobalDispatcherno longer applies. The subscription WebSocket never used a proxy, and still does not.
Safety Features
Tool annotations. Every tool declares
readOnlyHint,destructiveHintandopenWorldHint: false(each talks only to your console), plus a readabletitle, so MCP clients such as Claude Code can decide when to ask you.destructiveHint: truemarks every tool that deletes or replaces existing state, which includes everyprotect_update_*tool, and every tool that takesconfirm. Clients that auto-approve non-destructive tools ask before those. The tool tables below mark them DESTRUCTIVE.Server instructions. On connect, the server gives the MCP host a short guide for the model, matched to read-only or read-write mode. It says to treat names and event text from the console as data, not instructions; that RTSPS and talkback URLs are credentials; and, when writes are enabled, to preview with
dryRunand ask you before passingconfirm.Read-only mode. On by default. Only the read tools (list, get, snapshot, subscriptions) are registered; write tools do not exist for the model, and registering one in read-only mode fails at startup. Set
UNIFI_PROTECT_READ_ONLY=falseto enable writes. Read-only mode still returns RTSPS URLs fromprotect_get_rtsp_streams, and those are credentials for live video.Confirmation parameter. Tools that are irreversible, switch physical outputs, trigger the alarm webhook, stop a siren, disarm or weaken alarm coverage, or open live video or two-way audio refuse to act unless the call carries
confirm: true. Without it the tool returns an error naming the action, so the agent can ask you first.protect_update_sensor,protect_update_fob,protect_update_sirenandprotect_update_arm_profileneed it only when the change touches alarm-related settings (each tool's description names them); renames and LED changes do not.confirmis filled in by the model, so it is a prompt for the model to ask you, not a lock; for a human gate, keep your MCP client's approval prompts on for destructive tools.Dry-run support. Every write tool accepts
dryRun: trueand returns the request it would send (dryRun,action,path,body) without changing anything. A dry run never needsconfirm.Request safety. IDs must be IDs returned by list and get tools, and a request path that would resolve outside the Integration API is refused before it is sent. Redirects are refused, so the API key is never forwarded. Cancelling a tool call aborts its request to Protect.
See SECURITY.md for reporting vulnerabilities and operating the server safely.
Structured output
Read tools, and write tools that return the resource, declare an outputSchema, and return structuredContent alongside compact JSON text. Schemas are published as loose objects, so a field a firmware update adds flows through instead of failing validation. A list's items are under result; a paged list also has totalCount and offset. protect_get_snapshot returns an image. A dry run returns {dryRun, action, path, body}. Action endpoints that return no body succeed with an empty result.
Tools
DESTRUCTIVE marks tools annotated destructiveHint: true. Requires confirm: true marks tools that take confirm; every one of them is also DESTRUCTIVE. Pages with limit/offset marks list tools that take them.
System
Tool | Description |
| Get system information and version details |
| Get the NVR console info (a single object) |
Subscriptions
Tool | Description |
| Subscribe via WebSocket to device state updates for a short window (not over Cloud Connector) |
| Subscribe via WebSocket to event notifications for a short window (not over Cloud Connector) |
| Subscribe via WebSocket to create/update messages for the model keys you choose, including events and external arm profiles, for a short window (not over Cloud Connector) |
Cameras
Tool | Description |
| List all cameras (pages with |
| Get camera details by ID |
| DESTRUCTIVE: Update camera settings |
| Get a JPEG snapshot (returns image) |
| DESTRUCTIVE: Create an RTSPS stream session; the returned URLs are credentials for live video (requires |
| Get active RTSPS stream sessions (the URLs are credentials for live video) |
| DESTRUCTIVE: Stop and delete an active RTSPS stream |
| DESTRUCTIVE: Create a talkback (two-way audio) session; the returned URL is a credential (requires |
| DESTRUCTIVE: Irreversibly disable the camera microphone; only a factory reset restores it (requires |
| Start PTZ patrol at a given slot |
| Stop PTZ patrol |
| Move PTZ to a preset position |
Lights
Tool | Description |
| List all lights (pages with |
| Get light details by ID |
| DESTRUCTIVE: Update light settings |
Sensors
Tool | Description |
| List all sensors (pages with |
| Get sensor details by ID |
| DESTRUCTIVE: Update sensor settings (requires |
Chimes
Tool | Description |
| List all chimes (pages with |
| Get chime details by ID |
| DESTRUCTIVE: Update chime settings |
Viewers
Tool | Description |
| List all viewers (pages with |
| Get viewer details by ID |
| DESTRUCTIVE: Update viewer settings |
Sirens
Tool | Description |
| List all sirens (pages with |
| Get siren details by ID |
| DESTRUCTIVE: Update siren settings: name, volume, LED (requires |
| Activate the siren alarm for a given duration (5/10/20/30s) |
| DESTRUCTIVE: Stop an active siren; it silences an alarm (requires |
| Test the siren sound for 5 seconds at a given volume |
Fobs
Tool | Description |
| List all key fobs (pages with |
| Get fob details by ID |
| DESTRUCTIVE: Update fob settings (requires |
Relays
Tool | Description |
| List all relays (pages with |
| Get relay details by ID, including each output's state |
| DESTRUCTIVE: Update relay settings |
| DESTRUCTIVE: Turn a relay output channel on or off, with optional pulse duration (requires |
Speakers
Tool | Description |
| List all speakers (pages with |
| Get speaker details by ID |
| DESTRUCTIVE: Update speaker settings (volume, mic) |
| Test the speaker sound at a given volume |
| DESTRUCTIVE: Stop a siren playing on a speaker; it silences an alarm (requires |
Bridges
Tool | Description |
| List all bridges (pages with |
| Get bridge details by ID |
| DESTRUCTIVE: Update bridge settings |
Link Stations
Tool | Description |
| List all link stations, the non-alarm-hub gateways (pages with |
| Get link station details by ID |
| DESTRUCTIVE: Update link station settings |
Alarm Hubs
Tool | Description |
| List all alarm hubs (pages with |
| Get alarm hub details by ID |
| DESTRUCTIVE: Update alarm hub settings |
| DESTRUCTIVE: Turn an alarm hub output channel on or off: sirens, lights, locks (requires |
Arm Profiles — local alarm manager
Tool | Description |
| List all arm profiles (pages with |
| Create a new arm profile |
| DESTRUCTIVE: Set the active profile used when arming (requires |
| DESTRUCTIVE: Update an arm profile (requires |
| DESTRUCTIVE: Delete an arm profile by ID (requires |
| Arm the alarm using the current profile |
| DESTRUCTIVE: Disarm the alarm (requires |
Arm Profiles — global Alarm Manager
These apply when protect_list_nvrs reports featureFlags.useExternalAlarmManager: true. The console then refuses the local arm-profile tools above with HTTP 400. Field names are the Alarm Manager's own snake_case, and delays are in seconds.
Tool | Description |
| List the Alarm Manager's arm profiles (pages with |
| Get one external arm profile by ID |
| Create an external arm profile |
| DESTRUCTIVE: Update an external arm profile (requires |
| DESTRUCTIVE: Delete an external arm profile (requires |
| Arm one external arm profile |
| DESTRUCTIVE: Disarm one external arm profile (requires |
Live Views
Tool | Description |
| List all live views (pages with |
| Get live view details by ID |
| Create a new live view |
| DESTRUCTIVE: Replace a live view (send the full object from |
Alarm & Files
Tool | Description |
| DESTRUCTIVE: Trigger an alarm webhook, firing its external alarm action (requires |
| List device asset files ( |
| Upload a device asset file (base64 in, sent as multipart/form-data) |
Users
Tool | Description |
| List Protect users, filtered by the key's access (pages with |
| Get a Protect user by ID |
| List UniFi Identity (ULP) users with enrolled credentials (pages with |
| Get a UniFi Identity user by ID |
Point of Sale
Tool | Description |
| Record a POS transaction as a camera event so it can be overlaid on recorded footage |
Troubleshooting
Configuration errors, and a console the server cannot use at startup, go to the MCP host's server log and the server exits; the host lists it as failed (in Claude Code, /mcp). Tool errors reach the agent as results starting with Error:.
Message | Cause and fix |
| Missing from the server's |
| A path, credentials or a bad port in the host; bracket IPv6 addresses. |
| Paste the key again. |
| The path does not exist for the server. Use an absolute path; |
| No |
| Unset |
| The console ID only applies with |
| The startup check could not read the console; the rest of the line is one of the errors below. Fix it and restart the server, or set |
| Something other than Protect's Integration API answered at |
| Read-only is the default. Set |
| Save the console's certificate to |
| Something between you and Ubiquiti's cloud is presenting another certificate, such as a TLS-inspecting proxy or firewall. |
| Wrong or unreachable host. |
| Wrong or revoked key, or its admin lacks the rights. |
| The console limits API calls per second, and the server already waited out its |
| The console is slow, or something drops traffic to it (at startup, often a wrong IP). For a write, check whether it was applied before retrying. |
| The response is too large for one MCP message. Page a list with |
| Upload a smaller file. |
| Expected: the action needs |
| The agent passed a name or a malformed ID. |
| The WebSocket was refused or unauthorized; this is not "no activity". |
| Connect to the console directly for subscriptions. |
| The call broke the tool's input schema (for example a missing |
Development
The Node version used for development is pinned in .nvmrc. With fnm installed, fnm use reads it automatically on cd.
pnpm run build # Compile TypeScript
pnpm start # Run the server
pnpm run typecheck # Type-check src/ and tests/ without emitting
pnpm run lint # ESLint, type-aware
pnpm run lint:fix # ESLint with auto-fix
pnpm test # Run all tests (vitest)
pnpm run test:watch # Run tests in watch mode
pnpm run test:coverage # Run tests with coverage
pnpm run test:package # Pack, install the tarball and smoke-test it over stdioGit hooks are managed by lefthook — pnpm exec lefthook install enables them. Pre-commit runs ESLint on staged files, a full typecheck, and a GitGuardian secret scan when ggshield is installed (skipped otherwise), so fnm and pnpm both need to be on your PATH.
Commit conventions
This project uses conventional commits in pull request titles and release-drafter for releases. Pull requests are squash-merged, so the title is the commit subject:
feat: ...— new feature (minor version bump)fix: ...— bug fix (patch version bump)deps: ...— dependency update (patch version bump; Renovate's type for package bumps)feat!: ...— breaking change (major version bump); the!must be in the title, aBREAKING CHANGE:footer is not readchore:,docs:,ci:, etc. — no version bump
Every push to main updates a draft GitHub Release with the next version and its notes. A maintainer publishes the draft, which builds, tests and publishes that tagged commit to npm with provenance. To release a different version, edit the draft's tag and title before publishing. Release notes after 3.0.0 are in GitHub Releases; CHANGELOG.md covers 3.0.0 and earlier.
License
MIT
Available Tools
38 toolsprotect_get_alarm_hubGet alarm hubBRead-only
Get full details for a specific alarm hub by ID. Returns: id, modelKey ("linkstation"), name, mac, state, type, guid, isAlarmHub, ledSettings (isEnabled), lastEvent, alarmHub (armed, battery, buckboost, connector, cover, deviceTamperStatus (e.g. "tampered"), currentMeterChannelStatus, currentMeterStatus, inputPower, poeout, powerMeter, output and input (maps keyed by channel), inputTerminalStatus, outputTerminalStatus, emergencyTerminalStatus, auxiliaryPowerTerminalStatus), threadState (network: status, role, networkName, channel, panId, extendedPanId, joinedDeviceCount, errorReason, lastUpdatedAt) (7.3.70 docs).
Inputs: id (required). Returns: id, mac, guid, name, +8 more
protect_get_bridgeGet bridgeARead-only
Get full details for a specific bridge by ID. Returns: id, modelKey, name, mac, state, type, guid, platform, clients (array of MACs), maxClients (7.3.70 docs).
Inputs: id (required). Returns: id, mac, guid, name, +6 more
protect_get_cameraGet cameraARead-only
Get details for a specific camera by ID. The Protect Integration API returns the SAME field set as protect_list_cameras entries (id, mac, name, modelKey, state, type, guid, activePatrolSlot, hasPackageCamera, hdrType, isMicEnabled, micVolume, videoMode, featureFlags, lcdMessage, ledSettings, osdSettings, smartDetectSettings) — there is no extended/by-id-only payload (confirmed live on 7.3.70). Recording state, motion events, zones, and channel/RTSP config are NOT exposed by this API surface.
Inputs: id (required). Returns: id, mac, guid, name, +14 more
protect_get_chimeGet chimeARead-only
Get full details for a specific chime by ID. Returns: id, modelKey, name, mac, state, type, guid, cameraIds (array of camera IDs), ringSettings (array of objects: cameraId, volume, ringtoneId, repeatTimes) — verified live 7.3.70.
Inputs: id (required). Returns: id, mac, guid, name, +5 more
protect_get_fobGet fobBRead-only
Get full details for a specific fob by ID. Returns: id, modelKey, name, mac, state, type, guid, awayState, buttonLabels, featureFlags (buttons[], hasKeypad), armControlSettings (enabled, armProfileId, nightProfileId), keypadSettings (beepEnabled, beepVolume), wirelessConnectionState (signalState: signalQuality, signalStrength; batteryStatus: percentage, isLow; bridge) (7.3.70 docs).
Inputs: id (required). Returns: id, mac, guid, name, +9 more
protect_get_infoGet infoARead-only
Get UniFi Protect application information. Returns: applicationVersion (string).
Inputs: no named parameters. Returns: applicationVersion
protect_get_lightGet lightBRead-only
Get full details for a specific light by ID. Returns: id, modelKey, name, mac, state, type, guid, lightModeSettings (mode, enableAt), lightDeviceSettings (isIndicatorEnabled, pirDuration, pirSensitivity, ledLevel), isDark, isLightOn, isLightForceEnabled, lastMotion, isPirMotionDetected, camera (7.3.70 docs).
Inputs: id (required). Returns: id, mac, guid, name, +11 more
protect_get_link_stationGet link stationARead-only
Get full details for a specific link station by ID. Link stations are non-alarm-hub gateways (use protect_list_alarm_hubs for alarm hubs). Returns: id, modelKey ("linkstation"), name, mac, state, type, guid, isAlarmHub, ledSettings (isEnabled), lastEvent, alarmHub (armed, battery, buckboost, connector, cover, deviceTamperStatus (e.g. "tampered"), currentMeterChannelStatus, currentMeterStatus, inputPower, poeout, powerMeter, output and input (maps keyed by channel), inputTerminalStatus, outputTerminalStatus, emergencyTerminalStatus, auxiliaryPowerTerminalStatus), threadState (network: status, role, networkName, channel, panId, extendedPanId, joinedDeviceCount, errorReason, lastUpdatedAt) (7.3.70 docs).
Inputs: id (required). Returns: id, mac, guid, name, +8 more
protect_get_liveviewGet liveviewARead-only
Get details for a specific live view by ID. Returns: id, modelKey, name, isDefault, isGlobal, layout, owner, slots (each slot: cameras string[], cycleMode, cycleInterval). The full slot list is needed when updating because PATCH replaces the slots array.
Inputs: id (required). Returns: id, name, owner, slots, +4 more
protect_get_relayGet relayBRead-only
Get full details for a specific relay by ID. Returns: id, modelKey, name, mac, state, type, guid, ledSettings (isEnabled), outputs (array of objects: id, name, type, delay, pulseDuration, state, rebootState — id is the outputId for protect_activate_relay_output), inputs (array of objects: id, name, state, actionTrigger, actionType, actionOutputId), wirelessConnectionState (signalState: signalQuality, signalStrength; batteryStatus: percentage, isLow; bridge) (7.3.70 docs).
Inputs: id (required). Returns: id, mac, guid, name, +7 more
protect_get_rtsp_streamsGet RTSP streamsARead-only
Get active RTSPS stream sessions for a camera. Returns: high, medium, low, package — each an rtsps:// URL, or null (or absent) when no session is active at that quality. Use protect_create_rtsp_stream to start one. Each URL is a bearer credential for live video: do not repeat it unless the user asked for it.
Inputs: id (required). Returns: low, high, medium, package
protect_get_sensorGet sensorCRead-only
Get full details for a specific sensor by ID. Returns: id, modelKey, name, mac, state, type, guid, mountType, featureFlags (temperature, humidity, light, motion, waterLeak, open, tamper, smoke — each {channelCount}), batteryStatus (percentage, isLow), stats (light, humidity, temperature — each {value, status}), lightSettings / humiditySettings / temperatureSettings (isEnabled, margin, lowThreshold, highThreshold), isOpened, openStatusChangedAt, isMotionDetected, motionDetectedAt, motionSettings / glassBreakSettings (isEnabled, sensitivity, sensitivityWhenArmed), scheduleMode, armProfileIds, hasCustomSensitivityWhenArmed, alarmTriggeredAt, alarmSettings, leakDetectedAt, externalLeakDetectedAt, leakSettings (isInternalEnabled, isExternalEnabled), tamperingDetectedAt, wirelessConnectionState (signalState: signalQuality, signalStrength; batteryStatus: percentage, isLow; bridge) (7.3.70 docs).
Inputs: id (required). Returns: id, mac, guid, name, +26 more
protect_get_sirenGet sirenARead-only
Get full details for a specific siren by ID. Returns: id, modelKey, name, mac, state, type, guid, volume, ledSettings (isEnabled), sirenStatus (isActive, activatedAt, duration), connectionType, wirelessConnectionState (signalState: signalQuality, signalStrength; batteryStatus: percentage, isLow; bridge) (7.3.70 docs).
Inputs: id (required). Returns: id, mac, guid, name, +8 more
protect_get_snapshotGet snapshotARead-only
Get a JPEG snapshot from a camera. Returns a base64-encoded image/jpeg (rendered directly by MCP clients). Use highQuality=true to force a 1080p-or-higher capture; set channel=package to capture from the secondary package camera on doorbells with hasPackageCamera=true. Fails with HTTP 503 when the camera is offline or unreachable. A snapshot too large for one MCP message is refused with an error; try without highQuality.
Inputs: id (required), channel, highQuality.
protect_get_speakerGet speakerCRead-only
Get full details for a specific speaker by ID. Returns: id, modelKey, name, mac, state, type, guid, volume, micVolume, isMicEnabled, speakerState (status, mode), featureFlags (hasMic) (7.3.70 docs).
Inputs: id (required). Returns: id, mac, guid, name, +8 more
protect_get_ulp_userGet ULP userARead-only
Get details for a specific UniFi Identity (ULP) user by ID. Returns: id, modelKey, firstName, lastName, fullName, email, status.
Inputs: id (required). Returns: id, email, status, fullName, +3 more
protect_get_userGet userARead-only
Get details for a specific Protect user by ID. Returns the same fields as protect_list_users entries: id, modelKey, name, firstName, lastName, email, ucoreUserId.
Inputs: id (required). Returns: id, name, email, lastName, +3 more
protect_get_viewerGet viewerARead-only
Get full details for a specific viewer by ID. Returns: id, modelKey, name, mac, state, type, guid, liveview, streamLimit (7.3.70 docs).
Inputs: id (required). Returns: id, mac, guid, name, +5 more
protect_list_alarm_hubsList alarm hubsARead-only
List all alarm hubs managed by UniFi Protect. Returns array; each alarm hub includes: id, modelKey ("linkstation"), name, mac, state, type, guid, isAlarmHub, ledSettings (isEnabled), lastEvent, alarmHub (armed, battery, buckboost, connector, cover, deviceTamperStatus (e.g. "tampered"), currentMeterChannelStatus, currentMeterStatus, inputPower, poeout, powerMeter, output and input (maps keyed by channel), inputTerminalStatus, outputTerminalStatus, emergencyTerminalStatus, auxiliaryPowerTerminalStatus), threadState (network: status, role, networkName, channel, panId, extendedPanId, joinedDeviceCount, errorReason, lastUpdatedAt) (7.3.70 docs). On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_arm_profilesList arm profilesARead-only
List all arm profiles (only available when using the local alarm manager — the standalone NVR alarm system, not Protect cloud alerts). Returns array; each profile (7.3.70 docs): id, name, automations[], creator, schedules[], recordEverything, activationDelay (0 | 60000 | 300000 | 600000), createdAt, updatedAt. On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_bridgesList bridgesARead-only
List all bridges managed by UniFi Protect. Returns array; each bridge includes: id, modelKey, name, mac, state, type, guid, platform, clients (array of MACs), maxClients (7.3.70 docs). On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_camerasList camerasARead-only
List all cameras managed by UniFi Protect. Returns array; each camera includes (Integration API 7.3.70-verified fields): id, mac, name, modelKey, state (CONNECTED/DISCONNECTED), type (hardware model name, e.g. UVC G6 Turret), guid (hardware MODEL GUID — every camera of the same model returns the same value, so it is NOT a per-camera identifier; use id), activePatrolSlot, hasPackageCamera, hdrType, isMicEnabled, micVolume, videoMode, featureFlags (hasHdr, hasMic, hasSpeaker, hasLedStatus, smartDetectTypes[], smartDetectAudioTypes[], videoModes[], supportFullHdSnapshot), lcdMessage (type, resetAt, text), ledSettings (isEnabled, floodLed, welcomeLed), osdSettings (isNameEnabled, isDateEnabled, isLogoEnabled, isDebugEnabled, overlayLocation), smartDetectSettings (objectTypes[], audioTypes[]). The Integration API does NOT expose recording state, motion timestamps, connection/last-seen, firmware, host, or per-channel stream config. On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_chimesList chimesARead-only
List all chimes managed by UniFi Protect. Returns array; each chime includes: id, modelKey, name, mac, state, type, guid, cameraIds (array of camera IDs), ringSettings (array of objects: cameraId, volume, ringtoneId, repeatTimes) — verified live 7.3.70. On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_filesList filesARead-only
List device asset files (only 'animations' is supported — clips uploadable to G4 Doorbell screens). Returns array; each record (verified live 7.3.70): id, name (server-generated), type, originalName, path, size, createdAt, updatedAt, metadata. An image upload (verified for GIF) later gains a derived .gif preview record, created asynchronously, so a listing taken right after the upload may show only the stored image. On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: fileType (required), limit, offset. Returns: offset, result, totalCount
protect_list_fobsList fobsARead-only
List all fobs managed by UniFi Protect. Returns array; each fob includes: id, modelKey, name, mac, state, type, guid, awayState, buttonLabels, featureFlags (buttons[], hasKeypad), armControlSettings (enabled, armProfileId, nightProfileId), keypadSettings (beepEnabled, beepVolume), wirelessConnectionState (signalState: signalQuality, signalStrength; batteryStatus: percentage, isLow; bridge) (7.3.70 docs). On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_lightsList lightsBRead-only
List all lights managed by UniFi Protect. Returns array; each light includes: id, modelKey, name, mac, state, type, guid, lightModeSettings (mode, enableAt), lightDeviceSettings (isIndicatorEnabled, pirDuration, pirSensitivity, ledLevel), isDark, isLightOn, isLightForceEnabled, lastMotion, isPirMotionDetected, camera (7.3.70 docs). On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_link_stationsList link stationsARead-only
List all link stations managed by UniFi Protect. Link stations are non-alarm-hub gateways (use protect_list_alarm_hubs for alarm hubs). Returns array; each link station includes: id, modelKey ("linkstation"), name, mac, state, type, guid, isAlarmHub, ledSettings (isEnabled), lastEvent, alarmHub (armed, battery, buckboost, connector, cover, deviceTamperStatus (e.g. "tampered"), currentMeterChannelStatus, currentMeterStatus, inputPower, poeout, powerMeter, output and input (maps keyed by channel), inputTerminalStatus, outputTerminalStatus, emergencyTerminalStatus, auxiliaryPowerTerminalStatus), threadState (network: status, role, networkName, channel, panId, extendedPanId, joinedDeviceCount, errorReason, lastUpdatedAt) (7.3.70 docs). On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_liveviewsList liveviewsARead-only
List all live views (camera grid layouts shown on viewers / in the Protect UI). Returns array; each liveview includes (Integration API 7.3.70-verified): id, modelKey, name, isDefault, isGlobal, layout (number, slot count), owner (user ID), slots (array of {cameras: string[], cycleMode, cycleInterval}). NOTE: slots use a cameras string-array, not a single cameraId. On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_nvrsList NVRsARead-only
Get the NVR (Network Video Recorder) console info. NOTE: despite the name, the Protect Integration API's /nvrs endpoint returns a SINGLE NVR object, not an array. Returns: id, modelKey, name, type (e.g. UNVR-PRO), guid, mac, doorbellSettings (defaultMessageText, defaultMessageResetTimeoutMs, customMessages[], customImages[] (preview, sprite)), armMode (status, armProfileId, armedAt, willBeArmedAt, breachDetectedAt, breachEventCount, breachTriggerEventId, breachEventId).
Inputs: no named parameters. Returns: id, mac, guid, name, +4 more
protect_list_relaysList relaysARead-only
List all relays managed by UniFi Protect. Returns array; each relay includes: id, modelKey, name, mac, state, type, guid, ledSettings (isEnabled), outputs (array of objects: id, name, type, delay, pulseDuration, state, rebootState — id is the outputId for protect_activate_relay_output), inputs (array of objects: id, name, state, actionTrigger, actionType, actionOutputId), wirelessConnectionState (signalState: signalQuality, signalStrength; batteryStatus: percentage, isLow; bridge) (7.3.70 docs). On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_sensorsList sensorsARead-only
List all sensors managed by UniFi Protect. Returns array; each sensor includes: id, modelKey, name, mac, state, type, guid, mountType, featureFlags (temperature, humidity, light, motion, waterLeak, open, tamper, smoke — each {channelCount}), batteryStatus (percentage, isLow), stats (light, humidity, temperature — each {value, status}), lightSettings / humiditySettings / temperatureSettings (isEnabled, margin, lowThreshold, highThreshold), isOpened, openStatusChangedAt, isMotionDetected, motionDetectedAt, motionSettings / glassBreakSettings (isEnabled, sensitivity, sensitivityWhenArmed), scheduleMode, armProfileIds, hasCustomSensitivityWhenArmed, alarmTriggeredAt, alarmSettings, leakDetectedAt, externalLeakDetectedAt, leakSettings (isInternalEnabled, isExternalEnabled), tamperingDetectedAt, wirelessConnectionState (signalState: signalQuality, signalStrength; batteryStatus: percentage, isLow; bridge) (7.3.70 docs). On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_sirensList sirensARead-only
List all sirens managed by UniFi Protect. Returns array; each siren includes: id, modelKey, name, mac, state, type, guid, volume, ledSettings (isEnabled), sirenStatus (isActive, activatedAt, duration), connectionType, wirelessConnectionState (signalState: signalQuality, signalStrength; batteryStatus: percentage, isLow; bridge) (7.3.70 docs). On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_speakersList speakersBRead-only
List all speakers managed by UniFi Protect. Returns array; each speaker includes: id, modelKey, name, mac, state, type, guid, volume, micVolume, isMicEnabled, speakerState (status, mode), featureFlags (hasMic) (7.3.70 docs). On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_ulp_usersList ULP usersARead-only
List UniFi Identity (ULP) users — per the API docs, those with enrolled credentials (NFC cards, fingerprints). Returns array; each ULP user includes (Integration API 7.3.70-verified): id, modelKey, firstName, lastName, fullName, email (empty string for service accounts), status (e.g. ACTIVE). Enrolled-credential detail (NFC cards, fingerprints) is NOT exposed by this API surface. On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_usersList usersARead-only
List all Protect users (filtered by the API key's access permissions). Returns array; each user includes (Integration API 7.3.70-verified): id, modelKey, name, firstName, lastName, email, ucoreUserId. The Integration API does NOT expose roles, permissions, login history, groups, or notification settings. On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_list_viewersList viewersARead-only
List all viewers managed by UniFi Protect. Returns array; each viewer includes: id, modelKey, name, mac, state, type, guid, liveview, streamLimit (7.3.70 docs). On a large site, use limit and offset to page; a paged result also returns totalCount and offset.
Inputs: limit, offset. Returns: offset, result, totalCount
protect_subscribe_devicesSubscribe devicesARead-only
Connect to the device update WebSocket and collect messages for a specified duration (1-30s). Returns {messages, duration, error?, truncated?}; stops early with truncated=true after 200 messages or 100,000 characters of JSON, whichever comes first. A connection that fails before any message arrives returns an error. Each message is an envelope {type, item} where item is a device resource carrying id and modelKey (camera, light, sensor, nvr, …). The 7.3.70 docs show type 'add' with the full device object as item; other message types and whether updates carry only changed fields are not documented — inspect the captured messages. Use to detect device state changes or newly adopted devices. Not available over Cloud Connector (api.ui.com).
Inputs: duration. Returns: error, duration, messages, truncated
protect_subscribe_eventsSubscribe eventsARead-only
Connect to the Protect event WebSocket and collect messages for a specified duration (1-30s). Returns {messages, duration, error?, truncated?}; stops early with truncated=true after 200 messages or 100,000 characters of JSON, whichever comes first. A connection that fails before any message arrives returns an error. Each message is an envelope {type: 'add' | 'update', item: {id, modelKey: 'event', type (event kind, e.g. 'ring'), start, end (epoch ms), device (ID of the camera/sensor that raised it)}} (7.3.70 docs). The full set of event kinds and any further event fields are not documented — inspect the captured messages. Not available over Cloud Connector (api.ui.com).
Inputs: duration. Returns: error, duration, messages, truncated
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 38 tools
Most tools are cleanly separated: every device family has a distinct list_* vs get_* pair distinguished by verb, and snapshot/rtsp/subscribe are clearly unique. The only real overlap is protect_list_link_stations vs protect_list_alarm_hubs, which return the same modelKey ('linkstation') and nearly identical field sets, though the descriptions explicitly disambiguate.
Every tool uses the same protect_ prefix followed by a consistent verb_noun pattern (list_*, get_*, subscribe_*), with no camelCase or mixed-style deviations. Naming is highly predictable across all 38 tools.
38 tools is heavy, driven by 13 device families each carrying both a list_* and a get_* variant. The get_* tools add little since their descriptions admit they return the same field set as the list entries, so several tools are near-redundant even if the underlying domain is large.
The surface is read-only (list/get/snapshot/rtsp), with no create/update/delete/arm operations even though descriptions reference a PATCH for liveviews. Worse, two referenced tools are absent from the set (protect_create_rtsp_stream and protect_activate_relay_output), which will cause agent failures when followed.
Maintenance
Related MCP Connectors
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
AI-callable tools for API mocking, testing, monitoring, security, and automation.
Marketo MCP server for AI. 130 tools to operate Marketo from Claude, Cursor, or ChatGPT.
Unified MCP Server is a remote MCP connector for AI agents and vertical AI products that provides access to 22,000+ authorized SaaS tools across 400+ integrations and 24 categories directly inside LLMs (Claude, GPT, Gemini, Cohere). Tools operate only on explicitly authorized customer connections, enabling agents to safely read and write against live third-party systems.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes the UniFi Network Integration API as MCP tools, dynamically loaded from JSON manifests, with read-only mode by default.MIT
- AlicenseBqualityDmaintenanceProvides 170+ tools to manage UniFi networks via the internal controller API, enabling AI assistants to perform full network management including clients, devices, WLANs, firewall, and more.64MIT
- AlicenseBqualityCmaintenanceExposes the Firewalla MSP API as tools for Claude Code and other MCP clients, enabling natural-language management of Firewalla boxes, alarms, rules, devices, flows, target lists, and trends with full read/write capabilities.19MIT
- FlicenseNot gradedqualityDmaintenanceEnables read-only querying of a UniFi fleet via the Site Manager API and per-console connector proxy, allowing users to list hosts, sites, devices, ISP metrics, and live network clients through Claude.-