enhance: how to connect ai client updates#7000
Conversation
There was a problem hiding this comment.
⚠️ Not ready to approve
There are confirmed issues that can break quick-install deep links and corrupt persisted AI-client preferences (empty/invalid localStorage values).
Pull request overview
This PR enhances the MCP “Connect” experience in the SvelteKit UI by adding client-specific connection helpers (magic links + CLI commands) and introducing a per-device “preferred AI clients” setting that controls which helpers are shown.
Changes:
- Add a “Set Preferred Client(s)” dialog on the MCP Servers page and persist the selection in
userDeviceSettings. - Update the connect modal to show “Quick Install” (Cursor/VS Code deep links) and “Install via CLI” (Claude/Codex commands) based on preferences.
- Extend shared UI primitives/utilities (CopyField slots + UTF-8 Base64 encoding) to support the new connect UX.
File summaries
| File | Description |
|---|---|
| ui/user/src/routes/mcp-servers/+page.svelte | Adds a dialog to select and save preferred AI clients. |
| ui/user/src/lib/stores/userDeviceSettings.svelte.ts | Persists AI client preferences to localStorage and initializes from it. |
| ui/user/src/lib/format.ts | Adds UTF-8 → Base64 helper used for magic-link config encoding. |
| ui/user/src/lib/constants.ts | Introduces AiClient enum and common client metadata/constants. |
| ui/user/src/lib/components/mcp/HowToConnect.svelte | Renders magic links + CLI commands (plus doc links) for connecting to MCP servers. |
| ui/user/src/lib/components/mcp/ConnectToServer.svelte | Passes connection URL + display name into HowToConnect and switches URL display to CopyField. |
| ui/user/src/lib/components/CopyField.svelte | Adds snippet support for custom “preContent” and light styling customization hooks. |
Copilot's findings
- Files reviewed: 7/7 changed files
- Comments generated: 5
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
EntelligenceAI PR SummaryIntroduces dynamic AI client integration into the MCP connection flow, including magic link and CLI command installation support, AI client preference persistence, and supporting infrastructure refactors.
Confidence Score: 3/5 - Review RecommendedLikely safe but review recommended — the PR successfully introduces dynamic AI client integration with magic link and CLI command support, and the new code appears structurally sound. However, a pre-existing unresolved concern about Key Findings:
Files requiring special attention
|
e1c7b67 to
baa2832
Compare
* chore: fetch full git history in image build workflow (obot-platform#6988) * chore(deps): bump webpack-dev-server (obot-platform#6989) Bumps the npm_and_yarn group with 1 update in the /docs directory: [webpack-dev-server](https://github.com/webpack/webpack-dev-server). Updates `webpack-dev-server` from 5.2.4 to 5.2.5 - [Release notes](https://github.com/webpack/webpack-dev-server/releases) - [Changelog](https://github.com/webpack/webpack-dev-server/blob/main/CHANGELOG.md) - [Commits](webpack/webpack-dev-server@v5.2.4...v5.2.5) --- updated-dependencies: - dependency-name: webpack-dev-server dependency-version: 5.2.5 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * enhance: allow OAuth clients that don't supply resource to connect (obot-platform#6983) In order to know which MCP server the MCP client is trying to connect to, they should send a resource parameter with the authorize request. Not all clients do this. This change introduces a way to alter the metadata endpoints so that we can still determine which MCP server the client is connecting to when they don't send a resource parameter. Signed-off-by: Donnie Adams <donnie@obot.ai> * chore: registry API: use only the short description (obot-platform#6990) Signed-off-by: Grant Linville <grant@obot.ai> * chore: drop python and pip from image builds (obot-platform#6996) * enhance: add a new authentication complete screen (obot-platform#6991) This screen finishes the MCP OAuth flow so that we can control what the user sees when the OAuth process completes. This fixes issues when we redirect back to apps on a user's computer. This change also removes the old login complete screen in favor of a consistent experience. That is, if a user uses `obot login`, then they will see this new "authentication complete" screen with the "you can now close this window" text. Signed-off-by: Donnie Adams <donnie@obot.ai> * chore: clean up image builds (obot-platform#6992) Clean up the Docker image build by removing legacy dependencies and consolidating the duplicated OSS/Enterprise build pipeline into a single job. - Drop the `build-pgvector` stage and the pgvector extension install - Remove unused runtime packages: `git`, `npm`, `nodejs`, `sqlite`, `sqlite-dev`, `libreoffice`, `perl-utils` - Stop copying the Node build of the UI (`ui/user/build-node`) - Reorganize docker instructions for clarity - The `obot-enterprise` image is now identical to the OSS `obot` image, so its separate `enterprise-build`/`enterprise-image-scan` jobs are removed - The single `build` job now also publishes/signs the `-enterprise` tag for backwards compatibility, and tags it `latest` on releases - Rename `oss-build` → `build` and `oss-image-scan` → `image-scan` Addresses obot-platform#6997 Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com> * feat: add support for CIMD (obot-platform#6964) This change adds support for Client ID Metadata Documents for Obot when it is functioning as an OAuth Authorization Server. That is, instead of clients dynamically registering, clients can use CIMD to request auth tokens on a user's behalf. Additionally, if an authorization server for an MCP server supports CIMD, then Obot will use it to get access tokens. This change also adds an exception for this because claude-code doesn't advertise itself as a native application_type, but should be treated as one. Signed-off-by: Donnie Adams <donnie@obot.ai> * feat: admin ability to add app notification banner (obot-platform#6999) * feat: admin ability to add app notification banner * Update pkg/api/handlers/appnotifications.go Co-authored-by: Donnie Adams <donald.g.adams@me.com> * Update pkg/api/handlers/appnotifications.go Co-authored-by: Donnie Adams <donald.g.adams@me.com> * fix: hydration warning fix for InfoTooltip * adjust logic in page.ts * address peer review: rename singleton app-notification & remove metadata property * rename appnotifications -> appnotification & nits * go generate lint * fix: on cancel, reset to what's in appnotificationstore, fallback to data.appNotification * address a few more app notification singular noun verbiage * fix: add check valid date for dismissedAt --------- Co-authored-by: Donnie Adams <donald.g.adams@me.com> * chore: dependabot, dompurify, & lucide-svelte deprecation (obot-platform#7003) * fix: only check for a valid license once per day (obot-platform#7011) Previously, we would check for a valid license on startup and every hour after that. This change checks on startup and once per day. Additionally, an API endpoint is added to allow users to manually check their license once every 5 minutes. Signed-off-by: Donnie Adams <donnie@obot.ai> * fix: sort devices initally by scannedAt descending (obot-platform#7008) * fix: sort devices initally by scannedAt descending * derived for getTableUrlParamsFilters * fix: save sidebar scroll state on navigation for sidebar in Layout (obot-platform#7013) * enhance: how to connect ai client updates (obot-platform#7000) * enhance: how to connect ai client updates * copilot review comments * fix: length check & command update * fix: review comments * fix: id instead of name for command * fix: create name for command * add support for no preference * address copilot review * chore: migrate mcp audit logs to support local agent audit logs (obot-platform#6928) Signed-off-by: Grant Linville <grant@obot.ai> * Revert "chore: migrate mcp audit logs to support local agent audit logs (obot-platform#6928)" (obot-platform#7030) This reverts commit 0f41a83. * feat: add ability to configure MCP server on first connect (obot-platform#7007) Before this change, when a user connected to an MCP server for the first time through an MCP client without first configuring it in the Obot UI, the connection would fail if the server had required configuration. After this change, the user will be able to provide the required configuration during the connection. In fact, connecting to an MCP server in the UI will just show the URL and the user will have to configure it on first connection. Signed-off-by: Donnie Adams <donnie@obot.ai> Co-authored-by: Ivy <ivy.jeong@gmail.com> * enhance: make redirect countdown dynamic (obot-platform#7036) This change will make the "redirect in 3 seconds" text count down until the redirect actually happens. Signed-off-by: Donnie Adams <donnie@obot.ai> * enhance: more logging around successful license validation (obot-platform#7037) Signed-off-by: Donnie Adams <donnie@obot.ai> * docs: fix private IP MCP env var (obot-platform#7035) * chore: bump images for nanobot stdio fix (obot-platform#7027) Signed-off-by: Donnie Adams <donnie@obot.ai> * fix: show partial pat in edit of mcp catalog source url (obot-platform#7019) * fix: show partial pat on edit of mcp catalog source URL * changes * update UI to show when PAT needs updating after preexisting sourceURL change lint * fix: for len <= 4 of pat, just return the mask * check for explicit clear token action made by user * use input readonly instead of p * chore: remove redunant check (obot-platform#7040) The ValidationCodeNoMachine error is also a ErrLicenseNotActivated error, so we don't need redundant checks. Signed-off-by: Donnie Adams <donnie@obot.ai> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Donnie Adams <donnie@obot.ai> Signed-off-by: Grant Linville <grant@obot.ai> Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com> Co-authored-by: Nick Hale <4175918+njhale@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Donnie Adams <donnie@obot.ai> Co-authored-by: Grant Linville <grant@obot.ai> Co-authored-by: Ivy <ivy@acorn.io> Co-authored-by: Donnie Adams <donald.g.adams@me.com> Co-authored-by: Ivy <ivy.jeong@gmail.com>
Addresses #6852