/unifi-mcp-server:unifi-cloud-fleet-toolsfrom unifi-mcp-server
Provides context for adding, changing, or testing UniFi cloud and multi-controller MCP tools including Site Manager, connector proxy, integration API, Mobility, InnerSpace, Carrier Fabric, and the fleet stack (router, registry, pool, workers, admin tools). Covers API modes, gating, per-call routing, tokens, roles, test fixtures, and known gaps.
Ships in unifi-mcp-server. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Cloud tools call https://api.ui.com (Site Manager and the connector proxy). Fleet code lets one server serve many controllers. Read this before you change either. For the general add-a-tool workflow, see unifi-mcp-tool-builder.
| Module | Tools | Examples |
|---|---|---|
src/tools/site_manager.py | 16 | list_all_sites_aggregated, get_isp_metrics, list_hosts |
src/tools/connector.py | 10 | connector_network_get, connector_protect_post |
src/tools/integration_api.py | 14 | list_integration_sites, list_integration_wans |
src/tools/sites.py | 3 | list_sites, get_site_details, get_site_statistics |
src/tools/mobility.py | 8 | list_mobility_workspaces, update_mobility_device |
src/tools/innerspace.py | 6 | list_innerspace_floor_plans (reads only) |
src/tools/carrier.py | 11 | create_carrier_subscriber, suspend_carrier_subscriber |
Fleet tools are built inside functions, not defined at module level, so the "every public async function is a tool" rule does not apply to them:
| Source | Tools | Registered when |
|---|---|---|
register_fleet_tools() in src/fleet/tools.py | list_controllers, select_controller, get_active_controller | always |
register_admin_tools() in src/fleet/admin_tools.py | 11, such as register_controller, create_api_token, verify_audit_chain | DATABASE_URL is set, and not read-only |
register_fleet_read_tools() in src/fleet/fleet_tools.py | fleet_health, fleet_sites, fleet_inventory, fleet_compare_versions, fleet_compare_sites, fleet_fanout | DATABASE_URL is set |
APIType (src/config/config.py) is local, cloud-v1 or cloud-ea. The code default is cloud-ea._CLOUD_TOOL_MODULES (src/main.py): sites, site_manager, connector, integration_api, carrier, innerspace and mobility. Local mode registers these too. In cloud mode get_site_statistics is left out, because its endpoints return 404 on the cloud API. That gives 71 tools, including the 4 fleet tools.UNIFI_SITE_MANAGER_ENABLED=true:
site_manager tools use the require_site_manager decorator;mobility, innerspace and carrier call their own _require_cloud_api(), which checks site_manager_enabled;SiteManagerClient (src/api/site_manager_client.py) uses the base URL https://api.ui.com/v1/ and the X-API-KEY header.SiteManagerClient SD-WAN reads use GET /v1/sd-wan-configs, GET /v1/sd-wan-configs/{id}, GET /v1/sd-wan-configs/{id}/status (official Site Manager v1.0.0 OpenAPI, retrieved 2026-11-08). The /v1/ prefix is in the base URL; never add it to the relative endpoint. The list has no pagination and returns {id,name,type} summaries; detail and status have distinct nested data. Known nested arrays/objects and enumerated generateStatus (OK, GENERATING, GENERATE_FAILED) and site applyStatus (ok, creating, updating, removing, createFailed, updateFailed, removeFailed) are validated; unknown extensions are preserved. 404 must not become an empty list, and apply status is not tunnel health. The three read tools are in full and system profiles across modes; they need UNIFI_SITE_MANAGER_ENABLED=true. These models do not offer typed destination/performance policy parity.GET /v1/sites; internet health reads documented GET /v1/isp-metrics/5m?duration=24h. The former infers status from offline counts and internet issues, while missing statistics stays unknown because its shape varies by Network version. The latter reports the latest ISP interval, not a speed test; zero upload/download fields are unavailable. Do not restore the unsupported /sites/health or /internet/health requests. All-site internet reads return a list, and cross-site rankings skip missing WAN uptime.connector/consoles/{console_id}/proxy/{network|protect}/{path}._validate_connector_params (src/tools/connector.py) checks both inputs before a client is built, and every connector tool uses the normalized values it returns. console_id goes through validate_path_segment (src/utils/validators.py): surrounding whitespace is stripped, then only [A-Za-z0-9._~:-] is allowed, up to 256 characters, and an all-dots value is refused. path goes through validate_proxy_path: leading slashes are stripped, every segment must match the same character set and must not be empty, . or .., a single trailing slash is allowed, and the whole path is capped at 2048 characters. ?, #, % and \ are refused, so query strings belong in params. This keeps a caller, including a viewer on the read-tier GET tools, inside the proxy prefix.settings.get_integration_path() gives /v1/... for cloud-v1 and /integration/v1/... for cloud-ea.UNIFI_PROFILE has mobility, innerspace and carrier sets.Routing happens in the registry wrapper (_make_tool_wrapper() in src/tool_registry.py), not in tool bodies.
controller argument.FleetRouter.resolve() (src/fleet/router.py) picks the controller in this order:
controller argument;select_controller (state key SESSION_KEY);ValidationError. Never weaken this.Settings from ControllerProfile.apply_to() (src/fleet/registry.py). Only connection fields can differ; safety switches such as read-only stay process-wide.select_controller is refused in stateless HTTP mode (MCP_STATELESS_HTTP).Registry. Without DATABASE_URL, EnvRegistry holds one controller named default. With it, PostgresRegistry (src/fleet/postgres_registry.py) serves lookups from memory and refreshes:
UNIFI_FLEET_REGISTRY_REFRESH_SECONDS;Stored credentials are encrypted with UNIFI_FLEET_CREDENTIAL_KEY (src/fleet/credentials.py).
Pool. ClientPool (src/api/pool.py) keeps one HTTP client, one rate limiter and one circuit breaker per controller, up to UNIFI_FLEET_MAX_OPEN_CLIENTS.
Rate limit. UNIFI_RATE_LIMIT_REQUESTS per UNIFI_RATE_LIMIT_PERIOD (src/api/rate_limit.py).
UNIFI_FLEET_EXPECTED_REPLICAS.Read cache. ReadCache (src/cache.py) needs UNIFI_CACHE_ENABLED and an explicit Redis setting.
CACHED_MODULES, which hold no cloud module.fresh argument.Workers. python -m src.worker runs health and sync jobs (src/worker/jobs.py). Controllers are split between workers by rendezvous hashing and Redis leases (src/worker/shards.py).
Fan-out. fleet_fanout runs only read-tier tools that take a controller argument, and returns one {ok, data|error} entry per controller. Writes are never fanned out. The limits are UNIFI_FLEET_FANOUT_CONCURRENCY, UNIFI_FLEET_FANOUT_TIMEOUT_SECONDS and UNIFI_FLEET_FANOUT_DEADLINE_SECONDS.
Webhook event bus. When Redis is configured, verified webhook deliveries on POST /webhooks/unifi are published to unifi:webhooks:v1:events after local handlers run. Other replicas and workers can subscribe to react to events without each receiving the HTTP callback. Messages carry an origin instance id; listeners ignore their own messages. Redis outages are logged and do not block the HTTP response (src/fleet/bus.py, src/webhooks/receiver.py, WEBHOOK_SETUP.md).
Install. The fleet extra in pyproject.toml adds redis, SQLAlchemy, asyncpg and alembic.
Network transports refuse to start without auth (ensure_network_transport_authenticated() in src/main.py).
MCP_AUTH_TOKEN holds static bearer tokens.FleetTokenVerifier checks server-issued tokens (src/fleet/tokens.py). They start with umcp_, are stored only as SHA-256 hashes, and can be limited by role, module and controller label.Roles (ROLE_TIERS in src/access.py):
stdio callers and MCP_AUTH_TOKEN callers are fleet-admin, unless UNIFI_STDIO_ROLE lowers the stdio role.
Audit. Every mutating call writes a hash-chained attempt record and outcome record (src/utils/audit.py). The call is refused if the write fails while UNIFI_AUDIT_FAIL_CLOSED is on. Verify a log with python -m src.utils.audit_verify.
confirm: bool | str = False, dry_run: bool | str = False. Call validate_confirmation(confirm, "<operation>", dry_run) first, and return {"dry_run": True, "operation": ..., "payload": ...} before you open a client (see src/tools/mobility.py).DESTRUCTIVE_TOOLS (src/tool_registry.py) already holds all 8 mutating connector tools and suspend_carrier_subscriber. Carrier writes have the largest blast radius; keep them confirm-gated.DESTRUCTIVE_TOOLS or in RISKY_NAME_EXEMPTIONS (tests/unit/fleet/test_tiers.py). Regenerate the snapshot with UPDATE_TOOL_TIERS=1 pytest tests/unit/fleet/test_tiers.py.src/models/site_manager.py, src/models/mobility.py, src/models/innerspace.py, src/models/carrier.py, src/models/integration_api.py. They use populate_by_name=True, extra="allow" and camelCase aliases.{"count", "data"}. Integration API lists also return offset, limit and totalCount.site_manager tools return raw dicts or lists.patch("src.tools.carrier.SiteManagerClient", return_value=cm). Here cm is an AsyncMock context manager, and the settings MagicMock has site_manager_enabled=True. Representative: tests/unit/tools/test_carrier.py. Assert the endpoint string and the gate error.httpx.MockTransport (tests/unit/api/test_site_manager_client.py).fakeredis (tests/unit/fleet/test_read_cache.py).pgserver, with no Docker. The fixtures are in tests/unit/fleet/conftest.py.make verify-fleet-scale runs 3 replicas and 2 workers locally.API.md and .env.example. Add both when you add a setting.scripts/. Upstream hosts only the current version, so keep old snapshots when you need a diff.mcp-session-id.UNIFI_API_TYPE. A registered controller with a different API type still gets that tool set, so on a cloud-typed base a registered local gateway is routable while the local-only modules were never registered. Set UNIFI_MIXED_MODE=true to register the cloud and local modules together for a mixed fleet; UNIFI_PROFILE still narrows the union, and no base UNIFI_LOCAL_HOST is needed. See API.md, "Connecting to the cloud API and local gateways together".SiteManagerClient hardcodes its base URL. It ignores UNIFI_CLOUD_API_URL, and it does not use the pool or the rate limiter.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
unifi, cloud-tools, fleet, multi-controller, site-manager, mcp-tools
npx claudepluginhub enuno/unifi-mcp-server --plugin unifi-mcp-server16 skills in this plugin
/unifi-channel-planningBuild an AI-driven low-interference WiFi channel plan from UniFi MCP neighbor observations. Use when the task is RF optimization, channel conflict reduction, co-channel interference mitigation, or per-AP channel assignment.
/unifi-devicesUniFi device management: inventory, adoption, restarts, firmware upgrades, radio/channel configuration, port profiles, switching/stacks, network topology, and diagnostics. Use when the task involves physical UniFi hardware (APs, switches, gateways, cameras).
/unifi-discoveryFind what a UniFi MCP Server can do and pick the right backend before acting. Use when starting a session, when a tool is missing or returns nothing, when choosing between local, cloud and fleet mode, or when deciding which tools are safe to call.
/unifi-docs-syncUse when adding, changing or removing an MCP tool, changing the A2A agent card or the native MCP prompt catalog, or changing what a deployment exposes - covers the tool registry, the agent card, the prompt catalog, API.md, the skills and the checks that fail when they drift./unifi-fleet-operationsOperate a multi-controller UniFi deployment behind one MCP server. Use when there is more than one controller, when a task must run against a specific controller, when a controller is unreachable, or when a controller's credentials need to be managed.
/unifi-mcp-setupUse when setting up, installing or configuring the UniFi MCP Server itself, or as a broad fallback for a UniFi task when none of the narrower operator skills fit. One-file overview of install methods, environment variables, the API-mode feature matrix, UNIFI_PROFILE scoping and example prompts. Triggers when the user mentions UniFi, Ubiquiti, network clients, APs, switches, gateways, firewall policies, or traffic flows in a network management context.
Other plugins' skills for the same job