UniFi

Provides MCP-based access to UniFi Network management, including site, device, client, WLAN, security, analytics, and backup tools.
  • typescript

0

GitHub Stars

typescript

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mjrestivo16-mcp-unifi": {
      "command": "node",
      "args": [
        "C:/path/to/mcp-servers/unifi/dist/index.js"
      ],
      "env": {
        "UNIFI_URL": "https://192.168.16.254",
        "UNIFI_SITE": "default",
        "UNIFI_PASSWORD": "your_password_here",
        "UNIFI_USERNAME": "admin"
      }
    }
  }
}

You can manage UniFi Network through a dedicated MCP server that exposes a rich set of tools for site, device, client, WLAN, switch, security, analytics, alerts, and guest access. This MCP server lets you monitor, control, and automate common UniFi workflows from MCP clients in a safe, centralized way.

How to use

Connect to the MCP server from an MCP client to perform common UniFi tasks. You can view and manage devices, monitor site health, configure wireless networks, inspect traffic, and perform maintenance actions such as creating backups or restarting devices. Most actions are read-only by default, with a subset of urgent controls available (for example blocking clients, restarting devices, or updating WLAN passwords) to minimize risk.

How to install

Prerequisites you need before installation:

  • Node.js 20.x or higher

  • UniFi Network Controller (Cloud Gateway, Dream Machine, or self-hosted)

  • UniFi admin credentials

How to install

# Install dependencies
npm install

# Build the server
npm run build

# The compiled server outputs to dist/

Configuration and run

Configure the MCP server using environment variables. A minimal example is shown below. Create a file named .env or set these variables in your environment before starting the server.

UNIFI_URL=https://192.168.16.254
UNIFI_USERNAME=admin
UNIFI_PASSWORD=your_password_here
UNIFI_SITE=default

With Claude Desktop

Add the MCP server to your Claude Desktop configuration. Provide the stdio command and environment settings so Claude can start and connect to the MCP server.

{
  "mcpServers": {
    "unifi": {
      "type": "stdio",
      "command": "node",
      "args": ["dist/index.js"],
      "env": {
        "UNIFI_URL": "https://192.168.16.254",
        "UNIFI_USERNAME": "admin",
        "UNIFI_PASSWORD": "your_password_here",
        "UNIFI_SITE": "default"
      }
    }
  }
}

Standalone testing

Run the server directly for testing or development to verify behavior.

npm start

Or enable development mode with auto-reload:

## Tool reference (highlights)

The server exposes a comprehensive set of tools for different areas of UniFi management. Use these to query state, perform actions, and fetch analytics.

## Security and maintenance notes

- Never commit credentials in environment files. Use secure storage for UNIFI\_PASSWORD and consider using read-only admin accounts when available.

- Use HTTPS for controller connections when possible and enable two-factor authentication on your UniFi account.

## Troubleshooting

If you encounter authentication errors, verify the UNIFI\_URL, UNIFI\_USERNAME, and UNIFI\_PASSWORD, and ensure the user has admin privileges. The server disables SSL certificate verification by default, but you can adjust httpsAgent if needed.

## Additional notes

This MCP server is designed to provide read-only access for most configuration settings. You can enable/disable WLANs, change WLAN passwords, block/unblock clients, restart devices, and create backups, but you cannot create new networks or VLANs, modify firewall rules, or alter device settings through the MCP interface. For advanced changes, use the UniFi Network Controller web interface.

## Examples of common workflows

- List all devices to identify an AP needing attention and restart it if required.

- Retrieve site health metrics to determine if WAN or subsystem issues are present.

## Available tools

### unifi\_get\_site\_health

Get overall site health and subsystem status scores.

### unifi\_get\_traffic\_stats

Get network traffic statistics across hourly, daily, or monthly timeframes.

### unifi\_create\_backup

Initiate a controller configuration backup.

### unifi\_list\_devices

List all UniFi devices with status and basic information.

### unifi\_get\_device

Get detailed information about a specific device by MAC.

### unifi\_restart\_device

Restart a UniFi device remotely.

### unifi\_locate\_device

Enable LED blink for physical device identification.

### unifi\_list\_clients

List all connected network clients.

### unifi\_get\_client

Get detailed information about a specific client by MAC.

### unifi\_block\_client

Block a client from network access by MAC.

### unifi\_unblock\_client

Unblock a previously blocked client.

### unifi\_reconnect\_client

Force a client to reconnect (kick and allow rejoin).

### unifi\_list\_networks

List all configured networks and VLANs.

### unifi\_list\_wlans

List all wireless networks (SSIDs).

### unifi\_enable\_wlan

Enable a wireless network by WLAN ID.

### unifi\_disable\_wlan

Disable a wireless network by WLAN ID.

### unifi\_set\_wlan\_password

Change the password for a wireless network.

### unifi\_list\_port\_profiles

List all configured switch port profiles.

### unifi\_get\_switch\_ports

Get port configuration and status for a specific switch.

### unifi\_list\_firewall\_rules

List all configured firewall rules.

### unifi\_get\_dpi\_stats

Get Deep Packet Inspection statistics and application usage.

### unifi\_list\_alerts

List recent system alerts.

### unifi\_list\_events

List recent network events.

### unifi\_list\_vouchers

List all guest access vouchers.

### unifi\_create\_voucher

Create new guest access vouchers.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational