Skip to main content
The UniFi MCP Server exposes traffic management capabilities that let your AI assistant analyze and shape network traffic. You can create routing policies to prioritize or limit specific traffic types, inspect bandwidth usage across applications and categories using Deep Packet Inspection (DPI) statistics, and manage traffic flows in real time.
QoS profile management (create/update/delete dedicated QoS profiles) is not available via the UniFi API. The traffic routing tools described here use the supported /rest/routing endpoint. For bandwidth management, use traffic routes with the shape action.

What you can do

Traffic routes

Create routing policies to allow, deny, mark, or shape specific traffic flows.

Bandwidth shaping

Apply bandwidth limits to specific traffic using the shape action.

DSCP marking

Mark packets with DSCP values for downstream QoS enforcement.

DPI analytics

Identify top bandwidth applications and per-client usage across your network.

Traffic routes

Traffic routes are policies that match specific traffic flows and apply an action: allow, deny, mark (DSCP), or shape (bandwidth limit). Routes are evaluated in priority order—lower priority numbers run first. Example prompts:
  • “Show all traffic routing policies”
  • “Create a rule to prioritize video conferencing traffic”
  • “Limit streaming traffic to 50 Mbps”

List traffic routes

Response:

Create a traffic route

All route creation requires confirm=True. Use dry_run=True to validate first.
Traffic routes that deny traffic or apply strict bandwidth limits can impact network performance. Always preview with dry_run=True before applying.
Example: prioritize video conferencing with DSCP marking
Example: limit streaming traffic

Traffic route parameters

DSCP values reference

Update a traffic route

Delete a traffic route

DPI statistics

Deep Packet Inspection (DPI) statistics show you which applications and categories are consuming the most bandwidth on your network. This is a read-only capability—no confirmation is required. Example prompts:
  • “What are the top 10 applications by bandwidth in the last 24 hours?”
  • “Show bandwidth usage by category”
  • “How much bandwidth is Netflix using today?”
  • “What is device aa:bb:cc:dd:ee:01 using the network for?”

Site-wide DPI statistics

Response:
Supported time ranges: 1h, 6h, 12h, 24h, 7d, 30d

Top applications by bandwidth

Use list_top_applications to quickly identify the highest-bandwidth applications. Example prompt: “Show me the top 5 bandwidth hogs this week”
Response:

Per-client DPI statistics

See what a specific client is doing on the network by their MAC address. Example prompt: “What applications is the laptop at aa:bb:cc:dd:ee:01 using?”
Response:

Example: identifying and shaping heavy bandwidth users

This workflow shows how to use DPI data to identify heavy users and then apply a traffic shaping policy.
1

Find top applications

2

Check per-client usage

3

Apply bandwidth limit on guest VLAN

Safety summary