Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Aug 28, 2025

Summary

This PR adds a new MCP (Model Context Protocol) button to the ChatTextArea component, positioned to the left of the Codebase Indexing button.

Changes

  • Added MCP Servers button with Server icon from lucide-react
  • Button is conditionally rendered only when MCP servers are installed
  • Clicking the button navigates to the MCP screen
  • Red error indicator appears when any MCP server is erroring (disconnected and not disabled)
  • Added translation key for the MCP button tooltip

Implementation Details

  • The button follows the same styling patterns as other buttons in the ChatTextArea
  • Uses the existing message passing system to trigger navigation to the MCP tab
  • Error detection logic checks for servers with status 'disconnected' that are not intentionally disabled
  • All tests pass successfully

Testing

  • ✅ All existing tests pass
  • ✅ Linting passes
  • ✅ Type checking passes

Screenshots

The button appears between the Slash Commands button and the Codebase Indexing button when MCPs are installed.

Fixes: Slack request to add MCP button to chat interface


Important

Adds an MCP button to ChatTextArea with error indicator for disconnected servers, including a new translation key for the tooltip.

  • Behavior:
    • Adds MCP button to ChatTextArea with Server icon, conditionally rendered when MCP servers are present.
    • Clicking navigates to MCP screen; red error indicator for disconnected servers.
  • Styling:
    • Follows existing button styling in ChatTextArea.
  • Localization:
    • Adds mcpServers translation key in chat.json for button tooltip.
  • Testing:
    • All tests, linting, and type checking pass.

This description was created by Ellipsis for 7ade8e4. You can customize this summary. It will automatically update as commits are pushed.

- Added MCP Servers button to the left of the Codebase Indexing button
- Button is hidden when no MCP servers are installed
- Clicking the button navigates to the MCP screen
- Red indicator appears when any MCP server is erroring (disconnected and not disabled)
- Added translation key for the MCP button tooltip
@roomote roomote bot requested review from cte, jr and mrubens as code owners August 28, 2025 23:22
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request UI/UX UI/UX related or focused labels Aug 28, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed my own code and found it surprisingly readable. Must be a bug.

taskHistory,
clineMessages,
commands,
mcpServers,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mcpServers property is destructured from useExtensionState() but doesn't appear to be typed in the hook's return type. Could this cause TypeScript errors if strict typing is enabled? Consider adding the proper type definition to ensure type safety.

{mcpServers.some(
(server) => server.status === "disconnected" && !server.disabled,
) && (
<span
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error indicator (red dot) doesn't have any accessible text for screen reader users. Consider adding an aria-label to the button or the error indicator span to improve accessibility:

Suggested change
<span
{mcpServers.some(
(server) => server.status === "disconnected" && !server.disabled,
) && (
<span
aria-label="MCP server error"
className={cn(
"absolute top-1 right-1 w-1.5 h-1.5 rounded-full",
"bg-red-500",
)}
/>
)}

"cursor-pointer",
)}>
<Server className="w-4 h-4" />
{mcpServers.some(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For better readability, consider extracting the error detection logic to a variable:

Suggested change
{mcpServers.some(
const hasErroringServers = mcpServers.some(
(server) => server.status === "disconnected" && !server.disabled,
);
{hasErroringServers && (

},
"enhancePromptDescription": "The 'Enhance Prompt' button helps improve your prompt by providing additional context, clarification, or rephrasing. Try typing a prompt in here and clicking the button again to see how it works.",
"addImages": "Add images to message",
"mcpServers": "MCP Servers",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "mcpServers" translation key should be added to all other locale files to maintain i18n consistency. Currently it's only in the English locale. Could we ensure all locale files are updated?

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Aug 28, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Aug 29, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Aug 29, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Draft / In Progress] in Roo Code Roadmap Sep 2, 2025
@daniel-lxs daniel-lxs marked this pull request as draft September 2, 2025 15:14
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 23, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Draft / In Progress size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants