unifi-network-mcp 0.5.1__py3-none-any.whl → 0.5.2__py3-none-any.whl
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.
- src/_version.py +2 -2
- src/runtime.py +14 -2
- {unifi_network_mcp-0.5.1.dist-info → unifi_network_mcp-0.5.2.dist-info}/METADATA +5 -2
- {unifi_network_mcp-0.5.1.dist-info → unifi_network_mcp-0.5.2.dist-info}/RECORD +8 -8
- {unifi_network_mcp-0.5.1.data → unifi_network_mcp-0.5.2.data}/data/share/unifi-network-mcp/.well-known/mcp-server.json +0 -0
- {unifi_network_mcp-0.5.1.dist-info → unifi_network_mcp-0.5.2.dist-info}/WHEEL +0 -0
- {unifi_network_mcp-0.5.1.dist-info → unifi_network_mcp-0.5.2.dist-info}/entry_points.txt +0 -0
- {unifi_network_mcp-0.5.1.dist-info → unifi_network_mcp-0.5.2.dist-info}/licenses/LICENSE +0 -0
src/_version.py
CHANGED
|
@@ -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
|
src/runtime.py
CHANGED
|
@@ -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",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: unifi-network-mcp
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: Unifi Network MCP Server
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Requires-Python: >=3.13
|
|
@@ -541,6 +541,7 @@ The server merges settings from **environment variables**, an optional `.env` fi
|
|
|
541
541
|
| `UNIFI_ENABLED_CATEGORIES` | Comma-separated list of tool categories to load (eager mode). See table below |
|
|
542
542
|
| `UNIFI_ENABLED_TOOLS` | Comma-separated list of specific tool names to register (eager mode) |
|
|
543
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` |
|
|
544
545
|
|
|
545
546
|
### Tool Categories (for UNIFI_ENABLED_CATEGORIES)
|
|
546
547
|
|
|
@@ -812,7 +813,9 @@ See [docs/permissions.md](docs/permissions.md) for complete documentation includ
|
|
|
812
813
|
* **Review permissions carefully** before enabling high-risk operations. Use environment variables for runtime control.
|
|
813
814
|
* Create, update, and delete tools should be used with caution and only enabled when necessary.
|
|
814
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.
|
|
815
|
-
* **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.
|
|
816
819
|
|
|
817
820
|
---
|
|
818
821
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
src/_version.py,sha256=
|
|
1
|
+
src/_version.py,sha256=LGYtjQ6cyPZC_N0AovMIeSYYDK21050nm3HYgDanQBM,704
|
|
2
2
|
src/bootstrap.py,sha256=mqkDDfn5xKRzun07TS8xPLZm_WnfLt3xTguxxFnfRV0,7572
|
|
3
3
|
src/jobs.py,sha256=3IUO8ChpeRUjyJTWeFlyIwtkQLv-_KvfzuA5Ra4PmDI,5984
|
|
4
4
|
src/main.py,sha256=gmOt3jlpWv5r9dlIpva7YCkZ8Yw45jQR3k9o7hBQhw4,15830
|
|
5
|
-
src/runtime.py,sha256=
|
|
5
|
+
src/runtime.py,sha256=VGk5c18ebDMP1n54DDGwBmIQZGx8mCS5Hn1UH0K1zak,7679
|
|
6
6
|
src/schemas.py,sha256=Y9fglAAgRGh8zxwO0J5zpj5BsRMLDDwevwXY_6kj5VU,33725
|
|
7
7
|
src/tool_index.py,sha256=aUPFqES4i_cq9ZsfAoiWuhKwoEEJ8NEAOafQ2h1g1NE,5492
|
|
8
8
|
src/validator_registry.py,sha256=dboNY36ZQphCr7tDQuVQtNvXu4X1FBkgqoLb-sGNwJQ,3005
|
|
@@ -45,9 +45,9 @@ src/utils/permissions.py,sha256=dILy7uSb7WJsCfpYKr18VpEts3HfUQhNhNGoRV9IExU,4080
|
|
|
45
45
|
src/utils/tool_loader.py,sha256=QpfHOxyZ_bzPJM0SItB7UM8uW_p7vl2Sm25rfgfwsAY,4147
|
|
46
46
|
src/tools_manifest.json,sha256=FX4_TrE4gs8Ao_4B40yinipifyE256fzbwhia9W4-Zs,43100
|
|
47
47
|
src/config/config.yaml,sha256=KiYwuDyq5L_6QZL-xG1N1gvO7W3Tck1JYZ-fv1YOi8U,4170
|
|
48
|
-
unifi_network_mcp-0.5.
|
|
49
|
-
unifi_network_mcp-0.5.
|
|
50
|
-
unifi_network_mcp-0.5.
|
|
51
|
-
unifi_network_mcp-0.5.
|
|
52
|
-
unifi_network_mcp-0.5.
|
|
53
|
-
unifi_network_mcp-0.5.
|
|
48
|
+
unifi_network_mcp-0.5.2.data/data/share/unifi-network-mcp/.well-known/mcp-server.json,sha256=Ru2oF_SdOzkathJVTQ6R0bRB-NTmiXLlNVvsp7GqmPs,1427
|
|
49
|
+
unifi_network_mcp-0.5.2.dist-info/METADATA,sha256=LG8NJDxnc-i5N037642piPX_eGrxvMEm3wI255c6IWg,39204
|
|
50
|
+
unifi_network_mcp-0.5.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
51
|
+
unifi_network_mcp-0.5.2.dist-info/entry_points.txt,sha256=iDs5JXOBoUROpkuTXoxr-1WSrz1FLEgI0TO4pFsZ8u0,52
|
|
52
|
+
unifi_network_mcp-0.5.2.dist-info/licenses/LICENSE,sha256=1tMHOACX4Nse1DzgSKufrvTGztT8kS71LE8l29IAvto,1068
|
|
53
|
+
unifi_network_mcp-0.5.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|