-
Notifications
You must be signed in to change notification settings - Fork 11
Add Test Connection Tool #971
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❌ 1 Tests Failed:
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
5 tasks
1ab3618 to
551acc1
Compare
c0d6f0c to
33971e7
Compare
- Add /mcp/test-connection endpoint to verify MCP authentication - Implement test_mcp_authentication service function using MCPAgent - Add TestMCPConnectionRequest and TestMCPConnectionResponse schemas - Create mcp_test_auth_prompt.jinja2 template for authentication testing - Parse LLM response to determine authentication status (Yes/No)
- Change TestMCPConnectionResponse to use string is_authenticated (Yes/No) and message - Update prompt template to return JSON format with is_authenticated and message - Simplify service function to directly parse and return JSON from final_answer - Remove complex text parsing logic in favor of direct JSON parsing
- Add testMCPConnection method to ServicesClient - Add test connection button in MCPConnectionDialog for both create and edit modes - In create mode, temporarily create tool for testing and clean up on failure - Display test results with success/error alerts showing authentication status and message - Handle tool creation when test succeeds in create mode
…Dialog and MCP Connect Dialog
Allow testing MCP connections using provider_type_id, credentials, and tool_metadata parameters instead of requiring a tool in the database. - Backend: Add parameter-based testing support to test_mcp_authentication() - Frontend: Simplify MCPConnectionDialog to use direct parameters - Maintains backward compatibility with tool_id-based calls
Add validation to require successful connection test before saving MCP tools, matching the models workflow.
33971e7 to
3f72125
Compare
Contributor
|
@EmanueleDeRossi1 thanks for implementing this feature, it makes it more convenient and easy for user! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces changes from the
feature/add-test-connection-toolbranch.📝 Summary
This PR introduces a “Test Connection” feature for MCP tools — users can now verify their MCP credentials before saving a tool.
Backend: new POST
/mcp/test-connectionendpoint. The MCP agent attempts to authenticate using the provided credentials and checks for a 401 Unauthorized response. Success or failure is returned accordingly.Frontend: added a “Test Connection” button in the MCP connection dialog. Inline alerts show success or error. Testing the MCP configuration is now required: users can not save the MCP tool without having successfully tested the connection.
Smaller changes: Removed the robot icon from the button and removed duplicate toast notifications for cleaner UX.
📁 Files Changed ( 8 files)
📋 Commit Details