Repository navigation
Replies: 1 comment
|
Spring AI supports this directly through a map of named connections; you do not need to create separate application contexts or put multiple URLs in one property. For the current Streamable HTTP transport: spring:
ai:
mcp:
client:
type: SYNC
streamable-http:
connections:
inventory:
url: https://inventory.example.com
endpoint: /mcp
billing:
url: https://billing.example.com
endpoint: /mcpEach entry under @Autowired
private List<McpSyncClient> mcpSyncClients;If tool callbacks are enabled (the default), tools discovered from all configured clients are exposed through the auto-configured For a server still using the older SSE transport, use the same named-map pattern under Reference: https://docs.spring.io/spring-ai/reference/api/mcp/mcp-client-boot-starter-docs.html One version-related detail: Streamable HTTP is the current transport; SSE is deprecated in Spring AI 2.x, so match the configuration block to the server protocol and the Spring AI version used by the project. |
Uh oh!
There was an error while loading. Please reload this page.
How to configure multiple MCP endpoint URLs in a project?
All reactions