Purpose
This is a server based on the Model Context Protocol (MCP), specifically designed to turn Ubiquiti's official UniFi API documentation into a structured knowledge source that AI agents can query. It is aimed at engineers who need to develop against the UniFi API, helping models accurately understand API endpoints, field structures, and code usage without stuffing the full OpenAPI specification into the context window. It covers all applications for which Ubiquiti has published API documentation: Network, Protect, Site Manager, InnerSpace, Mobility, and Carrier Fabric.
Main Capabilities
- Endpoint Search: Find API endpoints, filterable by application.
- Schema Drill-Down:
get_field_schemaCan return a single field subtree (for examplemanagement[GATEWAY].dhcpV4), instead of an entire 70 KB endpoint schema, making it easy for the model to get only the part it needs. - Code Examples: Each endpoint provides 10 code examples, including curl, Go, Node.js, Python, and Ansible, each with both local and remote variants.
- Response Examples: Each endpoint comes with a rendered response sample.
- Guide Pages: Includes content such as filtering syntax, error handling, and getting started, which exist only in the rendered documentation.
- Built-in Documentation: The scraped documentation is packaged directly in the package, so there is no need to scrape it yourself, and there are no API keys to configure.
- Weekly Automated Workflow (resumable): Can re-scrape to update the API version or add new applications; scraping is based on Playwright and converts the JS-rendered documentation SPA into structured JSON, output to
<output>/<app>/.
Usage
- After installation, register it with an MCP-compatible client.
- Claude Code (VS Code / JetBrains): Add
.mcp.jsonin the project root directory (then reload the window). - Claude Desktop: Edit
~/.config/Claude/claude_desktop_config.json(Linux) or~/Library/Application Support/Claude/claude_desktop_config.json(macOS). - If the command is not in the client's PATH (Claude Desktop usually does not inherit the shell PATH), use an absolute path, for example
/path/to/.venv/bin/mcp-unifi-applications. - If a tool returns multiple results, it usually accepts an optional
appparameter (network、protect、site-manager、innerspace、mobility、carrier-fabric) to filter by application. - If you need to re-scrape the documentation, you can use the Playwright script. The slug is the last path segment of the documentation URL, for example
https://developer.ui.com/network/v10.1.84/createnetworkcorresponds tocreatenetwork. Use--forceto force a re-scrape; otherwise, already scraped pages will be skipped.
Use Cases
- When developers write code based on the UniFi API and need the model to accurately understand endpoint structures and field options.
- Used together with "control plane" UniFi MCP servers: this server tells the model what the API looks like, and the control plane server handles the actual calls.
- As a knowledge plane, used to answer questions such as "How do I create a network in Go?" or "What options are available for a hosted IPv4 DHCP gateway configuration?" without having to provide the documentation to the model in advance.
Limitations
- Read-only and credential-free: it only provides documentation, does not connect to controllers, and does not read or change live state (devices, clients, firewall rules, etc.).
- It is not an official Ubiquiti product and is not endorsed or sponsored by Ubiquiti; the API documentation content scraped and provided is owned by Ubiquiti Inc. and comes from its public developer portal; "UniFi" is a trademark of Ubiquiti Inc.
- Interacting with controllers requires a separate control plane server.
- Complete details of local and remote code examples, all available tool names, environment variables, etc. are not listed one by one in the materials and are not provided for now.