unifi-network-mcp 0.5.0__tar.gz → 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- unifi_network_mcp-0.5.0/README.md → unifi_network_mcp-0.5.2/PKG-INFO +22 -1
- unifi_network_mcp-0.5.0/PKG-INFO → unifi_network_mcp-0.5.2/README.md +6 -17
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/_version.py +2 -2
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/config/config.yaml +2 -2
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/runtime.py +14 -2
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/.gitignore +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/.well-known/mcp-server.json +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/LICENSE +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/pyproject.toml +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/bootstrap.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/jobs.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/main.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/client_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/connection_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/device_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/event_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/firewall_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/hotspot_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/network_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/qos_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/routing_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/stats_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/system_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/traffic_route_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/usergroup_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/managers/vpn_manager.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/schemas.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tool_index.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/clients.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/config.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/devices.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/events.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/firewall.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/hotspot.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/network.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/port_forwards.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/qos.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/routing.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/stats.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/system.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/traffic_routes.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/usergroups.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools/vpn.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/tools_manifest.json +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/utils/config_helpers.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/utils/confirmation.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/utils/diagnostics.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/utils/lazy_tool_loader.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/utils/meta_tools.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/utils/permissions.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/utils/tool_loader.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/validator_registry.py +0 -0
- {unifi_network_mcp-0.5.0 → unifi_network_mcp-0.5.2}/src/validators.py +0 -0
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: unifi-network-mcp
|
|
3
|
+
Version: 0.5.2
|
|
4
|
+
Summary: Unifi Network MCP Server
|
|
5
|
+
License-File: LICENSE
|
|
6
|
+
Requires-Python: >=3.13
|
|
7
|
+
Requires-Dist: aiohttp>=3.8.5
|
|
8
|
+
Requires-Dist: aiounifi>=88
|
|
9
|
+
Requires-Dist: jsonschema>=4.17.0
|
|
10
|
+
Requires-Dist: mcp[cli]>=1.23.0
|
|
11
|
+
Requires-Dist: omegaconf>=2.3.0
|
|
12
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
13
|
+
Requires-Dist: pyyaml>=6.0
|
|
14
|
+
Requires-Dist: typing-extensions>=4.4.0
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
1
17
|
# 📡 UniFi Network MCP Server
|
|
2
18
|
|
|
3
19
|
[![License][license-shield]](LICENSE)
|
|
@@ -518,11 +534,14 @@ The server merges settings from **environment variables**, an optional `.env` fi
|
|
|
518
534
|
| `UNIFI_VERIFY_SSL` | Set to `false` if using self-signed certs |
|
|
519
535
|
| `UNIFI_CONTROLLER_TYPE` | Controller API path type: `auto` (detect), `proxy` (UniFi OS), `direct` (standalone). Default `auto` |
|
|
520
536
|
| `UNIFI_MCP_HTTP_ENABLED` | Set `true` to enable optional HTTP SSE server (default `false`) |
|
|
537
|
+
| `UNIFI_MCP_HOST` | HTTP SSE bind address (default `0.0.0.0`) |
|
|
538
|
+
| `UNIFI_MCP_PORT` | HTTP SSE bind port (default `3000`) |
|
|
521
539
|
| `UNIFI_AUTO_CONFIRM` | Set `true` to auto-confirm all mutating operations (skips preview step). Ideal for workflow automation (n8n, Make, Zapier). Default `false` |
|
|
522
540
|
| `UNIFI_TOOL_REGISTRATION_MODE` | Tool loading mode: `lazy` (default), `eager`, or `meta_only`. See [Context Optimization](#context-optimization) |
|
|
523
541
|
| `UNIFI_ENABLED_CATEGORIES` | Comma-separated list of tool categories to load (eager mode). See table below |
|
|
524
542
|
| `UNIFI_ENABLED_TOOLS` | Comma-separated list of specific tool names to register (eager mode) |
|
|
525
543
|
| `UNIFI_MCP_ALLOWED_HOSTS` | Comma-separated list of allowed hostnames for reverse proxy support. Required when running behind Nginx/Cloudflare/etc. Default `localhost,127.0.0.1` |
|
|
544
|
+
| `UNIFI_MCP_ENABLE_DNS_REBINDING_PROTECTION` | Enable/disable DNS rebinding protection. Set to `false` for Kubernetes/proxy deployments where `UNIFI_MCP_ALLOWED_HOSTS` is insufficient. Default `true` |
|
|
526
545
|
|
|
527
546
|
### Tool Categories (for UNIFI_ENABLED_CATEGORIES)
|
|
528
547
|
|
|
@@ -794,7 +813,9 @@ See [docs/permissions.md](docs/permissions.md) for complete documentation includ
|
|
|
794
813
|
* **Review permissions carefully** before enabling high-risk operations. Use environment variables for runtime control.
|
|
795
814
|
* Create, update, and delete tools should be used with caution and only enabled when necessary.
|
|
796
815
|
* Do not host outside of your network unless using a secure reverse proxy like Cloudflare Tunnel or Ngrok. Even then, an additional layer of authentication is recommended.
|
|
797
|
-
* **Reverse Proxy Configuration:** When running behind a reverse proxy
|
|
816
|
+
* **Reverse Proxy Configuration:** When running behind a reverse proxy (Kubernetes ingress, Nginx, Cloudflare, etc.):
|
|
817
|
+
* First try: Set `UNIFI_MCP_ALLOWED_HOSTS` to include your external domain (e.g., `localhost,127.0.0.1,unifi-mcp.example.com`)
|
|
818
|
+
* If that's insufficient: Set `UNIFI_MCP_ENABLE_DNS_REBINDING_PROTECTION=false` to disable host validation entirely. Only use this in trusted network environments.
|
|
798
819
|
|
|
799
820
|
---
|
|
800
821
|
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: unifi-network-mcp
|
|
3
|
-
Version: 0.5.0
|
|
4
|
-
Summary: Unifi Network MCP Server
|
|
5
|
-
License-File: LICENSE
|
|
6
|
-
Requires-Python: >=3.13
|
|
7
|
-
Requires-Dist: aiohttp>=3.8.5
|
|
8
|
-
Requires-Dist: aiounifi>=88
|
|
9
|
-
Requires-Dist: jsonschema>=4.17.0
|
|
10
|
-
Requires-Dist: mcp[cli]>=1.23.0
|
|
11
|
-
Requires-Dist: omegaconf>=2.3.0
|
|
12
|
-
Requires-Dist: python-dotenv>=1.0.0
|
|
13
|
-
Requires-Dist: pyyaml>=6.0
|
|
14
|
-
Requires-Dist: typing-extensions>=4.4.0
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
|
|
17
1
|
# 📡 UniFi Network MCP Server
|
|
18
2
|
|
|
19
3
|
[![License][license-shield]](LICENSE)
|
|
@@ -534,11 +518,14 @@ The server merges settings from **environment variables**, an optional `.env` fi
|
|
|
534
518
|
| `UNIFI_VERIFY_SSL` | Set to `false` if using self-signed certs |
|
|
535
519
|
| `UNIFI_CONTROLLER_TYPE` | Controller API path type: `auto` (detect), `proxy` (UniFi OS), `direct` (standalone). Default `auto` |
|
|
536
520
|
| `UNIFI_MCP_HTTP_ENABLED` | Set `true` to enable optional HTTP SSE server (default `false`) |
|
|
521
|
+
| `UNIFI_MCP_HOST` | HTTP SSE bind address (default `0.0.0.0`) |
|
|
522
|
+
| `UNIFI_MCP_PORT` | HTTP SSE bind port (default `3000`) |
|
|
537
523
|
| `UNIFI_AUTO_CONFIRM` | Set `true` to auto-confirm all mutating operations (skips preview step). Ideal for workflow automation (n8n, Make, Zapier). Default `false` |
|
|
538
524
|
| `UNIFI_TOOL_REGISTRATION_MODE` | Tool loading mode: `lazy` (default), `eager`, or `meta_only`. See [Context Optimization](#context-optimization) |
|
|
539
525
|
| `UNIFI_ENABLED_CATEGORIES` | Comma-separated list of tool categories to load (eager mode). See table below |
|
|
540
526
|
| `UNIFI_ENABLED_TOOLS` | Comma-separated list of specific tool names to register (eager mode) |
|
|
541
527
|
| `UNIFI_MCP_ALLOWED_HOSTS` | Comma-separated list of allowed hostnames for reverse proxy support. Required when running behind Nginx/Cloudflare/etc. Default `localhost,127.0.0.1` |
|
|
528
|
+
| `UNIFI_MCP_ENABLE_DNS_REBINDING_PROTECTION` | Enable/disable DNS rebinding protection. Set to `false` for Kubernetes/proxy deployments where `UNIFI_MCP_ALLOWED_HOSTS` is insufficient. Default `true` |
|
|
542
529
|
|
|
543
530
|
### Tool Categories (for UNIFI_ENABLED_CATEGORIES)
|
|
544
531
|
|
|
@@ -810,7 +797,9 @@ See [docs/permissions.md](docs/permissions.md) for complete documentation includ
|
|
|
810
797
|
* **Review permissions carefully** before enabling high-risk operations. Use environment variables for runtime control.
|
|
811
798
|
* Create, update, and delete tools should be used with caution and only enabled when necessary.
|
|
812
799
|
* Do not host outside of your network unless using a secure reverse proxy like Cloudflare Tunnel or Ngrok. Even then, an additional layer of authentication is recommended.
|
|
813
|
-
* **Reverse Proxy Configuration:** When running behind a reverse proxy
|
|
800
|
+
* **Reverse Proxy Configuration:** When running behind a reverse proxy (Kubernetes ingress, Nginx, Cloudflare, etc.):
|
|
801
|
+
* First try: Set `UNIFI_MCP_ALLOWED_HOSTS` to include your external domain (e.g., `localhost,127.0.0.1,unifi-mcp.example.com`)
|
|
802
|
+
* If that's insufficient: Set `UNIFI_MCP_ENABLE_DNS_REBINDING_PROTECTION=false` to disable host validation entirely. Only use this in trusted network environments.
|
|
814
803
|
|
|
815
804
|
---
|
|
816
805
|
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.5.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 5,
|
|
31
|
+
__version__ = version = '0.5.2'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 5, 2)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -80,10 +80,22 @@ def get_server() -> FastMCP:
|
|
|
80
80
|
allowed_hosts_str = os.getenv("UNIFI_MCP_ALLOWED_HOSTS", "localhost,127.0.0.1")
|
|
81
81
|
allowed_hosts = [h.strip() for h in allowed_hosts_str.split(",") if h.strip()]
|
|
82
82
|
|
|
83
|
+
# Allow disabling DNS rebinding protection entirely (default: enabled)
|
|
84
|
+
# Set to "false" for Kubernetes/proxy deployments where allowed_hosts is insufficient
|
|
85
|
+
enable_dns_rebinding = (
|
|
86
|
+
os.getenv("UNIFI_MCP_ENABLE_DNS_REBINDING_PROTECTION", "true").lower() == "true"
|
|
87
|
+
)
|
|
88
|
+
|
|
83
89
|
# Configure transport security settings
|
|
84
|
-
transport_security = TransportSecuritySettings(
|
|
90
|
+
transport_security = TransportSecuritySettings(
|
|
91
|
+
allowed_hosts=allowed_hosts,
|
|
92
|
+
enable_dns_rebinding_protection=enable_dns_rebinding,
|
|
93
|
+
)
|
|
85
94
|
|
|
86
|
-
logger.debug(
|
|
95
|
+
logger.debug(
|
|
96
|
+
f"Configuring FastMCP with allowed_hosts: {allowed_hosts}, "
|
|
97
|
+
f"dns_rebinding_protection: {enable_dns_rebinding}"
|
|
98
|
+
)
|
|
87
99
|
|
|
88
100
|
server = FastMCP(
|
|
89
101
|
name="unifi-network-mcp",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|