Skip to content

MCP header button: opt-in browser session exposure for third-party agents #8159

Description

@cstns

Third-party MCP agents can only operate on browser tabs that the user has explicitly exposed. Add an MCP button to the page header (similar to the existing Expert button in ExpertButton.vue / PageHeader.vue) that toggles third-party session exposure for the current tab.

When toggled ON:

When toggled OFF (or tab closes):

  • Clear the session from the cache
  • Stop heartbeats and context watchers
  • Unsubscribe from in-flight topics
  • The MQTT connection for first-party chat (if any) is unaffected

The button should be gated by the same AI platform feature flags that gate the Expert button. The toggle state can be persisted to sessionStorage so a page refresh within the same tab restores the exposure without requiring the user to click again.

Depends on #8157 and #8158.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions