2447 Add MCP client component with call tool action and SSE/Streamable HTTP connection support#4528
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new MCP Client component that can connect to external MCP servers (via SSE or Streamable HTTP), expose MCP tools to the AI Agent, and call MCP tools directly via an action. It also introduces a new platform-level function type to let tool cluster elements provide Spring AI ToolCallbackProviders.
Changes:
- Add
mcp-clientcomponent module with connection, “Call Tool” action, and “MCP Server Tools” cluster element. - Introduce
ToolCallbackProviderFunctionand update platform/AI-agent code paths to handle tool-callback providers. - Add MCP SDK + Spring AI MCP dependencies and component definition snapshot test resources.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| settings.gradle.kts | Registers the new mcp-client Gradle module. |
| ClusterElementDefinitionServiceImpl.java | Allows tool execution to handle ToolCallbackProviderFunction in addition to ToolFunction. |
| ToolCallbackProviderFunction.java | Adds new platform API for cluster elements that return a ToolCallbackProvider. |
| ParametersFactory.java | Adds convenience overload for creating Parameters from ComponentConnection. |
| mcp-client_v1.json | Snapshot of the generated component definition for tests. |
| McpClientComponentHandlerTest.java | Verifies generated definition matches snapshot. |
| mcp-client.svg | Adds component icon asset. |
| McpClientUtils.java | Implements MCP client creation, auth header customization, tool discovery, and schema-to-properties mapping. |
| McpClientConstants.java | Centralizes MCP client constant keys. |
| McpClientConnection.java | Defines connection + authorization schema for the component. |
| McpClientTool.java | Implements a tool cluster element that exposes MCP tools to the AI Agent. |
| McpClientCallToolAction.java | Implements an action to call a specific MCP tool. |
| McpClientComponentHandler.java | Wires connection/actions/cluster elements into the component definition. |
| build.gradle.kts (mcp-client) | Declares MCP + Spring AI MCP dependencies. |
| AbstractAiAgentChatAction.java | Updates AI Agent tool callback creation to support ToolCallbackProviderFunction. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...omponent-api/src/main/java/com/bytechef/platform/component/definition/ParametersFactory.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/bytechef/platform/component/service/ClusterElementDefinitionServiceImpl.java
Outdated
Show resolved
Hide resolved
...mponents/mcp-client/src/main/java/com/bytechef/component/mcp/client/util/McpClientUtils.java
Outdated
Show resolved
Hide resolved
...mponents/mcp-client/src/main/java/com/bytechef/component/mcp/client/util/McpClientUtils.java
Outdated
Show resolved
Hide resolved
...p-client/src/main/java/com/bytechef/component/mcp/client/connection/McpClientConnection.java
Outdated
Show resolved
Hide resolved
...p-client/src/main/java/com/bytechef/component/mcp/client/connection/McpClientConnection.java
Show resolved
Hide resolved
…e HTTP connection support Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
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
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.



Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com