Improve configure mcp UX: search wizard, faster/robust discovery & apply#225
Open
nachill-databricks wants to merge 3 commits into
Open
Improve configure mcp UX: search wizard, faster/robust discovery & apply#225nachill-databricks wants to merge 3 commits into
configure mcp UX: search wizard, faster/robust discovery & apply#225nachill-databricks wants to merge 3 commits into
Conversation
added 3 commits
July 20, 2026 13:53
…apply
Rework the interactive `ucode configure mcp` flow and fix several
scaling/robustness problems surfaced on large workspaces.
Discovery:
- Fix a crash where a socket read timeout (bare TimeoutError, an OSError,
not a URLError) escaped `_http_get_json` and killed the whole command;
it is now surfaced as a reason and skipped best-effort.
- Add a live progress counter to every walk-based source (Vector Search,
UC functions, workspace-wide MCP services) so slow discovery shows
"N/M ... K found" instead of an opaque spinner.
- Add `list_all_mcp_services`: a workspace-wide MCP-services walk
(catalogs -> schemas -> mcp-services) under a wall-clock budget.
Interactive flow:
- Two-step wizard: a "Search for:" screen chooses which sources to
search (External, Apps, MCP services, Genie pre-checked; Vector Search
and UC functions off by default since they walk the workspace), then
the server picker. Pressing Left (<-) in the picker returns to the
search screen without restarting.
- Add a Ctrl-A select-all/none hotkey to the picker.
- Prefix MCP services with "MCP:" and external connections with
"Connection:" to match the existing App:/Genie:/Vector Search: labels.
- Print a post-save summary ("Added N, removed M ... across <clients>")
instead of a bare "Saved".
Apply:
- Parallelize `apply_mcp_server_changes` across clients (serial within a
client, since each mutates one shared config) with a live
"Configuring N/M" progress spinner, so large diffs no longer look
frozen. (Per-server CLI spawns remain; see code comments.)
Co-authored-by: Isaac
After the workspace and agents are configured in the fully-interactive flow (no --agent/--agents/--workspaces flags), prompt "Configure MCP servers now?" and run the MCP wizard if accepted. This makes MCP setup discoverable as the natural next step instead of requiring users to know `ucode configure mcp` exists. Flag-driven and scripted runs are unaffected: the prompt only fires on the fully-interactive path, and never in --dry-run. Co-authored-by: Isaac
The picker rendered the prompt from a PromptSession container, which expands to fill the terminal height. In a tall window that pushed the choices list to the very bottom, leaving a big blank gap between the "Search for:"/"MCP:" prompt and the options. Render the prompt as a fixed 1-row window instead, so the choices follow immediately regardless of terminal height. Co-authored-by: Isaac
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.
Summary
Overhauls the MCP setup experience in ucode. Fixes crashes and slowness that show up on large workspaces (100s of MCP servers), reworks the interactive picker into a clearer wizard, and surfaces MCP setup as a natural step of
ucode configureso users don't have to knowconfigure mcpexists.What changed
1. Fixed a crash during discovery
A network read timeout raises a bare
TimeoutError(anOSError, not aURLError), which slipped past the error handling in_http_get_jsonand killed the whole command mid-discovery (e.g. "timed out Discovering Vector Search…"). Timeouts are now caught and treated as a skippable failure, like every other discovery error.2. New two-step "search wizard" for
configure mcpThe interactive flow is now:
Search for:screen — pick which sources to search. External connections, Databricks apps, MCP services, and Genie spaces are pre-checked; Vector Search and UC functions are off by default because they walk the whole workspace and are slow. Just press Enter to accept the defaults.Extras:
3. Better feedback while searching and saving
Searching Vector Search… 3/8 endpoints, 2 foundinstead of a blank spinner.Added 2, removed 1 MCP servers across Claude Code, Codexinstead of a bareSaved.MCP:for MCP services andConnection:for external connections (matching the existingApp:/Genie:/Vector Search:labels).4. Fixed the "frozen" apply for many servers
Saving 100+ servers appeared to hang because ucode invokes each tool's CLI once per server (claude/codex/gemini), serially.
apply_mcp_server_changesnow runs those operations concurrently across clients (serial within a client, since each mutates one shared config file) with a liveConfiguring N/Mprogress spinner. It no longer looks frozen. (Per-server CLI spawns remain — collapsing them into direct config-file writes is a possible future follow-up, noted in code.)5. MCP offered at the end of
ucode configureAfter workspace + agents are set up in the fully-interactive
ucode configure(no--agent/--agents/--workspacesflags), it now asksConfigure MCP servers now?and runs the wizard if accepted. Flag-driven / scripted runs and--dry-runare unaffected — they never prompt.Also added
list_all_mcp_services: a workspace-wide MCP-services walk (catalogs → schemas → mcp-services) under a wall-clock budget, feeding the "MCP services" source.Testing
uv run pytest— green except 3tests/test_cli.py::TestStatus/TestRevertfailures that are pre-existing onmain(verified by stashing this branch's changes) and unrelated to this work.uv run ruff check .,uv run ruff format --check, anduv run ty check src/all pass.This pull request and its description were written by Isaac.