You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AdGuard and Grafana tools both default to port 3000 #90
The AdGuard tools and the Grafana tool both default to port 3000. The target stack runs both services, so out of the box one set of tools always queries the wrong service.
Where
mcp-server/src/tools/adguardStats.ts:6
mcp-server/src/tools/adguardFilters.ts:6
mcp-server/src/tools/adguardQueryLog.ts:7
mcp-server/src/tools/grafanaSnapshot.ts:7
Docs: mcp-server/README.md:83,89. skills/network-configuration/SKILL.md:92 already mentions the conflict.
Details
All four files set const DEFAULT_PORT = 3000;.
Impact
If the port env vars are not set, homelab_adguardStats, homelab_adguardFilters, and homelab_adguardQueryLog hit Grafana and get a 404, which curl reports as exit 22. The user is then told to "check authentication", which is misleading.
Steps to reproduce
With the documented stack and no HOMELAB_ADGUARD_PORT set, call homelab_adguardStats.
Suggested fix
Change the AdGuard default to a port that does not collide (for example 80, or whatever the documented compose file maps).
Alternatively, require the env var when two services share a default.
Make the exit-22 message mention a wrong port as a possible cause.
Update mcp-server/README.md and .env.example.
Acceptance criteria
AdGuard and Grafana have distinct defaults
The docs match the new defaults
The exit-22 error text mentions the port
Getting started
Relevant files: the four tool files above, mcp-server/README.md
How to run tests: cd mcp-server && npm test
Filed by repo-audit/full-audit at 9cfe5e3. Severity: medium. Effort: S. audit-key: bug|mcp-server/src/tools/adguardStats.ts|DEFAULT_PORT
Closed by ac9d7e0. The fix deliberately keeps both defaults at 3000 rather than picking a new AdGuard default:
Port 80 (the suggested alternative) is Nginx Proxy Manager in the reference stack, so it would trade one collision for another.
AdGuard's web UI port is chosen during its setup wizard, and existing users who rely on 3000 for AdGuard would break silently.
Instead, the HTTP-error message for the AdGuard and Grafana tools now names the port, explains the 3000 collision, and points at HOMELAB_ADGUARD_PORT / HOMELAB_GRAFANA_PORT. The config docs say the same. Since cdb4f91 both ports can also be set per node via the env object in HOMELAB_NODES.
Activity
TMHSDigital commentedon Nov 3, 2026
Closed by ac9d7e0. The fix deliberately keeps both defaults at 3000 rather than picking a new AdGuard default:
Instead, the HTTP-error message for the AdGuard and Grafana tools now names the port, explains the 3000 collision, and points at
HOMELAB_ADGUARD_PORT/HOMELAB_GRAFANA_PORT. The config docs say the same. Since cdb4f91 both ports can also be set per node via theenvobject inHOMELAB_NODES.