Prerequisites
- Cursor installed and up to date
- A UniFi API key (from Settings → Control Plane → Integrations in the UniFi Site Manager)
- One of the following: the
unifi-mcp-serverPyPI package installed,uvinstalled, or Docker
Setup
1
Open Cursor MCP settings
In Cursor, open the command palette with
Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux) and run View: Open MCP Settings. Cursor opens mcp.json in the editor.If the file does not exist yet, Cursor creates it for you.2
Add the server configuration
Add the Replace
mcpServers block to mcp.json. Choose the tab that matches your installation method.- PyPI package
- uvx
- Docker
Install the package first, then add this config:
your-api-key-here with your actual UniFi API key and 192.168.2.1 with your gateway’s IP address. The "disabled": false field tells Cursor the server is active.3
Save and restart Cursor
Save
mcp.json. Then fully quit and reopen Cursor so it picks up the new configuration.Cursor reads MCP settings at startup. Changes to
mcp.json require a full restart to take effect.4
Test in the Chat sidebar
Open the Chat sidebar (
Cmd+L on macOS, Ctrl+L on Windows/Linux) and try one of these prompts:- “List my UniFi devices”
- “Show connected clients on site default”
- “What firewall rules are active on my network?”
- “Show me the current bandwidth usage by application”
MCP tools are only available in the Chat sidebar (Agent mode), not in inline code completions or the Composer panel. Make sure you are in Chat when invoking UniFi tools.