Skip to content

Proposal: Guidelines for hosts to implement a API for collapsible MCP Apps #731

Description

@hydrosquall

Motivation

If an agent makes multiple tool calls that each use MCP apps, the agent's answer can be pushed out of view. This was a problem with MCP tool calls/responses before, which led hosts to provide collapsible "accordion" UI for collapsing tool calls, thinking messages, and responses, allowing for progressive disclosure of detail. Users have found this useful enough in desktop apps like Claude.ai that they requested similar behaviors for CLI too ( anthropics/claude-code#40428 ).

After observing this problem when agents call data fetching tools that are annotated with MCP App resources (this can happen when the agent calls the tool with wrong or subpar arguments on the first call, and retries several times in row), I think suppressing tall/verbose outputs unless the user interacts to inspect them could make sense for MCP apps too.

Recommended solution

  1. If other hosts besides Cursor agree (notably ChatGPT / Claude / VSCode, Goose) that allowing MCP apps to be collapsed is desirable, they could add this feature or provide recommendations on a preferred way to handle multiple tool calls.
  2. We document this pattern as a best practice for any new hosts to implement so that MCP servers don't re-implement this behavior

Proof of concept

1 host, Cursor, taken the position of allowing MCP App iframes to be collapsed by default . However, from what I've seen, the other MCP app hosts (VSCode, ChatGPT, Claude) do this yet. This leaves MCP tools that want to manage having users flooded with iframes implement a custom "collapsible accordion" state that is not as native or efficient compared to if the host provides a native collapse /accordion API. See an example:

2026-07-28_20-23-07.mp4

Alternatives

  1. If we do nothing, each MCP app / server will managing collapsed state in a custom way
  2. We could optionally give agents a metadata on tool responses to control if this particular tool call is meant to be expanded/collapsed

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions