8000 stderr output from MCP server confuses Roo's MCP server configuration view · Issue #1287 · RooVetGit/Roo-Code · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

stderr output from MCP server confuses Roo's MCP server configuration view #1287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ksze opened this issue Mar 1, 2025 · 8 comments · Fixed by #1441
Closed

stderr output from MCP server confuses Roo's MCP server configuration view #1287

ksze opened this issue Mar 1, 2025 · 8 comments · Fixed by #1441
Labels
bug Something isn't working in progress Actively being worked on

Comments

@ksze
Copy link
ksze commented Mar 1, 2025

Which version of the app are you using?

v3.7.8

Which API Provider are you using?

OpenRouter

Which Model are you using?

Claude 3.7 Sonnet

What happened?

When an MCP server spits output on stderr, Roo gets confused. It will show both signs that the MCP server is working and signs that the MCP server is not working. Below is an example involving the kagi MCP server. Numbers between parenthesis correspond to marked spots in red in the screenshots.

Signs that the MCP server is not working:

  • Roo will display the stderr output (1) in the MCP server configuration view, plus a "Retry Connection" button.
  • Roo will not show the panel that lists the tools and resources exposed by the MCP server. Contrast with the panel for the tavily-mcp MCP server (2).

Signs that the MCP server is working:

  • Roo will still show a green dot (3) for the MCP server, indicating that it is connected.
  • If I check the system prompt, the MCP server's tools are still listed (4).
  • I can ask the LLM to use the MCP server in question and it will actually attempt to use the MCP server (5).

Image

Image

Image

Steps to reproduce

  1. Configure an MCP server that will output to stderr even totally benign INFO level log message - e.g. kagi (https://github.com/kagisearch/kagimcp);
  2. Watch Roo show conflicting signs of whether the MCP server works or not.

Relevant API REQUEST output

**User:**

<task>
Search the web using the `kagi` MCP server to see how to properly configure VS Code for Microsoft C++ using the "C/C++ extention for VS Code".
</task>
<environment_details>
# VSCode Visible Files
../../../../.vscode-server/data/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json

# VSCode Open Tabs
../../../../.vscode-server/data/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json

# Current Time
3/1/2025, 2:23:19 AM (undefined, UTC-7:00)

# Current Context Size (Tokens)
(Not available)

# Current Mode
<slug>ask</slug>
<name>Ask</name>


NOTE: You are currently in 'Ask' mode which only allows read-only operations. To write files or execute commands, the user will need to switch to 'Code' mode. Note that only the user can switch modes.

# Current Working Directory (<censored>) Files
</environment_details>

---

**Assistant:**

<use_mcp_tool>
<server_name>kagi</server_name>
<tool_name>search</tool_name>
<arguments>
{
  "queries": [
    "Configure VS Code for Microsoft C++ with C/C++ extension step by step",
    "C/C++ extension setup guide for Visual Studio Code"
  ]
}
</arguments>
</use_mcp_tool>

---

**User:**

[use_mcp_tool for 'kagi'] Result:
Error: 401 Client Error: Unauthorized for url: https://kagi.com/api/v0/search?q=Configure+VS+Code+for+Microsoft+C%2B%2B+with+C%2FC%2B%2B+extension+step+by+step&limit=10
<environment_details>
# VSCode Visible Files
../../../../.vscode-server/data/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json

# VSCode Open Tabs
../../../../.vscode-server/data/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json

# Current Time
3/1/2025, 2:24:02 AM (undefined, UTC-7:00)

# Current Context Size (Tokens)
12,141 (19%)

# Current Mode
<slug>ask</slug>
<name>Ask</name>


NOTE: You are currently in 'Ask' mode which only allows read-only operations. To write files or execute commands, the user will need to switch to 'Code' mode. Note that only the user can switch modes.
</environment_details>

Additional context

Note that in the API request output, you see the kagi MCP server replying with "Error: 401 Client Error: Unauthorized". That's only because I'm out of search credit on the Kagi API platform. As far as the MCP server itself is concerned, it's actually up and running.

What I wish to see changed

Because the MCP server is actually up and running, and Roo can actually connect to it, Roo should still show the panel that lists the tools and resources of the MCP server. Also, there is no need to display the "Retry Connection" button because, like I said, Roo is actually connected to the MCP server. Regarding the question of whether or not to still display the stderr output in the MCP server configuration view, that's debatable and I have no preference.

@ksze ksze added the bug Something isn't working label Mar 1, 2025
@ksze
Copy link
8000
Author
ksze commented Mar 1, 2025

BTW, I have created a related issue in the modelcontextprotocol/specifications repo because, frankly, I believe this is a point of ambiguity in the MCP specs: modelcontextprotocol/modelcontextprotocol#177

refactorthis pushed a commit to refactorthis/Roo-Code that referenced this issue Mar 2, 2025
@hannesrudolph hannesrudolph added the actionable Confirmed and ready to work on label Mar 3, 2025
@hannesrudolph hannesrudolph moved this to To triage in Roo Code Roadmap Mar 4, 2025
@hannesrudolph hannesrudolph moved this from To triage to Backlog in Roo Code Roadmap Mar 4, 2025
@hannesrudolph
Copy link
Collaborator

Is there a reason why we need to have any output from the MCP showing up there anyways? I think that if it is running (green) then it should block all stderr output from the MCP server.

@hannesrudolph hannesrudolph moved this from Backlog to Ready in Roo Code Roadmap Mar 4, 2025
@ksze
Copy link
Author
ksze commented Mar 5, 2025

Is there a reason why we need to have any output from the MCP showing up there anyways? I think that if it is running (green) then it should block all stderr output from the MCP server.

I think the only time we want to see stderr is to actually debug the MCP server (or the interaction between Roo and the MCP server). We probably don't need to see the stderr when the MCP server is working correctly. Maybe add a debug option to reveal the stderr output?

@hannesrudolph
Copy link
Collaborator

@ksze Can you make a PR for this?

@hannesrudolph hannesrudolph moved this from Issue [Ready] to Issue [Needs Scoping] in Roo Code Roadmap Mar 6, 2025
@hannesrudolph hannesrudolph moved this from Issue [Needs Scoping] to Issue [Ready] in Roo Code Roadmap Mar 6, 2025
@hannesrudolph
Copy link
Collaborator

PLAN: Block MCP stderr output from from showing up in Roo if the MCP is started.

@ksze
Copy link
Author
ksze commented Mar 6, 2025

PLAN: Block MCP stderr output from from showing up in Roo if the MCP is started.

@hannesrudolph Actually I thought of outputting any stderr in a dedicated tab right next to the "tools" and "resources" tabs, if the MCP server is connected. However, I can't figure out how the "tools" VSCodePanelTab is associated with the "tools-view" VSCodePanelView in the ServerRow of webview-ui/src/components/mcp/McpView.tsx

As in, how does the renderer know that the "tools-view" VSCodePanelView needs to be displayed when I click on the "tools" VSCodePanelTab?

@hannesrudolph
Copy link
Collaborator

@hannesrudolph Actually I thought of outputting any stderr in a dedicated tab right next to the "tools" and "resources" tabs, if the MCP server is connected. However, I can't figure out how the "tools" VSCodePanelTab is associated with the "tools-view" VSCodePanelView in the ServerRow of webview-ui/src/components/mcp/McpView.tsx

As in, how does the renderer know that the "tools-view" VSCodePanelView needs to be displayed when I click on the "tools" VSCodePanelTab?

I think that is a good possible future enhancement (separate Pull Request) but I think this bug needs to first be fixed with a more simple approach.

ksze added a commit to ksze/Roo-Code that referenced this issue Mar 7, 2025
ksze added a commit to ksze/Roo-Code that referenced this issue Mar 7, 2025
…places for the correct display of an MCP server row
@mrubens mrubens moved this from Issue [Unassigned] to Issue [Needs Scoping] in Roo Code Roadmap Mar 9, 2025
@hannesrudolph hannesrudolph moved this from Issue [Needs Scoping] to Issue [In Progress] in Roo Code Roadmap Mar 10, 2025
@hannesrudolph hannesrudolph added the in progress Actively being worked on label Mar 10, 2025
@hannesrudolph hannesrudolph removed the actionable Confirmed and ready to work on label Mar 17, 2025
@robertheadley
Copy link

I summited #2722 though it might be beyond my ability to actually get it checked in due to limited knowledge, but yeah, if you give stderror and stdout a place to be displayed, it works much better.

cte added a commit that referenced this issue May 6, 2025
@cte cte closed this as completed in #1441 May 6, 2025
@github-project-automation github-project-automation bot moved this from Issue [In Progress] to Done in Roo Code Roadmap May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress Actively being worked on
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants
0