UniFi MCP through LiteLLM
Active: the Flux Kustomization is unsuspended. Network and Protect are
independent controllers and ClusterIP services in dev; Access is omitted.
Upstream release images 0.40.0 and 0.9.5 are version-pinned and publish both
linux/arm64 and linux/amd64 manifests.
Traffic: existing authenticated LiteLLM /mcp → private ClusterIP /mcp → local
UniFi controller. No HTTPRoute, NodePort, cloud relay or additional DNS is needed.
The backend HTTP transport has no caller authentication. NetworkPolicy allows
only LiteLLM pods in dev to reach either backend. Host validation remains on.
Global create/update/delete policy gates are false, sensitive fields are redacted, and the dedicated controller accounts must also be read-only. Confirmation mode alone is not a human approval boundary. Lazy registration retains upstream meta-tool discovery without advertising hundreds of tools initially.
Activation #
- Verify
unifi.ironstone.casa:443reaches both Network and Protect APIs fromdev, using a trusted certificate. This hostname comes from existing Unpoller configuration; confirm Protect is on the same console before rollout. Change Protect’s host if it lives elsewhere. Do not disable TLS verification. - Create dedicated local UniFi service accounts with read-only access to the relevant application. Network’s full toolset uses local session credentials; do not reuse the Unpoller API key or an SSO/MFA account.
- Store
usernameandpasswordfields in 1Password itemsunifi-network-mcpandunifi-protect-mcpin the existing home-ops vault. External Secrets reads those fields; no credential belongs in Git or chat. - Confirm the versioned GHCR manifests contain linux/arm64, then set
kubernetes/apps/dev/unifi-mcp/ks.yamlspec.suspend: falsethrough GitOps. Check ExternalSecrets and both deployments are ready in contextironstone. Keep LiteLLM startup independent so a UniFi outage cannot hold up other MCPs. - Reconcile the Codex and Claude policies through LiteLLM’s supported
key-management API or administration UI using credentials from 1Password.
Preserve existing MCP grants, user identities and the
__mcp_only__model restriction. Application keys remain without MCP grants. Config aliases are registered by this change; they are unavailable until the staged backends start. - Complete the live verification below before treating the integration as ready.
Existing clients keep
https://litellm.ironstone.casa/mcpand their own keys.
Verification #
Run repository YAML/render/schema checks and the applicable security checks. Static checks do not establish live access. After activation verify:
- Codex and Claude keys discover both aliases, list Network devices and Protect cameras, and perform one harmless read through each server.
- Anonymous gateway calls fail; Mealie, Frigate and Paperless keys cannot discover or invoke either UniFi server. Their model inference continues to work.
- Mutating tools are absent or rejected, including through lazy execute/batch dispatch. Inspect registered policy before testing; do not use a real device reboot or deletion as a denial probe.
- LiteLLM pods can connect to backend ports 3000/3001; an unrelated pod in
devand one in another namespace cannot. Validate the rendered pod selectors match the NetworkPolicy, and reject unexpected Host headers. - Restart both deployments and confirm reconnection without credential output.
Local validation may lack task/mise/yayamlls/Helm. CI must complete rendered schema and security checks before merge. Image pull, controller login, live network policy enforcement and gateway grants are rollout checks.
Rollback: remove only unifi_network and unifi_protect grants using the key
policy reconciler, remove those two LiteLLM aliases, and suspend the UniFi Flux
Kustomization. Suspension stops reconciliation but does not stop running pods;
scale both UniFi controllers to zero through a reviewed Git change to shut down.
Preserve all other gateway services, keys and database state.
Chart versions and upstream documentation: Helm chart reference.