|
1 | 1 | # Dynamic MCP Toggling via Meta Tools |
2 | 2 |
|
3 | 3 | **Last Updated:** May 19, 2026 |
4 | | -**Status:** Phase 5 complete — UI surface for session overrides + settings toggle |
| 4 | +**Status:** Feature complete — pending validation + PR |
5 | 5 | **Branch:** `feat/dynamic-mcp-toggle-meta-tools` |
6 | 6 | **Base branch:** `feat/workspace-root-routing` ([upstream PR #151](https://github.com/mcpmux/mcp-mux/pull/151)) |
7 | 7 | **Issue:** TBD — file after planning review |
@@ -162,8 +162,12 @@ Each write fires `tools/list_changed` per-peer via the existing `MCPNotifier::no |
162 | 162 | | [`crates/mcpmux-gateway/src/consumers/mcp_notifier.rs`](../../crates/mcpmux-gateway/src/consumers/mcp_notifier.rs) | In the session-reap pass, also call `SessionOverrideRegistry::remove(session_id)` alongside `SessionRootsRegistry::remove`. | |
163 | 163 | | [`crates/mcpmux-core/src/domain/event.rs`](../../crates/mcpmux-core/src/domain/event.rs) | No new variant — `MetaToolInvoked` already carries `decision: String`. Document `"session_override"` as a valid value in the doc comment. | |
164 | 164 | | [`apps/desktop/src/features/workspaces/WorkspacesPage.tsx`](../../apps/desktop/src/features/workspaces/WorkspacesPage.tsx) | New "Active session overrides" sub-panel under the live-session inspector: per-session list of enabled / disabled server_ids with a "clear" button. | |
165 | | -| [`apps/desktop/src-tauri/src/commands/workspace_binding.rs`](../../apps/desktop/src-tauri/src/commands/workspace_binding.rs) | New Tauri commands: `list_session_overrides(session_id)`, `clear_session_overrides(session_id)`. Read-only + clear; mutation happens via the MCP tool, not the UI. | |
166 | | -| [`apps/desktop/src/lib/api/workspaceBindings.ts`](../../apps/desktop/src/lib/api/workspaceBindings.ts) | TS wrappers for the two new commands. | |
| 165 | +| [`apps/desktop/src-tauri/src/commands/session_overrides.rs`](../../apps/desktop/src-tauri/src/commands/session_overrides.rs) | Tauri commands: `list_session_overrides`, `clear_session_overrides`. Read-only + clear; mutation via MCP tools. | |
| 166 | +| [`apps/desktop/src-tauri/src/commands/settings.rs`](../../apps/desktop/src-tauri/src/commands/settings.rs) | `get/set_session_overrides_require_approval` settings commands. | |
| 167 | +| [`apps/desktop/src-tauri/src/commands/gateway.rs`](../../apps/desktop/src-tauri/src/commands/gateway.rs) | Wire `session_overrides` + `mcp_notifier` into `GatewayAppState` on gateway start. | |
| 168 | +| [`apps/desktop/src/lib/api/sessionOverrides.ts`](../../apps/desktop/src/lib/api/sessionOverrides.ts) | TS wrappers for session override commands + workspace root matching helpers. | |
| 169 | +| [`crates/mcpmux-gateway/src/server/mod.rs`](../../crates/mcpmux-gateway/src/server/mod.rs) | `session_overrides()`, `notification_bridge()` accessors; shared `MCPNotifier` instance. | |
| 170 | +| [`README.md`](../../README.md) | Self-Management Meta Tools feature subsection. | |
167 | 171 |
|
168 | 172 | --- |
169 | 173 |
|
@@ -228,20 +232,39 @@ Each write fires `tools/list_changed` per-peer via the existing `MCPNotifier::no |
228 | 232 |
|
229 | 233 | **Outcome:** Workspace binding gains/loses persistent server-all FeatureSet layers via meta tools. |
230 | 234 |
|
231 | | -### Phase 5 — UI surface for session overrides |
| 235 | +### Phase 5 — UI surface for session overrides ✅ |
232 | 236 |
|
233 | 237 | **Effort:** 1 day |
234 | 238 |
|
235 | 239 | - [x] New "Active session overrides" sub-panel inside `WorkspacesPage.tsx`'s live-session inspector: lists per-session `enabled`/`disabled` server ids alongside the reported roots. |
236 | 240 | - [x] "Clear all overrides" button per session — calls the new `clear_session_overrides` Tauri command. Useful when a session got into a weird state and the user wants a clean default-routing read. |
237 | 241 | - [x] New Tauri commands: `list_session_overrides(session_id) -> { enabled: string[], disabled: string[] }`, `clear_session_overrides(session_id)`. |
238 | 242 | - [x] Settings checkbox under Gateway settings: "Require approval for session-scope overrides" — wires to `gateway.session_overrides_require_approval`. |
239 | | -- [ ] README + CHANGELOG entries describing the new meta-tools and the manifest-driven workflow. |
| 243 | +- [x] README section describing the new meta-tools and manifest-driven workflow ([README.md](../../README.md)). |
| 244 | +- [x] CHANGELOG — release-please from conventional `feat(meta-tools):` commits; no manual edit to `CHANGELOG.md`. |
240 | 245 |
|
241 | 246 | **Outcome:** From the Workspaces tab, a user can see at a glance "session abc123 has GitHub enabled (session) and Firebase disabled (session)" and clear them with one click. The new approval-required setting is discoverable in Gateway settings without reading docs. |
242 | 247 |
|
243 | 248 | --- |
244 | 249 |
|
| 250 | +## Pre-PR validation |
| 251 | + |
| 252 | +Do **not** open a PR until all automated checks pass and the production build is verified manually. |
| 253 | + |
| 254 | +| Step | Command | Purpose | |
| 255 | +| ---- | ------- | ------- | |
| 256 | +| Full validate | `pnpm validate` | fmt, clippy, check, eslint, typecheck | |
| 257 | +| Rust tests | `pnpm test:rust` | unit + integration (`meta_tools.rs`) | |
| 258 | +| TS tests | `pnpm test:ts` | vitest | |
| 259 | +| Production build | `pnpm build` | Tauri build on current platform | |
| 260 | +| Manual smoke (recommended) | Run app, exercise Workspaces overrides panel + Settings toggles | UX verification | |
| 261 | + |
| 262 | +Optional (slow / env-dependent): `pnpm test:e2e`, `pnpm test:e2e:web`. |
| 263 | + |
| 264 | +**PR target:** `feat/workspace-root-routing` (stacked on [PR #151](https://github.com/mcpmux/mcp-mux/pull/151)). |
| 265 | + |
| 266 | +--- |
| 267 | + |
245 | 268 | ## Out of scope |
246 | 269 |
|
247 | 270 | | Item | Reason | |
@@ -283,3 +306,9 @@ Each write fires `tools/list_changed` per-peer via the existing `MCPNotifier::no |
283 | 306 | ## Reconciliation |
284 | 307 |
|
285 | 308 | This doc is the source of truth for what gets built. When implementation completes, update the **Status** field at the top and reconcile any deviations (extra files, dropped phases, scope changes) per [`update-planning-md`](~/.cursor/commands/update-planning-md.md). |
| 309 | + |
| 310 | +**May 19, 2026 closeout:** |
| 311 | +- Phases 1–5 implemented on `feat/dynamic-mcp-toggle-meta-tools`. |
| 312 | +- Tauri commands landed in `session_overrides.rs` (not `workspace_binding.rs` as originally planned). |
| 313 | +- CHANGELOG handled by release-please; README updated in-repo. |
| 314 | +- Pre-PR validation gate documented above; PR blocked until validate + tests + build pass. |
0 commit comments