feat(mcp): simplify MCP server form to URL-first, collapse advanced settings - #431
Closed
esafwan wants to merge 4 commits into
Closed
feat(mcp): simplify MCP server form to URL-first, collapse advanced settings#431esafwan wants to merge 4 commits into
esafwan wants to merge 4 commits into
Conversation
…ettings Restructure the MCP server form so the default view matches what a URL-first OAuth client actually needs: server URL + Connect button. - ConnectionTab: primary card is now just URL + Connect/status; auth mode, credential, transport, and custom headers move into a collapsed 'Advanced Settings' card; the 7 manual OAuth fields (client id/secret, endpoints, scope, extra params, redirect URI) move into a nested 'Manual OAuth Fallback' collapsible, since discovery + DCR fill them automatically. - DetailsTab: tool namespace and timeout move behind a collapsed 'Advanced' row; default view is name/description/enabled. - Credential field labeled per auth mode; header name auto-derived (editable only for custom_header). - Remove oauth_token_response_path (unused compat shim) from DocType, mcp_oauth.py, and all frontend references; token extraction always uses the standard access_token key. - DocType auth_type default 'none' -> 'oauth' so URL-first is the out-of-box path in Desk as well. DocType changed: requires bench migrate (drops the oauth_token_response_path column; no data migration needed).
…merge if unwanted)
…icker modal 'Create MCP' and 'Connect MCP' were two near-synonym buttons (the sign-in/sign-up dilemma) for the same end result: the agent gets an MCP server. UX consult (claude opus) decided on one primary action with the create path inside the flow: - ToolsTab MCP card: single 'Connect MCP Server' button (secondary in header, primary in empty state); empty-state copy now reads 'No MCP servers connected yet / Connect a shared server, or register a new one to get started.' - SelectMCPServersModal: title 'Connect MCP servers' with subtext announcing the create path; quiet link button in the footer 'Don't see it? Register a new MCP server →' (new onCreateNew prop). - Empty-registry state in the modal promotes create to primary: 'No MCP servers registered yet' + 'Register your first MCP server →'. - AgentFormPage: handleCreateMCP now wired to the modal's onCreateNew instead of the removed ToolsTab button.
Contributor
Author
Update: Agent MCP section — one button, create path in the flowFollow-up commit on this branch addressing the Create MCP / Connect MCP button pair in the Agent form's MCP card — two near-synonyms for the same end result (the sign-in/sign-up dilemma). Design validated via a claude opus UX consult. What changed (
Screenshots (bench 16_ro, live): Agent MCP card — single button in header and empty state: Picker modal, populated registry — list + footer create link: Picker modal, empty registry — create path promoted to primary: Verified: |
Contributor
Author
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.



Why
The MCP server form exposed ~15 inputs up front — every OAuth value that URL-first discovery (RFC 9728/8414 + DCR + PKCE, from the MCPUrlFirst work) now fills automatically was still a visible manual field. Standard AI tool connector dialog asks only for Name + URL (with Client ID/Secret tucked into Advanced). This PR brings HUF's form to the same surface while keeping the extra capabilities (non-OAuth auth modes, custom headers) that other tools doesn't offer.
What changed
Connection tab (
ConnectionTab.tsx)mcp_connection_resolver.pyonly fills them when empty).custom_header.Details tab (
DetailsTab.tsx)Removed field:
oauth_token_response_pathaccess_tokenkey in practice). Removed from the DocType,mcp_oauth.py::_save_tokens, and all frontend references.DocType
auth_typedefault changednone→oauth, matching the React form, so URL-first OAuth is the out-of-box path in Desk too.oauth_token_response_pathDB column remains as an inert orphan; it can be dropped manually later if desired.Screenshots (bench 16_ro, huf-ro.localhost)
Default view — URL + Connect only:
Advanced Settings expanded (auth mode / transport / custom headers):
Manual OAuth Fallback (nested, collapsed by default):
Details tab:
Test plan
yarn build(tsc + vite) green on host worktree and in bench container16_ro(isolated validation bench),bench migratecleanhuf-ro.localhost— all four states above verified live (screenshots)MCP Serverinsert via console —auth_typedefaults tooauth,token_response_pathgone from meta, delete clean