Skip to main content

Unifi Network MCP Server

Project description

UniFi Network MCP Server

UniFi Network MCP Server

MCP server exposing 91 UniFi Network Controller tools for LLMs, agents, and automation platforms. Query clients, devices, firewall rules, VLANs, VPNs, stats, and more — with safe-by-default permissions and preview-before-confirm for all mutations.

Install

# PyPI (recommended)
uvx unifi-network-mcp
# or: pip install unifi-network-mcp

# Docker
docker pull ghcr.io/sirkirby/unifi-network-mcp:latest

# From source
git clone https://github.com/sirkirby/unifi-mcp.git
cd unifi-mcp && uv sync

Configure

Set these environment variables (or create a .env file):

# Server-specific variables (recommended)
UNIFI_NETWORK_HOST=192.168.1.1      # Controller IP or hostname
UNIFI_NETWORK_USERNAME=admin         # Local admin username
UNIFI_NETWORK_PASSWORD=your-password # Admin password
# Optional:
# UNIFI_NETWORK_API_KEY=             # Official UniFi API key (dual auth)
# UNIFI_NETWORK_PORT=443             # Controller HTTPS port
# UNIFI_NETWORK_SITE=default         # UniFi site name
# UNIFI_NETWORK_VERIFY_SSL=false     # SSL certificate verification

Fallback: Existing UNIFI_* variables (e.g., UNIFI_HOST) continue to work. The server checks for UNIFI_NETWORK_* first and falls back to UNIFI_* if the server-specific variable is not set. For single-controller setups, the shared variables are all you need.

Run

# stdio transport (default — for Claude Desktop, LM Studio, etc.)
unifi-network-mcp

# Docker
docker run -i --rm \
  -e UNIFI_NETWORK_HOST=192.168.1.1 \
  -e UNIFI_NETWORK_USERNAME=admin \
  -e UNIFI_NETWORK_PASSWORD=secret \
  ghcr.io/sirkirby/unifi-network-mcp:latest

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "unifi": {
      "command": "uvx",
      "args": ["unifi-network-mcp"],
      "env": {
        "UNIFI_NETWORK_HOST": "192.168.1.1",
        "UNIFI_NETWORK_USERNAME": "admin",
        "UNIFI_NETWORK_PASSWORD": "your-password"
      }
    }
  }
}

Documentation

  • Configuration — Full env var reference, YAML config, controller type detection
  • Permissions — Permission system, category defaults, how to enable high-risk tools
  • Tool Catalog — All 91 tools organized by category
  • Transports — stdio, Streamable HTTP, and SSE setup
  • Troubleshooting — Connection issues, SSL, missing tools

Development

cd apps/network
make test         # Run tests
make lint         # Lint
make format       # Format
make manifest     # Regenerate tools_manifest.json
make pre-commit   # All of the above

See the root CONTRIBUTING.md for the full monorepo workflow.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unifi_network_mcp-0.7.1.tar.gz (103.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unifi_network_mcp-0.7.1-py3-none-any.whl (137.6 kB view details)

Uploaded Python 3

File details

Details for the file unifi_network_mcp-0.7.1.tar.gz.

File metadata

  • Download URL: unifi_network_mcp-0.7.1.tar.gz
  • Upload date:
  • Size: 103.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for unifi_network_mcp-0.7.1.tar.gz
Algorithm Hash digest
SHA256 fefa5eedfa74e491732b70ca8c481d746a536714ebe682e40fdaa30f816c218d
MD5 b6522eb9b80f84dcdc564f26f6a64898
BLAKE2b-256 a84f6719b2ab01b91b7076f95f53fc41f0f9667dba609ac8fb81a2d1aa9c4d9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for unifi_network_mcp-0.7.1.tar.gz:

Publisher: publish-network.yml on sirkirby/unifi-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file unifi_network_mcp-0.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for unifi_network_mcp-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f71f7d7a490251051e591a2454665d79c346141adab97066f2594ff555813fc6
MD5 110be01caa1ed32e2a23e3c4e37560f8
BLAKE2b-256 8254b46030ccc6c18b5a70fbc2ce63fc5fffc8dddb8b257296b87cb272f27a2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for unifi_network_mcp-0.7.1-py3-none-any.whl:

Publisher: publish-network.yml on sirkirby/unifi-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page