Symptoms: Connection timeout, refused, or "cannot reach host" errors.
Check:
- Verify the controller is reachable:
curl -k https://<UNIFI_HOST>:<UNIFI_PORT> - Confirm
UNIFI_ACCESS_HOSTandUNIFI_ACCESS_PORTare correct - If using Docker, ensure the container can reach the controller (use
--network hostor the correct Docker network) - Check firewall rules between the MCP server and the controller
Symptoms: 401 Unauthorized on port 443, "invalid credentials" errors.
Check:
- Verify
UNIFI_ACCESS_USERNAMEandUNIFI_ACCESS_PASSWORDare correct - Ensure the account is a local admin (not a Ubiquiti SSO account)
- Try logging into the UniFi OS Console web UI with the same credentials
- Confirm the Access application is installed and running on the controller
Symptoms: 401 on port 12445, py-unifi-access connection errors.
Check:
- Verify
UNIFI_ACCESS_API_KEYis correct and has not been revoked - Confirm port 12445 is reachable from the MCP server:
curl -k https://<HOST>:12445 - Check that the Access application exposes port 12445 (some network configurations or Docker setups may block non-standard ports)
- The API key is generated from the UniFi OS Console under Settings > API Keys
Symptoms: Some tools work but others return "proxy session required" errors.
Explanation: Most mutating tools (lock/unlock, credential management, policies, visitors) require the local proxy session (port 443 with username/password). If only the API key is configured, these tools will be unavailable.
Fix: Ensure both UNIFI_ACCESS_USERNAME/UNIFI_ACCESS_PASSWORD and UNIFI_ACCESS_API_KEY are set for full functionality.
Symptoms: Connection succeeds but the server reports Access is not available.
Check:
- Log into the UniFi OS Console and verify the Access application is installed
- Ensure the Access application is running (not stopped or updating)
- Check that your admin account has access to the Access application
Symptoms: SSL: CERTIFICATE_VERIFY_FAILED or similar errors.
Fix: Set UNIFI_ACCESS_VERIFY_SSL=false (most UniFi controllers use self-signed certificates).
export UNIFI_ACCESS_VERIFY_SSL=falseThis is the default, so this error typically only occurs if you explicitly set it to true.
Cause: The tool's permission is disabled. All Access mutation tools are disabled by default.
Fix:
- Check permissions.md for the relevant category
- Enable via environment variable:
export UNIFI_PERMISSIONS_<CATEGORY>_<ACTION>=true
- Restart the server
Example: If access_unlock_door is missing:
export UNIFI_PERMISSIONS_DOORS_UPDATE=trueCause: In lazy/meta_only mode, access_tool_index shows all tools (from the static manifest), but disabled tools return permission errors when called.
Fix: Same as above -- enable the permission and restart.
Check:
- Verify the server started successfully (check stderr logs)
- Confirm your MCP client is connected
- Try
UNIFI_TOOL_REGISTRATION_MODE=eagerto load all tools immediately - Check if
UNIFI_ENABLED_CATEGORIESorUNIFI_ENABLED_TOOLSis set and limiting the tools
Symptoms: access_recent_events returns empty results; access://events/stream resource is empty.
Check:
- Verify
ACCESS_WEBSOCKET_ENABLED=true(default) - Check server logs for websocket connection errors
- Ensure
UNIFI_ACCESS_API_KEYis configured (websocket events may require API key auth) - Verify Access devices are generating events (try unlocking a door manually)
- Use
access_list_eventsto verify events exist on the controller (REST API works independently)
Cause: Buffer overflow or TTL expiration.
Fix:
- Increase
ACCESS_EVENT_BUFFER_SIZE(default 100) for high-traffic environments - Increase
ACCESS_EVENT_BUFFER_TTL(default 300 seconds) if you poll less frequently - Poll more frequently (every 2-5 seconds) to process events before they expire
Check:
- Ensure
-iflag is set (stdin must be open for stdio transport) - Check logs:
docker logs <container> - Verify all required env vars are set (
UNIFI_ACCESS_HOSTplus credentials)
Fix options:
- Use
--network hostto share the host network stack - Or ensure the Docker network can route to the controller IP
- Verify the controller IP is not a localhost address (use the actual network IP)
- For API key auth, ensure port 12445 is accessible from the container (not just port 443)
docker run -i --rm \
-e UNIFI_ACCESS_HOST=192.168.1.1 \
-e UNIFI_ACCESS_USERNAME=admin \
-e UNIFI_ACCESS_PASSWORD=your-password \
-e UNIFI_ACCESS_API_KEY=your-api-key \
-e UNIFI_PERMISSIONS_DOORS_UPDATE=true \
ghcr.io/sirkirby/unifi-access-mcp:latestOr use an env file:
docker run -i --rm --env-file .env ghcr.io/sirkirby/unifi-access-mcp:latestEnable verbose logging to diagnose issues:
export UNIFI_MCP_LOG_LEVEL=DEBUG
export UNIFI_MCP_DIAGNOSTICS=trueThis outputs detailed information about:
- Access connection and dual-path authentication
- WebSocket connection state
- Permission decisions
- Tool registration
- API requests and responses (redacted)
- Tool call timing
All logs go to stderr (stdout is reserved for MCP JSON-RPC in stdio mode).