-
Notifications
You must be signed in to change notification settings - Fork 64
feat: check if mcp is supported #1460
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
Conversation
@@ -39,7 +40,7 @@ export const QAgenticChatServer = | |||
}, | |||
], | |||
}, | |||
mcpServers: true, | |||
mcpServers: isMCPSupported(params), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will disable all the UI buttons? Also, please check to make sure tools is not available in chat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will disable all the UI buttons?
yes, this will disable the UI button.
Also, please check to make sure tools is not available in chat.
what to check? could you please elaborate it? thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please check to make sure tools is not available in chat.
directly return false from isMCPSupported and test that tools are not available in chat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please streamline the logic so that the client controls whether or not mcp is enabled. You do this by passing a bool value through the q capabilities portion of the LSP initialization payload.
sequenceDiagram
participant toolkit
participant flare
participant chatui
Note over toolkit: User Starts IDE
Note over toolkit: Toolkit launches Flare
toolkit ->>+ flare: LSP Initialization request
alt <br/>IF client set aws capability 'mcpServers' to true<br/>(You MUST update extensions to pass true in order to enable MCP)<BR/>(Your internal testers need to use this new extension version)
Note over flare: Flare enables MCP
Note over flare: initialization response indicates<br/>mcpServers: true<br/>as server capability
else ELSE IF client set 'mcpServers' to false<br/>This represents your older extension versions.
Note over flare: Flare disables MCP
Note over flare: initialization response indicates<br/>mcpServers: false<br/>as server capability
end
flare ->>-toolkit: LSP initialization response
Note over toolkit: Toolkit retains the initialization response,<br/>which contains server capabilities.<br/>the server capability mcpServers will be used for starting chat UI.
Note over toolkit: User opens Chat UI<br/><br/>mcpServers is set based on the returned server capability value
toolkit ->> chatui: createChat {<br/>pairProgrammingAcknowledged: bool, <br/>agenticMode: bool, <br/>mcpServers: bool, ... }
Note over chatui: Chat UI opens up
Note over chatui: Chat UI shows MCP things if mcpServers is true
Thanks for this workflow chart, will update the logic in a follow up pr. |
this is the follow up pr: #1473 |
Problem
Solution
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.