Skip to main content
Glama
nntkio

UniFi MCP Server

by nntkio

unblock_client

Unblock a previously blocked client device on a UniFi network by providing its MAC address to restore network access.

Instructions

Unblock a previously blocked client

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
macYesMAC address of the client to unblock

Implementation Reference

  • MCP tool handler for 'unblock_client': extracts MAC from arguments, calls UniFiClient.unblock_client(mac), and returns success message.
    case "unblock_client": mac = arguments.get("mac", "") await client.unblock_client(mac) return [ TextContent( type="text", text=f"Client {mac} has been unblocked.", ) ]
  • Input schema definition for the unblock_client tool, specifying required 'mac' parameter.
    Tool( name="unblock_client", description="Unblock a previously blocked client", inputSchema={ "type": "object", "properties": { "mac": { "type": "string", "description": "MAC address of the client to unblock", } }, "required": ["mac"], }, ),
  • Low-level UniFiClient method implementing unblock_client by sending 'unblock-sta' API command to the controller.
    async def unblock_client(self, mac: str) -> bool: """Unblock a client from the network. Args: mac: Client MAC address. Returns: True if unblock command was sent successfully. """ await self._request( "POST", "/api/s/{site}/cmd/stamgr", json={"cmd": "unblock-sta", "mac": mac.lower()}, ) return True
  • Registers the central tool dispatcher @server.call_tool() which matches on tool name 'unblock_client' to invoke the handler.
    @server.call_tool() async def call_tool(name: str, arguments: dict[str, Any]) -> list[TextContent]:
  • Alternative schema definition in clients.py module (potentially unused).
    Tool( name="unblock_client", description="Unblock a previously blocked client", inputSchema={ "type": "object", "properties": { "mac": { "type": "string", "description": "MAC address of the client to unblock", } }, "required": ["mac"], }, ),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nntkio/unifiMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server