Skip to main content
Glama
vandreus

UniFi MCP Server

by vandreus

list_sites

Retrieve a list of managed sites from UniFi network infrastructure to view and organize network deployments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool handler for list_sites: fetches sites using unifi.listSites() and returns JSON stringified response in MCP format.
    handler: async () => { const sites = await unifi.listSites(); return { content: [{ type: 'text', text: JSON.stringify(sites, null, 2) }] }; }
  • Zod schema for list_sites tool inputs: accepts no parameters (empty object).
    schema: z.object({}),
  • src/server.js:28-28 (registration)
    Registers the networkTools module (including list_sites) with the MCP server via registerToolsFromModule function.
    registerToolsFromModule(networkTools);
  • Core helper function that performs the UniFi Cloud API GET request to /v1/sites to retrieve all sites.
    export async function listSites() { const response = await cloudApi.get('/v1/sites'); 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