Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_TLS_MODENonone, https, or mtls.none
MCP_AUTH_MODENonone, bearer, or oauth. Unset resolves to bearer when MCP_BEARER_TOKEN is set, else none.unset
UNIFI_API_KEYNoSingle API key shorthand. Required if UNIFI_API_KEYS is not set.
UNIFI_API_KEYSNoJSON list of key configs for multi-console MSP setups.[]
MCP_TLS_KEYFILENoServer private key path. Required for https/mtls.
UNIFI_LOG_LEVELNoLogging verbosity. Accepts DEBUG, INFO, WARNING, ERROR, CRITICAL.INFO
MCP_BEARER_TOKENNoShared secret for bearer mode.
MCP_OAUTH_ISSUERNoOAuth issuer URL. Required for oauth.
MCP_TLS_CA_CERTSNoClient CA bundle for verifying client certs. Required for mtls.
MCP_TLS_CERTFILENoServer certificate path. Required for https/mtls.
FASTMCP_TRANSPORTNoSets the communication protocol between the MCP server and clients.streamable-http
MCP_TLS_CERT_REQSNoClient-cert verification level for mtls: none, optional, or required.
MCP_OAUTH_AUDIENCENoExpected token audience. Required for oauth.
MCP_OAUTH_BASE_URLNoPublic base URL of this resource server. Required for oauth.
MCP_OAUTH_JWKS_URINoJWKS URI for signature verification. Required for oauth.
UNIFI_API_BASE_URLNoUniFi Site Manager API base URL.https://api.ui.com
MCP_OAUTH_ALGORITHMNoJWT signing algorithm to accept.RS256
MCP_TLS_KEY_PASSWORDNoPassword for an encrypted private key. Optional.
UNIFI_CACHE_MAX_HOSTSNoMax entries in the hosts TTLCache.512
UNIFI_CACHE_MAX_SITESNoMax entries in the per-console sites TTLCache.2048
UNIFI_MAX_CONCURRENCYNoMax concurrent outbound requests to api.ui.com.10
UNIFI_CACHE_TTL_SECONDSNoTTL for host/site registry cache (seconds).900
UNIFI_PAGINATE_MAX_PAGESNoHard cap on pages drained per call. Default is unlimited.None
MCP_OAUTH_REQUIRED_SCOPESNoComma-separated scopes a token must carry.
UNIFI_ENABLE_MOBILITY_WRITENoEnable guarded Mobility write tools. Fail-closed: default OFF.false
UNIFI_ENABLE_CONNECTOR_WRITENoEnable the mutating generic connector relay. Fail-closed: default OFF.false
UNIFI_REQUEST_TIMEOUT_SECONDSNoHTTP request timeout in seconds.30
MCP_OAUTH_AUTHORIZATION_SERVERSNoComma-separated authorization-server URLs. Defaults to [MCP_OAUTH_ISSUER].
UNIFI_PROTECT_MUTATIONS_ENABLEDNoDeployment-level kill switch for all Protect mutation and physical-action tools. Default ON.true
UNIFI_ENABLE_CARRIER_FABRIC_WRITENoEnable guarded Carrier / ISP Fabric write tools. Fail-closed: default OFF.false

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

UniFi Fabric manages UniFi infrastructure via Site Manager/Fabric. list_hosts discovers consoles; host is reportedState.hostname/name or composite id. Use site names: list_sites has Fabric ids, list_local_sites Network UUIDs. Ambiguous names fail with choices. Devices are infrastructure; clients are end-user devices. Read schemas for ids, time units and body shapes; Shape aliases end in "where T1=...". Use zone-based firewall policies unless the user asks for ACL/classic rules. list_firewall_zones_proxy discovers zones; ports use destination.trafficFilter. Fetch before full PUT; deletes and physical actions may be irreversible. UNIFI_FAMILY_ALLOW and UNIFI_EXCLUDE select tools. Writes default to allowed. UNIFI_WRITE_POLICY=deny hides writes except fabric_connector_get; state-changing GETs fail. UNIFI_WRITE_EXCEPTIONS family:ID=deny hides writes for: network, protect, mobility, carrier, innerspace and connector. Network includes firewall, clients, devices, vpn, hotspot and statistics; connector includes typed relays. Other denies refuse calls. A dry-run policy previews writes unsent; reads may occur. UNIFI_REDACT_SECRETS is opt-in; previews may contain secrets. List pagination drains all pages; UNIFI_PAGINATE_MAX_PAGES caps with incomplete=true. Read schemas for page bases; continue with returned cursor, offset, _continuation or _nextPage. Multi-key org cursors need key_label; unscoped lists report per-key failures. Bodies and error reasons are preserved; relay 4xx/5xx are errors. Never swallow failures or infer unsupported from one error. See docs/TOOLS.md and docs/TOOL-USAGE.md. Current deployment: UNIFI_WRITE_POLICY=allow. Discovery mode: search_tools finds enabled tools; describe_tool gives exact schemas. Execute via call_read_tool or call_write_tool. Enabled families (counts): carrier: 11; clients: 15; connector: 5; devices: 39; firewall: 33; hotspot: 4; innerspace: 32; mobility: 8; network: 345; protect: 225; site_manager: 20; statistics: 19; vpn: 42. list_tool_families lists the families again.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "subscribe": false,
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_toolsA

Find enabled tools by intent, ranked over names, descriptions and parameter schemas.

Default returns ten matches. Choose any positive limit, or null for every match; no tool or search result is hard-capped. more_available is true when the limit cut the list (total_matched gives the full count): raise the limit or refine. Empty query browses tools. Use describe_tool for the exact schema, then call_read_tool or call_write_tool. Enabled families (tool counts): carrier: 11; clients: 15; connector: 5; devices: 39; firewall: 33; hotspot: 4; innerspace: 32; mobility: 8; network: 345; protect: 225; site_manager: 20; statistics: 19; vpn: 42.

describe_toolB

Return the complete enabled tool schema, identical to its full-mode tools/list entry.

call_read_toolA

Execute a read tool with its original validation, guards, audit and result format.

Refuses write calls, including state-changing routes of the mixed GET relay. Describe the target first; its schema and permissions apply. Read-only mode and secret scrubbing are preserved.

call_write_toolA

Execute a tool that may mutate live configuration through registered dispatch.

Describe the target first. Target validation, per-area opt-outs, UNIFI_WRITE_POLICY=deny, OAuth permissions, dry-run, audit and secret scrubbing match a direct call.

list_tool_familiesA

List enabled families and counts; use their slugs as search_tools family filters.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
protect_consolesJSON index of every console the configured API keys can see (list_hosts), each with its Protect resource URIs: events/recent, events/summary and cameras/snapshots. Start here to find the host value for the templates. Read at request time; never cached by the server.

TDQS

A3.9/5.0

Scored across 5 tools

Disambiguation4/5

The gateway flow is clear: discover (search_tools, list_tool_families), inspect (describe_tool), then execute (call_read_tool, call_write_tool). Minor overlap between search_tools and list_tool_families as discovery entry points, but the descriptions distinguish intent-ranked search from family-level browsing. The read/write split of the execution tools is cleanly disambiguated.

Naming Consistency4/5

All names use snake_case with a verb_noun shape: call_read_tool, call_write_tool, describe_tool, search_tools, list_tool_families. The only deviation is that the two execution tools share a 'call_' prefix while describe_tool also acts on a tool, which slightly muddies the verb semantics but remains predictable.

Tool Count5/5

Five facade tools are a well-scoped surface for a dispatcher fronting a very large registry (hundreds of underlying tools across 13 families). A meta-server should stay minimal, and each of these five earns its place: two discovery, one schema inspection, two execution.

Completeness4/5

The discover-inspect-execute lifecycle, family browsing, filtering, pagination via limits, and read/write separation with policy guards cover the gateway domain well. Gaps are minor: no bulk/batch invocation and no aggregated error or health inspection tool, but agents can work around these by chaining search_tools and describe_tool.

Maintenance

ActivityNo data
ResponsivenessOutdated data