The last four MCP enabled-flag readers use the shared reader (ACP, hermes tools picker, desktop connector card, health sweep) (#119601)

* fix(mcp): ACP, `hermes tools` and the desktop connector card use the one enabled reader

#119567 left four readers of `mcp_servers.<name>.enabled` on their own rules.
@webtecnica's #119560 found the ACP one:

- `acp_adapter/session.py::_make_agent` used `is not False`, so an ACP
  session kept a server with `enabled: "false"` or `enabled: 0` in its
  toolset while the MCP client skipped it.
- `hermes tools` MCP picker (`tools_config_mcp._configure_mcp_tools_interactive`)
  read `enabled: 0` as on and crashed on a non-dict entry.
- Desktop connector card (`connectors/data/join.ts`) and the MCP health sweep
  (`store/mcp-health.ts`) used `enabled !== false`.

All four now call `mcp_server_enabled` (Python) or `serverEnabled` (renderer),
which share one case table.

Co-authored-by: webtecnica <webtecnica@gmail.com>

* chore: retrigger CI (zero-job dispatch failure, auto-heal)

---------

Co-authored-by: webtecnica <webtecnica@gmail.com>
This commit is contained in:
Siddharth Balyan
2026-09-23 03:54:31 +05:30
committed by GitHub
parent 400f11bd35
commit aaf0fd9273
4 changed files with 10 additions and 6 deletions

View File

@@ -475,9 +475,11 @@ class SessionManager:
elif isinstance(model_cfg, str):
default_model = model_cfg.strip()
from tools.mcp_tool_common import mcp_server_enabled
configured_mcp_servers = [
name for name, cfg in (config.get("mcp_servers") or {}).items()
if not isinstance(cfg, dict) or cfg.get("enabled", True) is not False
if not isinstance(cfg, dict) or mcp_server_enabled(cfg)
]
kwargs = {
"platform": "acp", "quiet_mode": True, "session_id": session_id, "session_db": self._get_db(),