Skip to main content
Glama

unifi-local-mcp

A self-hosted Model Context Protocol server that gives MCP clients such as Claude Code and Codex controlled access to the official local APIs of UniFi applications (Network, Protect, Access). AI clients connect to this server, never to UniFi. UniFi credentials never leave the server.

Status: Phase 1 (secure platform core), Phase 2 (UniFi Network) and Phase 3 (UniFi Protect) are complete; Phase 4 (UniFi Access) is in progress. The service serves MCP over Streamable HTTP and, through the stdio bridge, over stdio, is administered with the host-only unifi-mcp CLI, and implements all 73 documented UniFi Network operations (docs/applications-network.md), 73 of the 74 UniFi Protect 7.3.74 operations, including its event subscriptions (docs/applications-protect.md, docs/events.md), and 97 of the 107 UniFi Access operations (docs/applications-access.md). All are tested against synthetic consoles; Network and Protect reads were also checked on a real console (Network 11.0.99, Protect 7.3.74). Access has not run on a real console. See docs/phase-checklist.md, docs/installation.md and docs/administration.md.

Design principles

  • Secure by default: read-only, least privilege, deny by default. An immutable UNIFI_MCP_FORCE_READ_ONLY deployment lock is available.

  • Official local APIs only: no cloud or Site Manager access, no undocumented endpoints, no raw HTTP proxy tools.

  • Independent human approval for high-impact changes, via the admin UI or local CLI. An AI can never approve.

  • Per-client identity: one revocable token per MCP client, with permission-filtered tool lists.

  • Streamable HTTP and an authenticated stdio bridge; MCP 2026-07-28 and 2025-era clients.

Related MCP server: UniFi MCP

Repository map

Path

Contents

unifi-mcp-design-spec.md

The design specification (source of truth)

docs/

Manual, ADRs, threat model, API coverage

api-specs/

Vendor contract provenance and operation inventories

packages/

Workspace packages (the module adapters are still skeletons)

deploy/

Deployment examples: single-host Compose file, bootstrap file

scripts/

API contract tooling (fetch, reconcile, coverage report)

tests/

Contract, unit and security tests (later integration and compatibility)

Development

Requires Node.js 26.13.0+ (26.x LTS) and npm 11.

npm ci
npm run check              # format check, lint, typecheck, tests
npm run api:fetch-specs    # download and verify vendor API artefacts (internet needed)
npm run api:reconcile      # check the inventories against the vendor contracts
npm run unifi-mcp -- --help  # the host administration CLI from a source checkout

Never run npx unifi-mcp: that name on the public npm registry belongs to an unrelated package, which npx would download and run.

Licence

Apache License 2.0. See LICENSE and NOTICE. UniFi is a trademark of Ubiquiti Inc.; this project is independent and not affiliated with Ubiquiti.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables managing UniFi networks through natural language, allowing users to monitor clients, check network health, and perform device actions like blocking or restarting access points. It securely connects UniFi Controllers to MCP clients with features like Google OAuth authentication.
      50 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage UniFi Network, Protect, and Access infrastructure through MCP tools, with support for local controllers and cloud relay.
      MIT
    • A
      license
      D
      quality
      C
      maintenance
      Enables read-only, bounded access to UniFi Network appliance health, devices, and active clients through three safe MCP tools with TLS verification and redirect rejection.
      3
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables local UniFi Network inspection and management through MCP, providing typed read-only inventory of sites, devices, clients, and networks, with preview-first, explicitly confirmed device rename and LED locate operations.
      8
      MIT