Skip to content

feat(frontend): per-server Auto-approve tool changes toggle (MCP-2932)#725

Merged
Dumbris merged 2 commits into
mainfrom
feat/mcp-2932-auto-approve-tool-changes-ui
Jun 19, 2026
Merged

feat(frontend): per-server Auto-approve tool changes toggle (MCP-2932)#725
Dumbris merged 2 commits into
mainfrom
feat/mcp-2932-auto-approve-tool-changes-ui

Conversation

@Dumbris

@Dumbris Dumbris commented Jun 19, 2026

Copy link
Copy Markdown
Member

Summary

Adds the per-server "Auto-approve tool changes" toggle to the Web UI (MCP-2932, parent MCP-2916), bound to the auto_approve_tool_changes config flag.

  • frontend/src/views/ServerDetail.vueTool-change approval card in the Configuration tab: a toggle-warning checkbox + a ⚠️ rug-pull warning hint directly beneath it. OFF by default (protected). Toggling persists via the existing PATCH /api/v1/servers/{id} path (patchServerDiff) with a success toast; reverts on failure.
  • frontend/src/types/api.ts — optional auto_approve_tool_changes?: boolean on Server (absent/undefined = OFF; tri-state nil preserved).
  • docs/features/tool-quarantine.md — documents the Web UI toggle (ENG-9).
  • frontend/tests/unit/server-detail-auto-approve.spec.ts — component test: renders, reflects the server flag, persists {auto_approve_tool_changes: true|false} via api.patchServer, warning renders.

Dependency resolved

The backend REST plumbing (MCP-2940, #727) is merged to mainAddServerRequest/PATCH/POST accept the flag, GET server-status exposes it, and it persists to BBolt. This branch is rebased onto that main, so the toggle is fully functional end-to-end.

Verification

  • vitest218 passed (29 files), incl. 5 new MCP-2932 tests; vue-tsc --noEmit clean; make build green.
  • Real API E2E (built binary, isolated config): baseline absent → PATCH true → GET reflects true → persisted to config file → PATCH false clears it → set true + restart → still true (BBolt survival).
  • Web-UI (Playwright) against the running instance: toggle + ⚠️ warning render in the Configuration tab; clicking persists through to the REST API (true→false, API confirms).

Related #MCP-2916 · backend #727 (MCP-2940) · runtime enforcement: MCP-2931. Per Gate 3, opened for review — the human merges on GitHub.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 19, 2026

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 54b084b
Status: ✅  Deploy successful!
Preview URL: https://4150ce74.mcpproxy-docs.pages.dev
Branch Preview URL: https://feat-mcp-2932-auto-approve-t.mcpproxy-docs.pages.dev

View logs

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

📦 Build Artifacts

Workflow Run: View Run
Branch: feat/mcp-2932-auto-approve-tool-changes-ui

Available Artifacts

  • archive-darwin-amd64 (28 MB)
  • archive-darwin-arm64 (25 MB)
  • archive-linux-amd64 (16 MB)
  • archive-linux-arm64 (14 MB)
  • archive-windows-amd64 (28 MB)
  • archive-windows-arm64 (25 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (21 MB)
  • installer-dmg-darwin-arm64 (19 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 27823465874 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

Dumbris added a commit that referenced this pull request Jun 19, 2026
…API (MCP-2940) (#727)

MCP-2930 (#724) added the per-server auto_approve_tool_changes flag to
config.ServerConfig but did not extend the REST layer, so the Web UI toggle
(MCP-2932, PR #725) could neither read nor persist it.

REST request side:
- Add AutoApproveToolChanges *bool to httpapi.AddServerRequest.
- Wire it into handleAddServer (create) and handlePatchServer with *bool
  nil-preserve semantics: omitting it on PATCH preserves the existing pointer
  (which may be nil = "never set"); an explicit value (including false) is
  applied. server.UpdateServer applies the pointer only when non-nil so callers
  that don't touch it (e.g. config-to-secret) never reset it.

REST read side:
- Add AutoApproveToolChanges *bool to contracts.Server (omitempty → tri-state
  nil stays out of the payload so the UI can tell unset from explicit false).
- Emit auto_approve_tool_changes from runtime.GetAllServers (StateView path)
  and getAllServersLegacy, in parity with quarantined.
- Project it in management.ListServers and ConvertGenericServersToTyped /
  ConvertServerConfig.

Persistence:
- SaveConfiguration rebuilds the JSON config's server list from BBolt records,
  so a field absent from storage.UpstreamRecord is wiped on the next mutation.
  Add AutoApproveToolChanges to UpstreamRecord and all four selective
  conversions (Save/Get/List in manager.go, saveServerSync in async_ops.go);
  update TestSaveServerSyncFieldCoverage to require it in BBolt. Verified the
  flag now survives PATCH→GET and a full restart.

Tests: handler PATCH (set/preserve-nil/preserve-true/explicit-false) + GET
exposure; management + contracts projection; storage Save/Get/List round-trip
incl. tri-state nil. OpenAPI regenerated. Docs updated (tool-quarantine.md,
rest-api.md).

Related #725. Runtime enforcement remains MCP-2931.
…2932)

Add an 'Auto-approve tool changes' toggle to the server Configuration tab,
bound to the per-server auto_approve_tool_changes flag (MCP-2930). OFF by
default (protected); a rug-pull warning hint sits directly beneath it. Toggling
persists through the existing PATCH /api/v1/servers/{id} path and surfaces a
success toast.

- types/api.ts: add optional auto_approve_tool_changes to Server (undefined = OFF)
- ServerDetail.vue: Tool-change approval card with toggle + warning + handler
- docs(tool-quarantine): document the Web UI toggle
- test: component test covering reflect/persist + warning render

Related #MCP-2916
@Dumbris Dumbris force-pushed the feat/mcp-2932-auto-approve-tool-changes-ui branch from 6e71842 to 36da939 Compare June 19, 2026 11:25
@Dumbris Dumbris marked this pull request as ready for review June 19, 2026 11:25

@mcpproxy-gatekeeper mcpproxy-gatekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Claude Code review (MCP-2932). Per-server Auto-approve tool changes toggle + rug-pull warning, OFF by default, persists via existing PATCH; functional now that MCP-2940 REST round-trip + MCP-2931 enforcement are merged. vitest 208/208, vue-tsc clean.

@Dumbris Dumbris merged commit 8af656c into main Jun 19, 2026
38 checks passed
@Dumbris Dumbris deleted the feat/mcp-2932-auto-approve-tool-changes-ui branch June 19, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants