Repository navigation
feat(mcp): Settings page, per-connection access and activity log - #1141
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third part of the MCP epic #1133: the user-facing side of the server from #1140.
Preferences → MCP Server (new category)
McpAccessStore). Production connections carry aPRODbadge and a warning line. Empty state when there are no SQL connections.querya-mcpnext to the app binary; when it is not bundled (macOS, Flatpak, dev builds), the hint says to download it and the snippet has a placeholder. No token or secret in the snippets.Built from UI kit pieces (
PreferencesSwitchRow,QueryaActionButton,QueryaBadge,QueryaEmptyState,showAppToast).Activity log storage
mcp_activitytable (LocalDb schema v11, created on fresh installs and on upgrade), capped at 200 rows, SQL cut at 2000 chars, connection name stored as a snapshot.McpServerController.instancepersists calls; other instances (tests) do not touch LocalDb.Deviation from the issue: calls are not written to
mutation_auditwith a newmcpsource. That trail lists executed data / schema changes; MCP is read-only, so every entry would be noise. The activity log is the MCP audit.Tests
preferences_mcp_section_test.dart: SQL-only list with shared state and toggling, PROD badge, enabling and status text, regenerate, clipboard content of the copy buttons (path, format, no token), recent calls incl. errors and Clear, empty state.mcp_client_config_and_activity_test.dart: snippet formats, bundled shim lookup,mcp_activityround trip, newest-first order, cap, clear.Written without running locally; CI is the first run.
Closes #1136