Commit f654a50
Improve
* Improve `configure mcp` UX: search wizard, faster/robust discovery & 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
* Offer MCP setup at the end of interactive `ucode configure`
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
* Fix large vertical gap in MCP picker on tall terminals
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
* Increase MCP-services walk budget to 30s
Most MCP services live outside `system.ai`, so the workspace-wide walk
needs more time to enumerate them; too tight a budget silently truncates
the picker list on larger workspaces. Bump the deadline from 8s to 30s.
Co-authored-by: Isaac
---------
Co-authored-by: Achille Negrier <achille.negrier+data@databricks.com>configure mcp UX: search wizard, faster/robust discovery & apply (#225)1 parent eb6dbf3 commit f654a50
7 files changed
Lines changed: 946 additions & 79 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
1358 | 1359 | | |
1359 | 1360 | | |
1360 | 1361 | | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
1361 | 1365 | | |
1362 | 1366 | | |
1363 | 1367 | | |
| |||
1438 | 1442 | | |
1439 | 1443 | | |
1440 | 1444 | | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
1441 | 1449 | | |
1442 | 1450 | | |
1443 | 1451 | | |
| |||
1468 | 1476 | | |
1469 | 1477 | | |
1470 | 1478 | | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
1471 | 1485 | | |
1472 | 1486 | | |
1473 | 1487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
246 | 253 | | |
247 | 254 | | |
248 | 255 | | |
| |||
288 | 295 | | |
289 | 296 | | |
290 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
291 | 303 | | |
292 | 304 | | |
293 | 305 | | |
| |||
1649 | 1661 | | |
1650 | 1662 | | |
1651 | 1663 | | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
1652 | 1668 | | |
1653 | 1669 | | |
1654 | 1670 | | |
| |||
1737 | 1753 | | |
1738 | 1754 | | |
1739 | 1755 | | |
| 1756 | + | |
1740 | 1757 | | |
1741 | 1758 | | |
1742 | 1759 | | |
1743 | 1760 | | |
1744 | | - | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
1745 | 1766 | | |
1746 | 1767 | | |
1747 | 1768 | | |
| |||
1758 | 1779 | | |
1759 | 1780 | | |
1760 | 1781 | | |
1761 | | - | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
1762 | 1785 | | |
1763 | 1786 | | |
1764 | 1787 | | |
| |||
1773 | 1796 | | |
1774 | 1797 | | |
1775 | 1798 | | |
| 1799 | + | |
1776 | 1800 | | |
1777 | 1801 | | |
1778 | 1802 | | |
1779 | 1803 | | |
1780 | 1804 | | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
1781 | 1808 | | |
1782 | 1809 | | |
1783 | 1810 | | |
| |||
1805 | 1832 | | |
1806 | 1833 | | |
1807 | 1834 | | |
| 1835 | + | |
1808 | 1836 | | |
1809 | 1837 | | |
1810 | | - | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
1811 | 1843 | | |
1812 | 1844 | | |
1813 | 1845 | | |
| |||
1871 | 1903 | | |
1872 | 1904 | | |
1873 | 1905 | | |
| 1906 | + | |
| 1907 | + | |
1874 | 1908 | | |
1875 | 1909 | | |
1876 | 1910 | | |
1877 | 1911 | | |
1878 | 1912 | | |
1879 | 1913 | | |
1880 | 1914 | | |
| 1915 | + | |
1881 | 1916 | | |
1882 | 1917 | | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
1883 | 1921 | | |
1884 | 1922 | | |
1885 | 1923 | | |
| |||
1891 | 1929 | | |
1892 | 1930 | | |
1893 | 1931 | | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
1894 | 2037 | | |
1895 | 2038 | | |
1896 | 2039 | | |
| |||
0 commit comments