unifi-console-mcp
An MCP server that provides read access and gated, previewed configuration changes to undocumented UniFi OS/Network console APIs.
Search, describe, and call ~180 OpenAPI-defined console operations, including read-only POST queries and confirmed file downloads; generic configuration writes are refused.
Use curated read tools for session/permissions, system logs, firewall policy hit audits, PoE and switch-port diagnostics, backups/support files, gateway config drift, and access review.
Make typed writes for port forwards, network lists, clients and client commands, Local DNS, client groups, Dynamic DNS, traffic/QoS objects, dashboard QoS rules, DoH, syslog, data retention, logging levels, firewall policies, switch ports, Wi-Fi/SSIDs, networks/VLANs, and WAN settings.
Writes are off by default with an entity allowlist and require a preview/confirm fingerprint flow, stale-preview refusal, journaling, read-back verification, rollback instructions, and extra approvals/safety probes for risky tier-C changes.
Configure certificate pinning, dedicated local credentials, env-only Wi-Fi/DDNS secrets, download/journal directories, custom spec path, response-size budget, and log level.
Provides tools for interacting with UniFi OS and Network console APIs, including searching and calling API operations, reading session/system logs, firewall policy hits, PoE and switch port details, backups, support files, access reviews, and gated write operations for configuration such as port forwards, DNS, firewall policies, switch ports, Wi-Fi, VLANs, and WAN settings.
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-console-mcp show me which firewall rules haven't been hit recently"
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.
An MCP server for the undocumented UniFi OS and Network console APIs, with
typed, gated write tools. Most UniFi MCP servers use the supported Integration API or a fixed set of legacy calls.
This one is driven by an OpenAPI spec of the console's own API (src/unifi_console_mcp/openapi.yaml), so the tool
surface can keep growing, and it adds safe, previewed configuration changes for the things the supported API does not
cover.
Read this first. The APIs this server uses are not documented or supported by Ubiquiti and can change with any update. The write tools were proven live against one console (Cloud Key Gen2 Plus) running Network 11.0.81. Anything else is untested. Writes are off by default. If you turn them on, an AI client can change your network, including DNS, firewall rules and the WAN. Start with read-only, use a dedicated account, keep a backup, and read every preview before confirming. Provided as-is, without warranty (see LICENSE).
What it does
Generic tools reach every operation in the spec (about 180) without registering 180 tools:
Tool | Purpose |
| Search the spec by words, tag or access level |
| Parameters, body schema and the spec's own warnings |
| Run one read operation (including the read-only POST queries). Annotated read-only, so a client can allow it without prompting |
| File downloads and gated safe writes (generate a backup or support file). Still runs reads, but is annotated as able to write; refuses configuration writes |
Curated read tools for areas other servers skip: unifi_console_session_status, unifi_console_system_log,
unifi_console_firewall_policy_hits (find unused rules), unifi_console_poe_overview,
unifi_console_switch_port_detail, unifi_console_backup, unifi_console_support_file,
unifi_console_gateway_config (the config the controller sent the gateway, with policy drift),
unifi_console_access_review.
Typed write tools (all off until enabled; see docs/write-tools.md): port forwards, network lists, clients (edit and block/unblock/forget/reconnect), static DNS, client groups, Dynamic DNS, traffic and QoS objects, dashboard QoS rules, application blocks, devices (locate, restart, update, adopt, remove), DNS over HTTPS, firewall policies, switch ports, Wi-Fi, networks/VLANs, the WAN, syslog, data retention and logging levels.
Related MCP server: unifi-network-mcp
How writes stay safe
Every write is two steps: confirm=false returns a read-only preview (before, after, diff, warnings, a fingerprint);
confirm=true with that fingerprint applies it. The server re-reads the object first (a stale preview is refused),
journals the attempt, sends the change, reads it back, verifies it, and returns the diff plus the exact rollback call.
Risky entities (tier C) also need an approval_note, and the riskiest have an automatic restore if a DNS or
connectivity check fails afterwards. Details: docs/write-safety.md.
Quick start
Requires Python 3.12+ and uv.
git clone https://github.com/jaseonline/unifi-console-mcp.git
cd unifi-console-mcp
uv sync
uv run pytest # unit tests, no console needed
uv run unifi-console-mcp # stdio serverCreate a dedicated local UniFi account for the server, then set the environment variables below and add the server
to your MCP client. Claude Desktop example (claude_desktop_config.json):
{
"mcpServers": {
"unifi-console": {
"command": "uv",
"args": ["--directory", "/path/to/unifi-console-mcp", "run", "unifi-console-mcp"],
"env": {
"UNIFI_LOCAL_HOST": "192.168.1.2",
"UNIFI_MCP_USERNAME": "your-local-account",
"UNIFI_MCP_PASSWORD": "from-your-password-manager",
"UNIFI_CONSOLE_CERT_SHA256": "pin-the-console-certificate-here"
}
}
}
}More in docs/getting-started.md.
Claude Desktop extension. Instead of editing claude_desktop_config.json, you can build an MCP Bundle
(uv run mcpb/build.py) and install the .mcpb with a double-click: Claude Desktop shows a settings form and keeps the
password and API key in the operating system's secure storage. Blank form fields fall back to the environment variables
below. See mcpb/README.md.
Configuration
Variable | Meaning |
| Console address, e.g. |
| HTTPS port (default 443) / site name (default |
| Dedicated local account (no MFA) |
| Integration API key (only for Integration operations) |
| Site Manager key from unifi.ui.com > API, for the read-only cloud operations on |
| Pin the console certificate by SHA-256 fingerprint (preferred) |
|
|
|
|
| Comma-separated entities that may be written, e.g. |
| Change journal (default |
| Where backups and support files are saved (default |
| Your local DNS domain; static DNS names outside it trigger a warning (default |
| DNS safety probe server and retry window (seconds) |
| TCP endpoints the WAN safety net must reach (default |
| Response size budget (default 40000) |
| Use a spec file other than the bundled one |
| Server log level: |
On Windows, a variable missing from the server's own environment is also read from your persistent user and then system
environment variables (the registry), so values set with setx or System Properties work even when the client did not
pass them on.
The username, password, API key and Site Manager API key are checked in this order: a filled-in form field, then a
password-manager credential cache (Windows Credential Manager, service unifi-mcp-cache, entries unifi-mcp/<field>; needs
the keyring package, and UNIFI_CONSOLE_KEYRING=off skips it), then the variables above. The cache comes before the
registry so a stale variable cannot override a rotated secret.
Secrets for Wi-Fi passphrases and Dynamic DNS tokens come from UNIFI_WIFI_<NAME> and UNIFI_DDNS_<NAME>
environment variables only; they are never accepted as tool arguments and never appear in previews or the journal.
Documentation
Getting started: account, permissions, certificate pinning, enabling writes
Write safety: the preview, confirm, verify, rollback flow and its guards
Write tools: what each typed tool edits and what it leaves alone
Verified behaviours: console quirks found by live testing
Adding an entity: capture, spec, build, test
MCP Bundle: building and installing the Claude Desktop extension, and its settings form
Status
Proof of concept, actively developed. Unit tests use an in-memory fake console. Live checks (scripts/*_live_check.py)
create and delete only throwaway objects with a zz- prefix, except where a script says otherwise. Run them against
your own console only after reading them.
Licence
Available Tools
29 toolsunifi_console_access_reviewARead-onlyIdempotent
Who and what can access the console: admin accounts, custom roles and API keys (keys masked).
Useful for least-privilege reviews of integration accounts. Needs read access to UniFi OS users. Returns JSON: {"ok", "data": {"admins": [...], "roles": [...], "api_keys": [...]}}.
Inputs: no named parameters. Returns: result
unifi_console_backupA
List, create or download UniFi OS console backups (whole console, not just the Network app).
list is read-only. create makes a new backup on the console and needs UNIFI_CONSOLE_ENABLE_WRITES=true and confirm=true. download builds a fresh archive and saves it under the server's download folder (never returned here; it contains credentials) and needs confirm=true. Console-level calls need the MCP account's Control Plane permission raised from View to Admin.
Returns JSON: {"ok", "data": [...]} for list, or {"ok", "saved_file": {"path", "bytes", "sha256"}}.
Inputs: params (required). Returns: result
unifi_console_call_operationA
Call one spec operation on the console. Reads run immediately; configuration writes are refused.
Read-only POST queries (system log, traffic flows) are treated as reads. File downloads (backups, support files) are saved to disk, never returned, and need confirm=true. Safe writes (generate a support file or backup) also need UNIFI_CONSOLE_ENABLE_WRITES=true on the server. Secrets (x_* fields, passwords, keys) are always redacted. Large results are cut to fit; use fields/search/limit/offset to narrow them.
Returns JSON: {"ok": true, "operation", "http_status", "meta"?, "data"} or {"ok": false, "error"}.
Inputs: params (required). Returns: result
unifi_console_clientADestructive
Preview, then apply, a change to one known client: alias, note, fixed IP and Local DNS record.
Two steps, always: call with confirm=false to get a read-only preview (before, after, diff, warnings, a fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. The client is re-read first, so a stale preview is refused. A fixed IP is checked against the real LAN subnets, the gateway and broadcast addresses, other clients' fixed IPs and the addresses in use right now; a Local DNS name is checked against other clients and the static DNS records. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'client' in UNIFI_CONSOLE_WRITE_ENTITIES. After applying, the client is read back and the result reports verified true/false, the diff, and the exact rollback call. Every write is journalled. A fixed IP takes effect when the client next renews its lease.
Inputs: params (required). Returns: result
unifi_console_client_commandADestructive
Preview, then apply, a command for one client: block, unblock, reconnect or forget.
Two steps, always: call with confirm=false to get a read-only preview (the client, the request, warnings, a fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. block and unblock are read back and are each other's rollback. reconnect disconnects a connected wireless client once. forget deletes an offline client's history, name, note, fixed IP and Local DNS record for good, so it also needs discard_history=true and has no rollback. UniFi devices are refused. Applying needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'client' in UNIFI_CONSOLE_WRITE_ENTITIES (the same switch as the client record tool). Every command is journalled.
Inputs: params (required). Returns: result
unifi_console_client_groupADestructive
Preview, then apply, a change to the console's client groups (named sets of client MAC addresses used by policies).
Two steps, always: call with confirm=false to get a read-only preview (before, after, diff, warnings, what uses the group, a fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. The group is re-read first, so a stale preview is refused. Members are MAC addresses (any common spelling is normalised to aa:bb:cc:dd:ee:ff); use add_members/remove_members to change a few, or members to replace all. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'client_group' in UNIFI_CONSOLE_WRITE_ENTITIES. A group that firewall policies or traffic objects still use cannot be deleted, and editing one warns that the change takes effect for them at once. The console only accepts the whole group, so updates send all of it. After applying, the group is read back and the result reports verified true/false, the diff, and the exact rollback call. Every write is journalled.
Inputs: params (required). Returns: result
unifi_console_data_retentionADestructiveIdempotent
Preview, then apply, a change to how long the console keeps statistics and events (Control Plane > Network data retention).
Two steps, always: call with confirm=false to get a read-only preview (the retention fields only: before, after, diff, warnings, a fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. Fields: data_retention_setting_preference (auto or manual) and, with manual, hours_5minutes, hours_hourly, hours_daily, hours_monthly, hours_others. The rest of the group (auto-backup, analytics and a Google Maps key) is sent back exactly as read and never shown. Shortening retention deletes older data at the next prune; longer retention uses more storage. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'data_retention' in UNIFI_CONSOLE_WRITE_ENTITIES. Every write is journalled.
Inputs: params (required). Returns: result
unifi_console_describe_operationARead-onlyIdempotent
Show an operation's parameters, request-body schema, access level and description from the spec.
Does not call the console. Returns JSON with "parameters" (name, in, required, description), "body_schema" (resolved JSON schema or null), "access" and "description". Descriptions often record quirks such as 'Read-only despite POST' or which fields hold secrets, so read them before calling.
Inputs: params (required). Returns: result
unifi_console_dohADestructiveIdempotent
Preview, then apply, a change to the gateway's DNS over HTTPS (DoH) setting. Tier C: it can stop DNS for the whole network.
Two steps, always: call with confirm=false to get a read-only preview (before, after, diff, warnings, the safety probe result, a fingerprint); call again with the same fields plus confirm=true, that fingerprint and an approval_note to apply. Fields: state (off, auto, manual or custom), server_names (manual) and custom_servers (custom); the list that does not apply is cleared, as the UI does. Before applying, DNS is tested through the gateway; if it is already failing, the change is refused. After applying, DNS is tested again and, if it fails, the previous values are put back automatically (once) and the result says applied=false with auto_restored=true. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'doh' in UNIFI_CONSOLE_WRITE_ENTITIES. SSL inspection is a separate setting and is not changed here. Every write is journalled; scripts/doh_restore.py can put the last values back from the journal.
Inputs: params (required). Returns: result
unifi_console_dynamic_dnsADestructive
Preview, then apply, the creation, update or deletion of a Dynamic DNS entry on the gateway.
Two steps, always: call with confirm=false to get a read-only preview (after, warnings, errors, a fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. An update keeps the entry's id and sends the whole entry; because the console never shows the stored token, an update must be given token_env too (the current token if only other fields change, or the new one when rotating it). The provider token is never a tool argument: pass token_env, the name of a UNIFI_DDNS_* environment variable in the server's environment. The token is write-only, so it is not read back (the result lists it under secret_fields_not_verified) and it is not journalled. Deleting an entry discards its token for good: the delete needs discard_token=true, and its rollback can only recreate the entry with a fresh token. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'dynamic_dns' in UNIFI_CONSOLE_WRITE_ENTITIES. Every write is journalled.
Inputs: params (required). Returns: result
unifi_console_firewall_policyADestructive
Preview, then apply, a change to one custom zone-based firewall policy. Tier C: it can cut or expose the network.
Actions: create (switched off unless enabled=true), update, enable, disable, delete, move (position first, last, before or after relative_to, inside the policy's own zone pair). Two steps, always: call with confirm=false for a read-only preview (before, after, diff, what the policy matches in words, hits, warnings, errors, a fingerprint); call again with the same fields plus confirm=true, that fingerprint and an approval_note to apply. System-defined policies and the generated "(Return)" copies are never changed. An enabled ALLOW from External that matches everything, or an enabled BLOCK/REJECT that cuts DNS/DHCP/internet for the console's own network, is refused unless acknowledge_exposure / acknowledge_outage is passed. A change touching an enabled policy is wrapped in a DNS test before and after; if it fails afterwards the previous state is put back automatically, once. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'firewall_policy' in UNIFI_CONSOLE_WRITE_ENTITIES. Every write is journalled.
Inputs: params (required). Returns: result
unifi_console_firewall_policy_hitsARead-onlyIdempotent
List zone-based firewall policies with hit counts and last-hit time, for audits.
Finds unused rules (zero hits), noisy rules and stale rules. The Integration API does not expose hit counts. Read-only: to change policies use the existing firewall tools.
Returns JSON: {"ok", "meta", "data": [{"name", "id", "index", "action", "enabled", "predefined", "hits", "last_hit", "logging", "source_zone", "destination_zone"}]}.
Inputs: params (required). Returns: result
unifi_console_list_operationsARead-onlyIdempotent
Search the UniFi OpenAPI spec for operations (undocumented controller / UniFi OS APIs plus the Integration API).
Use this first to find an operationId, then unifi_console_describe_operation, then unifi_console_call_operation. Does not call the console.
Returns JSON: {"ok": true, "total": int, "operations": [{"operation_id", "method", "path", "tag", "summary", "access"}], "next_offset": int|null}. By default only operations callable right now are shown.
Inputs: params (required). Returns: result
unifi_console_logging_levelsAIdempotent
Preview, then apply, the logging level (warn or debug) of the Network application's services: device, mgmt, sdn, system.
Two steps, always: call with confirm=false to get a read-only preview (the exact requests, warnings, a fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. With no fields, or setting_preference=auto, everything returns to the console's defaults (warn). The console does not report the current levels, so the preview has no before and the result cannot be read back (verified is null). Debug is chatty and fills storage: use it for diagnosis and put it back. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'logging_levels' in UNIFI_CONSOLE_WRITE_ENTITIES. Every write is journalled.
Inputs: params (required). Returns: result
unifi_console_networkADestructive
Preview, then apply, a change to a LAN/VLAN network. Tier C: a wrong change can cut DHCP, the VLAN and routing for a whole segment.
Two steps, always: confirm=false returns a read-only preview (before, after, diff, what uses the network, the clients on it, warnings, errors, a fingerprint); then call again with the same fields plus confirm=true, that fingerprint and an approval_note. A new network is created disabled. The network that holds the console, a switch, an access point or the gateway needs acknowledge_infrastructure=true for disabling, deleting, or changing its VLAN, subnet or DHCP server; a network used by an SSID or switch port cannot be deleted; disabling it or disruptive edits with clients connected need acknowledge_disconnect=true. After a change that touches an enabled network every connected device must still be connected and DNS must still work, otherwise the previous state is restored once. WAN, VPN, IPv6 and DHCP options are not offered. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'network' in UNIFI_CONSOLE_WRITE_ENTITIES. Every write is journalled.
Inputs: params (required). Returns: result
unifi_console_network_listADestructive
Preview, then apply, a change to the console's network lists (port, address and domain lists used by firewall policies).
Two steps, always: call with confirm=false to get a read-only preview (before, after, diff, warnings, what uses the list, a fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. The list is re-read first, so a stale preview is refused. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'network_list' in UNIFI_CONSOLE_WRITE_ENTITIES. A list that firewall policies or traffic objects still use cannot be deleted, and editing one warns that the change takes effect for them at once. After applying, the list is read back and the result reports verified true/false, the diff, and the exact rollback call. Every write is journalled.
Inputs: params (required). Returns: result
unifi_console_poe_overviewARead-onlyIdempotent
PoE budget for one switch plus the site's power supervisors (watchdogs that power-cycle ports).
Check this before diagnosing a PoE device that keeps rebooting: a supervisor with consecutive_failures above zero is power-cycling it. Returns JSON: {"ok", "data": {"poe_host": {...}, "power_supervisors": [...]}}.
Inputs: params (required). Returns: result
unifi_console_port_forwardADestructive
Preview, then apply, a change to the console's port forwards (internet-to-LAN rules).
Two steps, always: call with confirm=false to get a read-only preview (before, after, diff, warnings, a fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. The rule is re-read first, so a stale preview is refused. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'port_forward' in UNIFI_CONSOLE_WRITE_ENTITIES. A new rule is created disabled; enabling one exposes a host to the internet and the preview says exactly what. After applying, the rule is read back and the result reports verified true/false, the diff, and the exact rollback call. Every write is journalled.
Inputs: params (required). Returns: result
unifi_console_qos_ruleADestructive
Preview, then apply, a change to the console's QoS rules (the dashboard's QoS widget; Traffic Management objects use unifi_console_traffic_object instead).
Two steps, always: call with confirm=false to get a read-only preview (before, after, diff, warnings, a
fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. The rule is
re-read first, so a stale preview is refused. A rule names a WAN or VPN link (wan_network), the clients it covers
(source_clients, MAC addresses), the applications it matches (destination_apps, application ids), and an
objective: LIMIT (download_limit / upload_limit in kbit/s, 10000 = 10 Mbit/s, with download_burst / upload_burst OFF,
SHORT or LONG) or PRIORITIZE (no limits). Other source and destination types and schedules other than ALWAYS have
not been captured and are not edited. A new rule starts switched off unless enabled=true; once enabled it takes
effect at once. Use action enable or disable to switch one. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and
'qos_rule' in UNIFI_CONSOLE_WRITE_ENTITIES. The console only accepts the whole rule, so updates send all of it. After
applying, the rule is read back and the result reports verified true/false, the diff, and the exact rollback call.
Every write is journalled. Delete uses the console's batch-delete call.
Inputs: params (required). Returns: result
unifi_console_session_statusARead-onlyIdempotent
Check the connection and report which account the server runs as, what it may do, and session facts.
Logs in if needed. Reports the controller version, the account's permissions, the session cookie's lifetime and whether the CSRF token has rotated, plus the server's safety settings. Use it first when a call fails with a permission or authentication error.
Returns JSON: {"ok", "controller": {...}, "account": {...}, "session": {...}, "server": {...}}.
Inputs: no named parameters. Returns: result
unifi_console_static_dnsADestructive
Preview, then apply, a change to the gateway's Local DNS records (A, AAAA, CNAME, MX, SRV, TXT).
Two steps, always: call with confirm=false to get a read-only preview (before, after, diff, warnings, a fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. The record is re-read first, so a stale preview is refused. The gateway answers these names for every client, so the preview warns when a name is outside example.home (it replaces the public answer), refuses duplicates, the CNAME rule and names a client already publishes, and lists CNAME records that point at a record you change or remove. The console only accepts the whole record, so updates send all of it. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'static_dns' in UNIFI_CONSOLE_WRITE_ENTITIES. After applying, the record is read back and the result reports verified true/false, the diff, and the exact rollback call. Every write is journalled.
Inputs: params (required). Returns: result
unifi_console_support_fileA
Generate a support file and (for the console) download it to disk.
The console bundle holds Network logs, remote syslog from every adopted device, configs and topology: the place to look when regular logs do not explain a fault (e.g. an STP problem visible only in device syslog). It contains secrets in plain text, so it is saved locally and never returned. Takes about a minute. Needs UNIFI_CONSOLE_ENABLE_WRITES=true, confirm=true, and Control Plane = Admin on the MCP account. scope='device' starts generation and reports status only.
Returns JSON: {"ok", "saved_file": {...}} (console) or {"ok", "data": {"status": ...}} (device).
Inputs: params (required). Returns: result
unifi_console_switch_portADestructiveIdempotent
Preview, then apply, a change to ONE port of ONE switch. Tier C: a wrong setting on an uplink, AP or console port can strand it.
Two steps, always: confirm=false returns a read-only preview (only that port's before/after, how the port is classified: uplink, infrastructure, client or unused, what is connected, warnings, errors, a fingerprint); then call again with the same fields plus confirm=true, that fingerprint and an approval_note. The console needs the whole port list on every save, so the tool sends every other port back exactly as read and checks afterwards that none of them changed. Risky fields (PoE, VLANs, isolation, BPDU guard, flow control, storm control) on uplink and infrastructure ports are refused unless acknowledge_infrastructure=true; a name change is always allowed. After a change every device that was connected must still be connected, otherwise the previous settings are put back automatically, once. Disabling a port, STP edge mode, port profiles and the other switch settings are not offered. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'switch_port' in UNIFI_CONSOLE_WRITE_ENTITIES. Every write is journalled.
Inputs: params (required). Returns: result
unifi_console_switch_port_detailARead-onlyIdempotent
Live per-port state for a switch: link, STP state/role, flaps, errors, PoE and optionally LLDP.
Trims the 1 MB+ device record to the useful port fields (any key starting stp_, poe_, lldp_ or containing error/drop/link_down is kept, so new firmware fields still appear). Read-only; secrets removed.
Returns JSON: {"ok", "data": {"name", "model", "version", "uplink", "stp": {...}, "ports": [...]}}.
Inputs: params (required). Returns: result
unifi_console_syslogADestructiveIdempotent
Preview, then apply, a change to the console's remote syslog setting (where logs are sent and which categories).
Two steps, always: call with confirm=false to get a read-only preview (before, after, diff, warnings, a fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. Fields: enabled, netconsole_enabled, netconsole_host, netconsole_port, contents, log_all_contents, this_controller, this_controller_encrypted_only, debug. The host and port are also written to ip and port as the UI does. Changing or stopping the destination ends the feed to the current receiver, and the preview says so. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'syslog' in UNIFI_CONSOLE_WRITE_ENTITIES. The group is read back and verified. Every write is journalled.
Inputs: params (required). Returns: result
unifi_console_system_logARead-onlyIdempotent
Query the UniFi System Log (the Network app's 'System Log' page), with templates already filled in.
This is richer than the older event list: it records STP loops, BPDU guard, PoE and port faults, WAN failovers, security events and admin changes. Defaults to the last 24 hours at MEDIUM severity and above. Use critical_only=true for switching faults (NETWORK_LOOP_DETECTED_BY_STP, BPDU_GUARD_TRIGGERED, PORT_BROADCAST_STORM, ROGUE_DHCP_SERVER_DETECTED, ...).
Returns JSON: {"ok", "meta": {"total", "page", "total_pages"}, "data": [{"time", "severity", "category", "subcategory", "event", "target", "title", "message", "id"}]}, newest first.
Inputs: params (required). Returns: result
unifi_console_traffic_objectADestructive
Preview, then apply, a change to the console's traffic objects (Traffic Management: bandwidth limits and priority, schedules, internet blocking and routing for networks or clients).
Two steps, always: call with confirm=false to get a read-only preview (before, after, diff, warnings, a
fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. The object is
re-read first, so a stale preview is refused. Target networks (by name) or clients (by MAC). QoS: qos_enabled,
qos_mode (LIMIT or PRIORITIZE), download_limit / upload_limit in kbit/s (10000 = 10 Mbit/s; 0 switches one off),
download_burst / upload_burst (DISABLED, SHORT, LONG) and qos_schedule. block_internet (with block_schedule) cuts
internet access for the targets, and route_* sends traffic out through another WAN or VPN client network; both need
acknowledge_blocking / acknowledge_reroute when the object is switched on. A new object starts switched off unless
enabled=true; once enabled it takes effect at once. App, domain and region matchers and the local-network block are not
edited. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'traffic_object' in UNIFI_CONSOLE_WRITE_ENTITIES.
The console only accepts the whole object, so updates send all of it. After applying, the object is read back and the
result reports verified true/false, the diff, and the exact rollback call. Every write is journalled.
Inputs: params (required). Returns: result
unifi_console_wanADestructive
Preview, then apply, a change to the WAN network settings. Tier C: a wrong change can cut the internet.
Two steps, always: confirm=false returns a read-only preview (before, after, diff, warnings, errors, a fingerprint, and the safety-net check run now); then call again with the same fields plus confirm=true, that fingerprint and an approval_note. Only update exists. Connection identity (MAC override, WAN VLAN, connection type, IPv6 type, uplink identity) needs acknowledge_identity=true. The uplink password and everything not listed are not offered. Applying re-provisions the gateway (about 20 seconds). After the change the gateway must be connected again, all devices that were connected must still be, the WAN must report ok, an internet probe and DNS must work; otherwise the previous state is restored once, automatically. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'wan' in UNIFI_CONSOLE_WRITE_ENTITIES. Every write is journalled.
Inputs: params (required). Returns: result
unifi_console_wifiADestructive
Preview, then apply, a change to a Wi-Fi network (SSID). Tier C: changes drop the clients on it.
Two steps, always: confirm=false returns a read-only preview (before, after, diff, the clients connected now, warnings, errors, a fingerprint); then call again with the same fields plus confirm=true, that fingerprint and an approval_note. A new SSID is created disabled. The passphrase is never an argument: pass passphrase_env, the name of a UNIFI_WIFI_* environment variable in the server's environment; it is write-only and is not read back, previewed or journalled. Changes that force clients to reconnect, and deletes, are refused while clients are connected unless acknowledge_disconnect=true; open security needs acknowledge_open=true. There is no automatic restore. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'wifi' in UNIFI_CONSOLE_WRITE_ENTITIES. Every write is journalled.
Inputs: params (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 29 tools
Most tools target a clearly distinct resource+action (wifi, wan, network, firewall_policy, syslog, doh, etc.), and the descriptions explicitly separate near-neighbors like traffic_object vs qos_rule and static_dns vs dynamic_dns. A few pairs can still be confused: client (edit record) vs client_command (block/forget), firewall_policy vs firewall_policy_hits, and the generic list/describe/call_operation trio versus the dedicated per-entity tools.
Every tool uses the same unifi_console_<snake_case> convention with no mixing of camelCase or style. Read tools use noun suffixes (session_status, system_log, switch_port_detail) and write tools use entity nouns, keeping the set predictable and readable.
29 tools is heavy, though the UniFi console is a genuinely broad domain (firewall, WiFi, WAN, QoS, DNS, syslog, backup, access). The dedicated tools largely cover distinct entities, but the generic list/describe/call_operation escape hatch partially duplicates them, so the surface feels larger than strictly necessary.
Coverage is strong: read tools for diagnostics plus preview/apply/verify/rollback write tools with a consistent safety model, and the spec operation tools fill remaining gaps. Some operations are explicitly not offered (VPN, IPv6, DHCP options, other switch settings, SSL inspection), which are minor but real gaps agents must work around.
Maintenance
Related MCP Connectors
Remote MCP for 1,500+ APIs. Vault-managed credentials; OAuth or API key. Search, load, and execute.
Find, document and execute authenticated API calls across 1000+ apps via one MCP server
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
MCP server for AI access to Swagger by SmartBear.
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
- AlicenseAqualityDmaintenanceMCP server providing typed, safety-gated access to UniFi Network consoles via the official API, enabling management of devices, clients, networks, WiFi, firewall policies, and more.1625 npm2MIT
- AlicenseAqualityCmaintenanceEnables local UniFi Network inspection and management through MCP, providing typed read-only inventory of sites, devices, clients, and networks, with preview-first, explicitly confirmed device rename and LED locate operations.8MIT
- AlicenseAqualityBmaintenanceEnables MCP-aware agents to query and manage a TP-Link Omada SDN controller by searching, inspecting, and calling operations from its live OpenAPI catalog.71MIT