Skip to main content
Glama
nntkio

UniFi MCP Server

by nntkio

unblock_client

Remove network access restrictions for a specific device by its MAC address to restore connectivity on UniFi networks.

Instructions

Unblock a previously blocked client

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
macYesMAC address of the client to unblock

Implementation Reference

  • Defines the input schema for the unblock_client MCP tool, specifying a required 'mac' string 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"], }, ),
  • The handler logic within the call_tool function that executes the unblock_client tool by calling the UniFiClient's unblock_client method and returning a 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.", ) ]
  • Low-level helper method in UniFiClient that sends the UniFi API request to unblock the client using the 'unblock-sta' command.
    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

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