
UniFi Access MCP
io.github.sirkirbyPublished by GitHub account sirkirbyv0.1.6Updated Oct 24, 2026
Manage UniFi Access doors, credentials, policies, visitors, and events via MCP.
Overview
MCP server for UniFi Access controllers: lets an assistant inspect doors, credentials, policies, visitors, events and devices, and perform confirmed door and…
- What you can do
- List and inspect doors, door groups and real-time door status, and lock or unlock doors
- List, inspect and update access policies and schedules
- List, inspect, create and revoke credentials such as NFC cards, PINs and mobile credentials
- List, inspect, create and delete time-bounded visitor passes
- Query historical access events, a real-time websocket buffer and activity summaries
- List and inspect devices and reboot access hubs, readers, relays and intercoms; read controller info and health
- When to use it
- Useful when an assistant should answer questions about who badged in, failed attempts, expiring credentials or after-hours door policies, or should issue visitor passes and control doors on a UniFi Access deployment. Reads are the default; mutations go through a preview-then-confirm flow.
- Requirements
- Runs locally over stdio, installed from PyPI (uvx or pip) or Docker. Needs a reachable UniFi Access controller: UNIFI_HOST (or UNIFI_ACCESS_HOST), UNIFI_USERNAME and UNIFI_PASSWORD, optionally UNIFI_API_KEY, UNIFI_PORT and UNIFI_VERIFY_SSL. At least one auth path must be configured; most mutations require the local proxy session. Without a host it starts in setup mode with only a status tool.
Installation
In SourceWeft
- Open UniFi Access MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
UniFi Access MCP Server
MCP server exposing UniFi Access tools for AI assistants and other MCP-capable clients. Manage doors, credentials, access policies, visitors, events, and devices with safe-by-default permissions and preview-before-confirm for all mutations.
Software integrating over HTTP, including automation services and MCP adapters,
should use unifi-api-server for REST and GraphQL reads, actions,
and SSE events.
Install
Claude Code (recommended)
The plugin installs the MCP server, an agent skill for tool discovery, and a guided setup command:
Then run the interactive setup to configure your controller connection:
This walks you through connecting to your Access controller, explains the dual-auth system (API key for reads, username/password for mutations), and configures permissions. Credentials are given as a file or command provider, never typed into chat. Setup saves the result as the plugin's Claude Code options, which apply in every project; a password or API key entered as an option is stored in the system keychain. Start a new Claude Code session after setup to connect.
Upgrading from a plugin version before 1.0.0, which kept settings in the project's .claude/settings.local.json? Follow the plugin upgrade guide.
Codex
Register the marketplace, then install unifi-access from Codex's /plugins UI:
After installing, ask Codex to use the UniFi Access setup skill. Setup saves a version-pinned MCP server entry with your controller settings in Codex's config.toml and prompts you to restart Codex. After each plugin upgrade, re-run setup with --refresh.
PyPI / Docker
Usage Examples
Once connected, just ask your AI agent in natural language:
"Who badged into the office today? Show me a timeline of all door access events"
"List all access credentials that expire in the next 30 days"
"Show me failed badge attempts at the server room this week — any patterns?"
"Which doors had the most access events today?"
"Create a visitor pass for John Smith with access to the main entrance from 9 AM to 5 PM tomorrow"
"Audit door policies — which doors allow access outside business hours?"
All queries are read-only by default. Mutations (visitor passes, credential changes, door controls) use a preview-then-confirm flow.
Configure
Set these variables in the server's process environment. The plugin setup skill already does this for Codex and OpenClaw; in Claude Code the plugin maps its options onto these variables. The server does not automatically load .env or working-directory YAML files; load a trusted env file explicitly in your launcher (Docker env_file: is supported), or select custom YAML with an absolute CONFIG_PATH. See configuration for migration examples.
With no controller host configured, the server still starts in setup mode: it tells the client how to configure it, offers only the read-only access_setup_status tool, and makes no controller connections.
Fallback: The shared UNIFI_* variables (e.g., UNIFI_HOST) also work. The server checks for UNIFI_ACCESS_* 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.
MCP response size
For tool results that already provide structured output, adaptive is the default response mode. It classifies each request by the canonical date-based protocolVersion advertised during MCP initialization, not by the client's product name or application version. Requests advertising MCP 2025-06-18 or later receive concise content plus the full result once in structuredContent; requests advertising an earlier revision (such as 2024-11-05 or 2025-03-26), or whose revision metadata is missing or malformed, keep full compatibility JSON in content. Set UNIFI_ACCESS_MCP_CONTENT_MODE to compat to force the duplicated compatibility form, or to compact to force concise text plus full structured output outside a negotiated request. This server-specific variable overrides UNIFI_MCP_CONTENT_MODE; use compat for any client that consumes the full result only from content, regardless of its advertised revision.
The lazy-loading meta-tools (*_tool_index, *_execute, *_batch, *_batch_status, and lazy-only *_load_tools) remain content-only; they are not the pre-2025-06-18 protocol category described above. For structured inner results, *_execute and *_batch_status expose one normalized JSON payload in content rather than a nested transport pair; content-only execute results remain unchanged. Response modes do not convert these meta-tools to structuredContent.
When Network is enabled alongside Access, its largest source responses are independently bounded: unifi_get_dashboard defaults to summary=true, and unifi_list_rogue_aps defaults to a summarized page of at most 100 records; summary=false restores the full selected data.
Dual Authentication
The Access server supports two independent auth paths:
- API key -- Uses
py-unifi-accesson the dedicated Access API port (default 12445). Best for read-only queries and device listing. - Local proxy session -- Logs in via
/api/auth/loginon the UniFi OS Console (port 443) and proxies requests through/proxy/access/api/v2/.... Required for door lock/unlock, credential management, policies, visitors, and events.
At least one path must be configured. When both are available, each tool selects the most appropriate path. Most mutating tools require the local proxy session.
Secret redaction
Access tools redact credential secrets by default before returning data to MCP clients — credential token and pin_code values surface as ***REDACTED*** in reads, lists, and create previews. Disable redaction for a trusted local administration process with UNIFI_ACCESS_REDACT_SENSITIVE_FIELDS=false or the global UNIFI_REDACT_SENSITIVE_FIELDS=false policy flag when raw values are required. To preserve an existing secret on an update, omit the field rather than passing the ***REDACTED*** marker back (which is rejected).
Run
Claude Desktop
Add to claude_desktop_config.json:
Features
- Doors -- list, inspect, lock/unlock, door groups, real-time status
- Policies -- list, inspect, update access policies and schedules
- Credentials -- list, inspect, create, revoke NFC cards, PINs, mobile credentials
- Visitors -- list, inspect, create, delete visitor passes with time-bounded access
- Events -- query historical events, real-time websocket buffer, activity summaries
- Devices -- list, inspect, reboot access hubs, readers, relays, intercoms
- System -- controller info, health metrics, user listing
Agent Skills
The Claude Code plugin ships with agent skills that teach AI assistants how to work with Access effectively:
- UniFi Access — core skill for door control, credentials, visitors, access policies, and event monitoring. Includes guidance on the dual-auth system, real-time event streaming via WebSocket buffer, and the preview-confirm flow for physical door operations.
- Setup — interactive configuration wizard that walks through controller connection, credential setup, and permission configuration.
Skills are automatically available when the plugin is installed.
Cross-Product Skills
When the Access plugin is installed alongside the Protect plugin, the security-digest skill can incorporate door events into its analysis. Badge-ins, access-denied events, and after-hours access are correlated with camera motion and alerts from Protect to produce a richer security summary across your full UniFi deployment.
No additional configuration is required — if both plugins are active, the skill automatically pulls from both servers.
Documentation
- Configuration -- Full env var reference, YAML config, Access-specific options
- Permissions -- Permission system, category defaults, how to enable mutations
- Tool Catalog -- All 37 tools organized by category
- Event Streaming -- Real-time event architecture, WebSocket buffer, polling
- Troubleshooting and support bundles -- Reviewed support evidence, dual auth debugging, missing tools
Development
See the root CONTRIBUTING.md for the full monorepo workflow.
License
Source: apps/access/README.md at commit f525cbd
Tools
0Version history
1- v0.1.6LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts