unifi-mcp-server: Command for Claude Code

.claude/commands/unifi-mcp-inspect.md

unifi-mcp-inspect is a command for Claude Code from enuno/unifi-mcp-server. It costs 12 tokens per session (971 once invoked), scanned A, original, Apache-2.0.

A command that starts MCP Inspector, a web interface for testing an MCP server's tools and viewing their responses. It also checks the required Node.js, credentials, and UniFi connection settings.

In plain words
What is it for?
Use it to launch the UniFi MCP Server, choose a tool, enter its parameters, run it, and inspect the response.
Why use it?
It gives developers a direct way to try server operations and diagnose connection or configuration problems without building a separate client.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is enuno/unifi-mcp-server's own configuration. It tells Claude Code how to work on unifi-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything unifi-mcp-server configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is npx @modelcontextprotocol/inspector uv run src/main.py.

Reuse

Borrowing it

Nothing to install: this file belongs to enuno/unifi-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/enuno/unifi-mcp-server/main/.claude/commands/unifi-mcp-inspect.md
Clone the repo
git clone --depth 1 https://github.com/enuno/unifi-mcp-server

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for unifi-mcp-inspect

README.md
[![agentmods](https://agentmods.dev/badge/commands/enuno/unifi-mcp-server/unifi-mcp-inspect/github.svg)](https://agentmods.dev/commands/enuno/unifi-mcp-server/unifi-mcp-inspect)
Your own site
<a href="https://agentmods.dev/commands/enuno/unifi-mcp-server/unifi-mcp-inspect"><img src="https://agentmods.dev/badge/commands/enuno/unifi-mcp-server/unifi-mcp-inspect/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for unifi-mcp-inspect

Your own site · 80×15
<a href="https://agentmods.dev/commands/enuno/unifi-mcp-server/unifi-mcp-inspect"><img src="https://agentmods.dev/badge/commands/enuno/unifi-mcp-server/unifi-mcp-inspect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 971 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.00971
Opus 5 $0.00006 $0.00485
Sonnet 5 $0.00002 $0.00194
Haiku 4.5 $0.00001 $0.00097

Measured 12d ago against content hash b50cbc6a0470, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

unifi-mcp-inspect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/unifi-mcp-inspect.md · 159 lines

What it actually says

Launch the MCP Inspector to interactively test and debug UniFi MCP Server tools and resources.

The MCP Inspector is a web-based UI for testing MCP servers, making API calls, and inspecting responses.

Prerequisites check:

  1. Verify Node.js is installed:

    node --version
    
    • If not installed, provide installation instructions
  2. Check if .env file exists:

    • If not, copy from .env.example
    • Remind user to add real UniFi credentials
  3. Verify UniFi controller is accessible:

    • Check UNIFI_HOST environment variable
    • Provide connection test if needed

Steps to execute:

  1. Prepare environment:

    • Check .env file has required variables:
      • UNIFI_HOST
      • UNIFI_USERNAME
      • UNIFI_PASSWORD
      • UNIFI_SITE (default: "default")
    • Warn if credentials are placeholder values
    • Offer to help configure if needed
  2. Start MCP Inspector:

    npx @modelcontextprotocol/inspector uv run src/main.py
    
    • Run in background if user requests
    • Capture startup logs
  3. Provide usage instructions:

    • Inspector URL (typically http://localhost:5173)
    • How to test tools:
      • Select a tool from the list
      • Fill in required parameters
      • Execute and view response
    • How to test resources:
      • Browse available resources
      • Subscribe to resource updates
      • View resource data
  4. Monitor the inspector session:

    • Display connection status
    • Show any errors from the MCP server
    • Log tool invocations for debugging
  5. Suggest tools to test first:

    • get_sites - List all UniFi sites (no parameters needed)
    • get_devices - List devices for a site
    • get_clients - List connected clients
    • get_networks - List configured networks

Report back with:

  • MCP Inspector startup status

  • URL to access the web UI

  • Suggested workflow for testing:

    1. Start with read-only tools
    2. Test resource endpoints
    3. Try tools with parameters
    4. Test error handling (invalid params)
    5. Test confirmation/dry-run for mutating operations
  • Quick reference for common tools:

    Read-only tools (safe to test):
    - get_sites
    - get_devices
    - get_clients
    - get_networks
    - get_wlans
    - list_firewall_rules
    - get_port_forwards
    
    Mutating tools (use dry_run=true):
    - create_firewall_rule
    - update_device
    - create_network
    - create_wlan
    - block_client
    

Example output:

MCP Inspector Starting...

Environment Check:
✓ Node.js installed (v20.10.0)
✓ .env file found
✓ UniFi credentials configured
✓ UniFi Host: https://192.168.2.1

Starting Inspector:
$ npx @modelcontextprotocol/inspector uv run src/main.py

Inspector running at: http://localhost:5173

Available Tools: 40
Available Resources: 4

Suggested Test Workflow:
1. Open http://localhost:5173 in your browser
2. Test get_sites to verify connectivity
3. Test get_devices with site_name from step 2
4. Explore other tools in categories:
   - Site Management (3 tools)
   - Device Operations (6 tools)
   - Client Management (5 tools)
   - Firewall & Security (8 tools)

Tips:
- Use dry_run=true for mutating operations
- Check the terminal for detailed server logs
- Press Ctrl+C to stop the inspector

Troubleshooting:

Common issues and solutions:

  • Connection refused: Check if UniFi controller is accessible
  • Authentication failed: Verify credentials in .env
  • SSL errors: Set UNIFI_VERIFY_SSL=false for self-signed certs
  • Port already in use: Inspector may already be running

Safety checks:

  • Warn before testing mutating operations
  • Suggest using dry_run mode first
  • Never log credentials in output
  • Remind about rate limiting for API calls
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 159 lines · 12 tokens per session scan A b50cbc6a0470

Subscribe to this mod's changes

unifi-mcp-inspect is a command published in the GitHub repository enuno/unifi-mcp-server (252 stars, last pushed 5d ago), licensed Apache-2.0. It adds 12 tokens to every session and 971 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.