Skip to content

feat: promote BrowserOS as MCP with UI improvements#541

Merged
shivammittal274 merged 1 commit intomainfrom
feat/mcp-promotion-ui
Mar 23, 2026
Merged

feat: promote BrowserOS as MCP with UI improvements#541
shivammittal274 merged 1 commit intomainfrom
feat/mcp-promotion-ui

Conversation

@shivammittal274
Copy link
Contributor

Summary

  • Add dismissible MCP promo banner on AI providers page with "New" badge and "66+ tools" highlight, linking to /settings/mcp
  • Add Quick Setup section on MCP settings page with tabbed copy-paste commands for Claude Code, Gemini CLI, Codex, Claude Desktop, OpenClaw (pre-filled with actual server URL)
  • Consolidate MCP settings: move restart button inline with server URL, remove separate MCP Server Settings card (the "Allow External Access" toggle was a no-op — server always binds to 0.0.0.0)
  • Add settings.mcp_promo_banner.clicked analytics event

Test plan

  • Verify MCP promo banner appears on AI providers page between header and templates
  • Verify banner dismiss works (per session, reappears on revisit)
  • Verify "Set up" navigates to /settings/mcp
  • Verify Quick Setup commands contain correct server URL
  • Verify copy buttons work for each client tab
  • Verify restart button works inline with server URL

🤖 Generated with Claude Code

- Add MCP promo banner on AI providers page with "New" badge and
  "66+ tools" highlight, linking to /settings/mcp
- Add Quick Setup section on MCP settings page with copy-paste
  commands for Claude Code, Gemini CLI, Codex, Claude Desktop, OpenClaw
- Consolidate MCP settings: move restart button inline with server URL,
  remove separate MCP Server Settings card
- Add analytics event for promo banner clicks
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 23, 2026

Greptile Summary

This PR promotes BrowserOS as an MCP server by adding a dismissible promo banner on the AI providers page and a new "Quick Setup" section on the MCP settings page with tabbed copy-paste commands for Claude Code, Gemini CLI, Codex, Claude Desktop, and OpenClaw. It also consolidates MCP settings by moving the restart button inline with the server URL and removing the ServerSettingsCard (whose "Allow External Access" toggle was documented as a no-op).

Key changes:

  • McpPromoBanner.tsx — new session-dismissible banner with navigation to /settings/mcp and analytics tracking
  • QuickSetupSection.tsx — new tabbed component rendering pre-filled CLI/JSON config snippets per MCP client
  • MCPServerHeader.tsx — restart logic moved inline; removed title/description/remoteAccessEnabled props; polling health-check loop retained from ServerSettingsCard
  • MCPSettingsPage.tsx — wires QuickSetupSection in place of ServerSettingsCard; dead remoteAccessEnabled state removed
  • ServerSettingsCard.tsx was not deleted despite being fully unreferenced after this PR, and MCP_EXTERNAL_ACCESS_ENABLED_EVENT/MCP_EXTERNAL_ACCESS_DISABLED_EVENT constants remain only referenced by that dead file

Confidence Score: 4/5

  • PR is safe to merge; changes are additive UI improvements with no critical bugs, but ServerSettingsCard.tsx and two analytics constants should be cleaned up before or shortly after merge.
  • All new components are straightforward and well-structured. The primary concern is orphaned dead code (ServerSettingsCard.tsx and two analytics event constants) that violates the project's dead-code policy — no functional regressions. The removal of the restart confirmation dialog is a minor intentional UX simplification rather than a bug. One targeted cleanup pass would bring this to 5/5.
  • packages/browseros-agent/apps/agent/entrypoints/app/mcp-settings/ServerSettingsCard.tsx (should be deleted), packages/browseros-agent/apps/agent/lib/constants/analyticsEvents.ts (dead event constants)

Important Files Changed

Filename Overview
packages/browseros-agent/apps/agent/entrypoints/app/ai-settings/McpPromoBanner.tsx New dismissible promo banner component using session-local state; clean and straightforward, no issues.
packages/browseros-agent/apps/agent/entrypoints/app/mcp-settings/MCPServerHeader.tsx Restart logic moved inline; removes the confirmation dialog that the old ServerSettingsCard had, and dynamic imports are used for the restart path. Dead props removed cleanly.
packages/browseros-agent/apps/agent/entrypoints/app/mcp-settings/MCPSettingsPage.tsx ServerSettingsCard replaced with QuickSetupSection; remoteAccessEnabled state removed cleanly, but ServerSettingsCard.tsx file itself is left as unreferenced dead code.
packages/browseros-agent/apps/agent/entrypoints/app/mcp-settings/QuickSetupSection.tsx New tabbed quick-setup component with per-snippet copy buttons; clean implementation, returns null when serverUrl is unavailable.
packages/browseros-agent/apps/agent/lib/constants/analyticsEvents.ts MCP_PROMO_BANNER_CLICKED_EVENT added correctly, but MCP_EXTERNAL_ACCESS_ENABLED_EVENT and MCP_EXTERNAL_ACCESS_DISABLED_EVENT are now only referenced by the dead ServerSettingsCard.tsx and should be removed.

Sequence Diagram

sequenceDiagram
    participant User
    participant AISettingsPage
    participant McpPromoBanner
    participant MCPSettingsPage
    participant MCPServerHeader
    participant QuickSetupSection
    participant BrowserOSAdapter
    participant ServerHealth

    User->>AISettingsPage: Opens AI Providers page
    AISettingsPage->>McpPromoBanner: Render (session-local dismissed state)
    User->>McpPromoBanner: Clicks "Set up"
    McpPromoBanner->>MCPSettingsPage: navigate('/settings/mcp') + track event

    MCPSettingsPage->>MCPServerHeader: serverUrl, isLoading, onServerRestart
    MCPSettingsPage->>QuickSetupSection: serverUrl
    Note over QuickSetupSection: Renders tabbed CLI/JSON snippets<br/>with copy buttons per client

    User->>MCPServerHeader: Clicks Restart button
    MCPServerHeader->>BrowserOSAdapter: setPref(RESTART_SERVER, true)
    loop every 2s up to 60s
        MCPServerHeader->>ServerHealth: sendServerMessage('checkHealth')
        ServerHealth-->>MCPServerHeader: { healthy: boolean }
    end
    MCPServerHeader-->>User: toast success / error
    MCPServerHeader->>MCPSettingsPage: onServerRestart() → reload URL + tools
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: packages/browseros-agent/apps/agent/entrypoints/app/mcp-settings/MCPSettingsPage.tsx
Line: 7

Comment:
**Dead file: `ServerSettingsCard.tsx` not deleted**

`ServerSettingsCard.tsx` is no longer imported anywhere in the codebase after this change, but the file itself was not deleted. Per the project's dead-code policy, unused files should be removed rather than left orphaned. The file contains ~320 lines of now-unreachable component code.

Please delete `packages/browseros-agent/apps/agent/entrypoints/app/mcp-settings/ServerSettingsCard.tsx`.

**Rule Used:** Remove unused/dead code rather than leaving it in ... ([source](https://app.greptile.com/review/custom-context?memory=9b045db4-2630-428c-95b7-ccf048d34547))

**Learnt From**
[browseros-ai/BrowserOS-agent#126](https://github.com/browseros-ai/BrowserOS-agent/pull/126)

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: packages/browseros-agent/apps/agent/lib/constants/analyticsEvents.ts
Line: 75-81

Comment:
**Dead analytics event constants**

`MCP_EXTERNAL_ACCESS_ENABLED_EVENT` and `MCP_EXTERNAL_ACCESS_DISABLED_EVENT` are now exclusively referenced by `ServerSettingsCard.tsx`, which is itself dead code after this PR. These constants should be removed along with the dead file to avoid confusion about whether external access toggling is still a supported feature.

```suggestion
```
(Remove lines 75–81 entirely once `ServerSettingsCard.tsx` is deleted.)

**Rule Used:** Remove unused/dead code rather than leaving it in ... ([source](https://app.greptile.com/review/custom-context?memory=9b045db4-2630-428c-95b7-ccf048d34547))

**Learnt From**
[browseros-ai/BrowserOS-agent#126](https://github.com/browseros-ai/BrowserOS-agent/pull/126)

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: packages/browseros-agent/apps/agent/entrypoints/app/mcp-settings/MCPServerHeader.tsx
Line: 150-163

Comment:
**Restart fires without confirmation**

The old `ServerSettingsCard` prompted users with an `AlertDialog` before restarting ("It may take 10–30 seconds… any active connections will be temporarily interrupted"). The new inline button calls `handleRestart` directly on click with no confirmation step. Users with active MCP sessions can accidentally interrupt them by mis-clicking the icon button adjacent to the copy button.

Consider adding a `title="Restart server"` tooltip (already present ✓) and either a confirmation dialog or at minimum a debounce/double-click guard to prevent accidental restarts.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "feat: promote BrowserOS as MCP with UI i..." | Re-trigger Greptile

@shivammittal274 shivammittal274 merged commit 890d340 into main Mar 23, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant