Class McpSseClientProperties
java.lang.Object
org.springframework.ai.mcp.client.common.autoconfigure.properties.McpSseClientProperties
@ConfigurationProperties("spring.ai.mcp.client.sse")
public class McpSseClientProperties
extends Object
Configuration properties for Server-Sent Events (SSE) based MCP client connections.
These properties allow configuration of multiple named SSE connections to MCP servers. Each connection is configured with a URL endpoint for SSE communication.
Example configurations:
# Simple configuration with default SSE endpoint (/sse)
spring.ai.mcp.client.sse:
connections:
server1:
url: http://localhost:8080
# Custom SSE endpoints - split complex URLs correctly
spring.ai.mcp.client.sse:
connections:
mcp-hub:
url: http://localhost:3000
sse-endpoint: /mcp-hub/sse/cf9ec4527e3c4a2cbb149a85ea45ab01
custom-server:
url: http://api.example.com
sse-endpoint: /v1/mcp/events?token=abc123&format=json
# How to split a full URL:
# Full URL: http://localhost:3000/mcp-hub/sse/token123
# Split as: url: http://localhost:3000
# sse-endpoint: /mcp-hub/sse/token123
- Since:
- 1.0.0
- Author:
- Christian Tzolov
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordParameters for configuring an SSE connection to an MCP server. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the map of configured SSE connections.
-
Field Details
-
CONFIG_PREFIX
- See Also:
-
-
Constructor Details
-
McpSseClientProperties
public McpSseClientProperties()
-
-
Method Details
-
getConnections
Returns the map of configured SSE connections.- Returns:
- map of connection names to their SSE parameters
-