Skip to content

2447 Add MCP client component with call tool action and SSE/Streamable HTTP connection support#4528

Open
ivicac wants to merge 2 commits intomasterfrom
2447
Open

2447 Add MCP client component with call tool action and SSE/Streamable HTTP connection support#4528
ivicac wants to merge 2 commits intomasterfrom
2447

Conversation

@ivicac
Copy link
Contributor

@ivicac ivicac commented Mar 11, 2026

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-client component module with connection, “Call Tool” action, and “MCP Server Tools” cluster element.
  • Introduce ToolCallbackProviderFunction and 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.

ivicac and others added 2 commits March 17, 2026 23:00
…e HTTP connection support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants