From 64a6bcc39bcb84b5838013dcf5ef4e60d75098ce Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 8 Dec 2025 13:20:20 -0800 Subject: [PATCH] show mcp messages in cli output (#7989) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Max Paulus 🥪 --- .changeset/stale-mirrors-unite.md | 5 +++++ cli/pkg/cli/task/manager.go | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .changeset/stale-mirrors-unite.md diff --git a/.changeset/stale-mirrors-unite.md b/.changeset/stale-mirrors-unite.md new file mode 100644 index 0000000000..a70bf41127 --- /dev/null +++ b/.changeset/stale-mirrors-unite.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +show mcp output in cline cli conversation diff --git a/cli/pkg/cli/task/manager.go b/cli/pkg/cli/task/manager.go index c56b32e16c..0aa91cf23e 100644 --- a/cli/pkg/cli/task/manager.go +++ b/cli/pkg/cli/task/manager.go @@ -984,6 +984,33 @@ func (m *Manager) processStateUpdate(stateUpdate *cline.State, coordinator *Stre coordinator.MarkProcessedInCurrentTurn(msgKey) } + case msg.Say == string(types.SayTypeMcpServerResponse): + msgKey := fmt.Sprintf("%d", msg.Timestamp) + if !coordinator.IsProcessedInCurrentTurn(msgKey) { + fmt.Println() + m.displayMessage(msg, false, false, i) + + coordinator.MarkProcessedInCurrentTurn(msgKey) + } + + case msg.Say == string(types.SayTypeMcpNotification): + msgKey := fmt.Sprintf("%d", msg.Timestamp) + if !coordinator.IsProcessedInCurrentTurn(msgKey) { + fmt.Println() + m.displayMessage(msg, false, false, i) + + coordinator.MarkProcessedInCurrentTurn(msgKey) + } + + case msg.Say == string(types.SayTypeUseMcpServer): + msgKey := fmt.Sprintf("%d", msg.Timestamp) + if !coordinator.IsProcessedInCurrentTurn(msgKey) { + fmt.Println() + m.displayMessage(msg, false, false, i) + + coordinator.MarkProcessedInCurrentTurn(msgKey) + } + case msg.Say == string(types.SayTypeCheckpointCreated): msgKey := fmt.Sprintf("%d", msg.Timestamp) if !coordinator.IsProcessedInCurrentTurn(msgKey) {