modelcontextprotocol / modelcontextprotocol/ext-apps

Proposal: Guidelines for hosts to implement API for collapsible MCP Apps

Open
#731 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
2.9k
Forks
387
Avg merge
3h 21m
Merged PRs (30d)
6

Description

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 ( https://github.com/anthropics/claude-code/issues/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:

https://github.com/user-attachments/assets/4cab79f3-c449-4e38-b841-c28756d4c6ae

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the recommended solution and the linked Cursor discussion, then compare the stated host behaviors for VSCode, ChatGPT, Claude, and Goose. Done means the project has consensus on a host-facing collapse or accordion API, or documented best-practice guidance; the issue names no files or tests.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.