agent-zero
agent-zero copied to clipboard
Feature Request: MCP per‑server enable/disable toggle (QOL)
Summary
Add a per‑server availability toggle to MCP settings. Improves clarity/control over MCPs, hardens the modal against race conditions during auto‑refresh and Apply.
Motivation (QoL)
- Enable/disable individual MCPs without manual JSON edits.
Scope
- UI only; no backend changes.
- JSON contract preserved:
mcpServers: { "<server>": { disabled?: boolean, ... } }.
UX details
- Toggle switch next to each server; green when enabled.
- If
disabledis missing, toggles remain stable using the prior known state
Technical notes
- Robust key resolution (underscore/hyphen/case‑insensitive) to find the correct MCP block.
- Concurrency guards:
- Debounced Apply for rapid toggles.
- Pause auto status polling during Apply; resume after.
- Track in‑flight status requests; ignore out‑of‑order responses.
- Prevent overlapping Apply calls; queue one follow‑up if changes occur during Apply.
- Log modal reliability: opens immediately with “Loading…”, then updates when data arrives.
Files (frontend)
webui/components/settings/mcp/client/mcp-servers-store.jswebui/components/settings/mcp/client/mcp-servers.html
Backward compatibility
- Fully backward compatible; optional
disabledis used if present.
Test plan
- Toggle single/multiple servers; press Apply during auto‑refresh → no stalls; state persists.
- Remove
disabledfrom some entries:- Reformat → only those entries get
disabledre‑added (default conservative: disabled). - Apply → editor JSON remains unchanged; status reflects updated state.
- Reformat → only those entries get
- Open Log repeatedly and after toggles → always loads; no blank modal.
- Verify no duplicate MCP entries or extra maps.
Screenshot
References
- Implemented in fork:
Omni-NexusAI/agent-zero, branchfeature/mcp-toggle-green(merged intodevelopment).
Labels
enhancement, ui, mcp, quality-of-life