Background
The Apps tab is currently always present in the navigation, even when the connected server exposes no MCP App tools. In that case the Apps screen is empty/unusable, which is confusing — the tab should only appear when there's something to show.
The pieces needed already exist in clients/web/src/components/views/InspectorView/InspectorView.tsx:
appTools is already computed by filtering the tool list with isAppTool (from @inspector/core/mcp/apps.js, which detects _meta.ui.resourceUri):
const appTools = useMemo<Tool[]>(() => tools.filter((t) => { try { return isAppTool(t); } catch { return false; } }), [tools]);
ALL_TABS unconditionally includes "Apps", and availableTabs only removes Network for stdio:
const availableTabs = useMemo<string[]>(() => {
...
return isStdio ? ALL_TABS.filter((t) => t !== NETWORK_TAB) : ALL_TABS;
}, [...]);
Scope
- Gate the
"Apps" tab on appTools.length > 0: exclude it from availableTabs when the current tool list contains no MCP App tools. (Compute appTools before availableTabs, or inline the check, so availableTabs can depend on it.)
- The tab should appear/disappear reactively as the tool list changes (e.g. after a
tools/list_changed refresh or switching servers).
- Existing fallback logic already redirects
activeTab to Servers when the selected tab isn't in availableTabs, so a user sitting on Apps when it disappears lands somewhere valid — verify this still holds.
- Consider the "sandbox unavailable" state: today the Apps screen renders an "MCP Apps are unavailable" message. Decide whether the tab should still be hidden when there are app tools but no sandbox — recommended: keep showing the tab when app tools exist (so the unavailable message is reachable), and only hide it when there are zero app tools.
Acceptance criteria
- When the connected server exposes no MCP App tools, the Apps tab is not shown and its screen is not reachable.
- When the server exposes one or more MCP App tools, the Apps tab appears as today.
- The tab updates live as the tool list changes (list-changed refresh, server switch).
- No regression to the existing
activeTab-fallback behavior.
- Unit tests cover both states (no app tools → no Apps tab; with app tools → Apps tab present);
npm run validate, test:integration, and test:storybook pass.
References
clients/web/src/components/views/InspectorView/InspectorView.tsx (ALL_TABS, availableTabs, appTools)
core/mcp/apps.ts (isAppTool)
clients/web/src/components/screens/AppsScreen/AppsScreen.tsx
Background
The Apps tab is currently always present in the navigation, even when the connected server exposes no MCP App tools. In that case the Apps screen is empty/unusable, which is confusing — the tab should only appear when there's something to show.
The pieces needed already exist in
clients/web/src/components/views/InspectorView/InspectorView.tsx:appToolsis already computed by filtering the tool list withisAppTool(from@inspector/core/mcp/apps.js, which detects_meta.ui.resourceUri):ALL_TABSunconditionally includes"Apps", andavailableTabsonly removesNetworkfor stdio:Scope
"Apps"tab onappTools.length > 0: exclude it fromavailableTabswhen the current tool list contains no MCP App tools. (ComputeappToolsbeforeavailableTabs, or inline the check, soavailableTabscan depend on it.)tools/list_changedrefresh or switching servers).activeTabtoServerswhen the selected tab isn't inavailableTabs, so a user sitting on Apps when it disappears lands somewhere valid — verify this still holds.Acceptance criteria
activeTab-fallback behavior.npm run validate,test:integration, andtest:storybookpass.References
clients/web/src/components/views/InspectorView/InspectorView.tsx(ALL_TABS,availableTabs,appTools)core/mcp/apps.ts(isAppTool)clients/web/src/components/screens/AppsScreen/AppsScreen.tsx