Skip to main content
The UniFi MCP Server gives your AI assistant full visibility into every device on your network—access points, switches, and gateways—and the ability to control them through plain English. You can ask your AI to show you which devices are offline, restart a misbehaving access point, or flash an LED to locate a device on the shelf, without opening the UniFi console.

What you can do

List and inspect devices

Query all devices on a site, filter by type, or search by name, MAC address, or IP.

Real-time statistics

Pull live CPU, memory, uptime, and bandwidth stats for any device.

Device control

Restart devices, flash locator LEDs, and trigger firmware upgrades.

Client management

Block, unblock, and reconnect clients directly from your AI assistant.

Listing and finding devices

You can list all devices on a site, filter by device type, or search by name, MAC, or IP address. Example prompts:
  • “Show me all offline devices”
  • “List all access points on the main site”
  • “Find the device with IP 192.168.2.50”
  • “Which switches are in the network?”
Tools used: list_devices_by_type, search_devices, get_device_details
Response:

Device type codes

Real-time device statistics

The get_device_statistics tool returns live data for any device. Example prompt: “What is the CPU and memory usage on the conference room AP?”
Response:
uplink_depth of 0 means the device is directly connected to the gateway. Higher values indicate the device is further down the network tree.

Controlling devices

All device control operations are mutating—they change the state of your hardware. For safety, every mutating tool requires you to pass confirm=True. You can also pass dry_run=True to preview what would happen without making any changes.
Mutating operations such as restart, locate, and firmware upgrade require confirm=True. Omitting this flag causes the tool to return an error. All operations are recorded in audit.log.

Restart a device

Example prompts:
  • “Restart the access point in the lobby”
  • “Reboot the switch in server room 2”
The locate tool flashes the LED on a physical device so you can find it in a rack or ceiling. Example prompt: “Flash the LED on the access point named ‘Warehouse-AP-3’ so I can find it”
Pass "enabled": False to turn the locator off again.

Upgrade firmware

Example prompt: “Upgrade the firmware on the gateway”
Firmware upgrades cause a brief device restart. Connected clients will temporarily lose connectivity during the upgrade, which typically takes 2–5 minutes.

Client management

You can block, unblock, and reconnect individual clients on the network through your AI assistant. These operations also require confirm=True. Example prompts:
  • “Block the device with MAC aa:bb:cc:dd:ee:01 from the network”
  • “Reconnect John’s laptop”
  • “Unblock the IoT sensor I blocked yesterday”
1

Find the client

2

Block the client

3

Unblock when ready

Force client reconnect

Use reconnect_client when a client is stuck or has a stale IP lease.

Safety mechanisms

Every tool that changes device or client state includes built-in safeguards:
When in doubt, always run with dry_run=True first. The AI assistant will show you exactly what would happen before any changes are made.