unifi-safe-mcp
UniFi Safe MCP
UniFi Network に特化した読み取り専用の MCP サーバーで、ヘルス、デバイス、アクティブクライアントのビューを制限付きで提供します。spectrenet-mcp のコミット 2e63f009d8f4642e17398685baef0251811d6637 から抽出されたもので、このリポジトリは自己完結型です。
安全契約
読み取りツールは
network_health、devices、clientsの3つのみ。設定、コマンド、採用、再起動、ブロック、その他の変更ツールはありません。アプライアンスデータのリクエストは HTTP
GETのみを使用します(認証は必然的にPOST /api/auth/loginを使用します)。TLS 証明書とホスト名の検証はデフォルトで有効です。
認証およびアプライアンスデータのリダイレクトは、フォローせず拒否されます。
設定されたサイトは1つの URL パスセグメントとしてエンコードされ、エンドポイントのサフィックスはクローズド許可リストに登録されています。
HTTP レスポンスのバイト数、返されるリストの長さ、投影フィールド、監査フィールドは制限されています。
資格情報と完全なレスポンスは監査されません。
Related MCP server: UniFi MCP Server
互換性
これは、最新の UniFi OS アプライアンスで確認された UniFi OS コンソールプロキシパス /api/auth/login と /proxy/network/api/s/{site}/... を対象としています。古い自己ホスト型の UniFi Network Controller は通常 /api/login と非プロキシの /api/s/... を使用しますが、これらはサポートされていません。Ubiquiti はアプライアンスと Network Application のバージョン間でプライベート/内部エンドポイントを変更します。認定されたバージョンマトリックスはありません。このアルファ版を、非本番環境でお使いの正確なコンソールファームウェアと Network Application バージョンに対してテストし、アップグレードは運用上固定してください。
インストールと実行
uv sync --extra test
uv run unifi-safe-mcp --help
uv run unifi-safe-mcpサーバーは MCP stdio を使用し、.env を読み込みません。.env.example はダミーのドキュメントとしてのみ扱い、専用の読み取り専用アカウントをスーパーバイザー/シークレットマネージャーを通じて注入してください。
検証
uv sync --locked --extra test
uv run --locked pytest
uv run --locked python -m compileall -q src tests
uv buildAvailable Tools
3 toolsclientsD
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
devicesD
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
network_healthD
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.0- First observed
clients - First observed
devices - First observed
network_health
TDQS
Scored across 3 tools
The three tools—network_health, devices, and clients—each address a distinct aspect of a UniFi network with no overlap in purpose. An agent can easily differentiate between them based on their names.
All three tool names are single nouns following a consistent pattern (no verbs or mixed conventions). While this differs from the common verb_noun style, the naming is internally consistent and predictable.
With only three tools, the server is minimal but within the acceptable range for a focused network management utility. The count feels proportionate to the narrow scope of health, device, and client visibility.
The server covers only basic read‑only operations for network health, devices, and clients. It lacks essential UniFi features such as site management, configuration changes, or traffic monitoring, leaving significant gaps for most real‑world use cases.
Maintenance
Related MCP Connectors
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
XFA's remote MCP server — query device posture, compliance, policies & CVEs. Read-only.
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to manage and monitor UniFi Network Controllers through natural language. Provides 25 read-only tools for discovering devices and clients, viewing security configurations, analyzing network statistics, and exporting configuration data.41MIT
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive management of UniFi Network infrastructure through 24 tools for monitoring and controlling devices, clients, wireless networks, security, and guest access. Supports network administration tasks like device restarts, client blocking, WLAN configuration, and backup creation.21 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Ubiquiti UISP API for managing network devices, sites, and monitoring through dynamically generated read-only tools.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables read-only querying of a UniFi fleet via the Site Manager API and per-console connector proxy, allowing users to list hosts, sites, devices, ISP metrics, and live network clients through Claude.Academic Free v1.1