Skip to content

MCP Server connection closes when clicking to Auto-Approve a MCP toolΒ #7189

@olssonsten

Description

@olssonsten

App Version

3.25.17

API Provider

AWS Bedrock

Model Used

Claude 4 Sonnet

Roo Code Task Links (Optional)

When running a TaskMaster AI MCP server tool call and selecting to auto-approve a tool call, Roo gets an error and the tool call fails.

This could somehow be related to the MCP server itself, but I question why we interact with the MCP Server connection after selecting auto-approve checkbox. Maybe Roo tries to inject something into the stream of the MCP server when the Auto-Approve checkbox is clicked and it shouldn't if the tool is already running.

After auto-approve is set for a tool, it doesn't fail again. This is recreatable with the Taskmaster AI MCP server.

πŸ” Steps to Reproduce

To reproduce:

  1. an MCP tool has started (as indicated by "Running" status on the top of the tool call
  • NOTE: Maybe it's clear already, but in order to be "Running" the user must select to approve the tool call manually
  1. AND Tool call is not set to auto-approved already
  2. AND the user then selects to Auto-Approve this tool call by clicking the checkbox in the tool call itself
  3. THEN MCP connection fails with the error:
    Error executing MCP tool:MCP error -32000: Connection closed
Image

After auto-approve is set for a tool, it doesn't fail again. This is recreatable with the Taskmaster AI MCP server.

πŸ’₯ Outcome Summary

Expected the MCP call to work, but it fails. I suspect that we may try to inject something into the MCP server whenever the user clicks the AutoApprove checkbox and maybe it's an unhandled exception in the MCP server too, but Roo shouldn't send anything when the user selects the AutoApprove checkbox on an existing running tool call.

πŸ“„ Relevant Logs or Errors (Optional)

**Error executing MCP tool:MCP error -32000: Connection closed**

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions