Skip to main content
Glama
vandreus

UniFi MCP Server

by vandreus

get_door

Retrieve access door information from UniFi network infrastructure to monitor and manage entry points through the Cloud API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'get_door' tool that retrieves specific door details from the UniFi API and returns formatted JSON response.
    handler: async ({ hostId, doorId }) => { const door = await unifi.getDoor(hostId, doorId); return { content: [{ type: 'text', text: JSON.stringify(door, null, 2) }] }; }
  • Zod schema defining input parameters for the 'get_door' tool: hostId and doorId.
    schema: z.object({ hostId: z.string().describe('The host ID'), doorId: z.string().describe('The door ID') }),
  • src/server.js:32-32 (registration)
    Registers the accessTools module, which includes the 'get_door' tool, with the MCP server using registerToolsFromModule.
    registerToolsFromModule(accessTools);
  • Helper function getDoor that makes the API call to retrieve door details from UniFi Cloud API, called by the tool handler.
    export async function getDoor(hostId, doorId) { const response = await cloudApi.get(`/v1/hosts/${hostId}/doors/${doorId}`); return response.data; }

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/vandreus/Unifi-MCP'

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