Creating new tool groups from (external) MCP server (based on Spring AI 1.1.0 branch)
Hi, trying to follow instructions here: https://github.com/embabel/embabel-agent/blob/main/embabel-agent-docs/src/main/asciidoc/reference/tools/page.adoc
Using branch spring-ai-1.1.0-M3 in repo embabel-agent-examples and declaring my MCP server like this (in the embabel Agent app)
..and creating a ToolGroup like this:
the tools exposed (verified and recognized by other clients like MCP Inspector and my own MCP Client Spring Host Application) are not detected by embabel:
Meanwhile I managed to create a bean that provides my MCP tools, and the Agent uses my new ToolGroup correctly, nice.
But I could only make this work, when the remote MCP server has protocol stateless
Using protocol streamable makes tools invisible; is this intended or not yet implemented?
@Configuration
class MyAppToolGroupsConfiguration(
private val mcpSyncClients: List<McpSyncClient>,
) {
// TODO? only with protocol stateless
@Bean
fun myAppMcpToolsGroup(): ToolGroup {
return McpToolGroup(
description = ToolGroupDescription(
description = "MCP Tools for MyApp",
role = "myapp",
),
name = "myapp",
provider = "sandbox-server",
permissions = emptySet(),
clients = mcpSyncClients,
filter = { toolCallback ->
true
}
)
}
}
Streamable HTTP is not yet supported in the framework. We're planning to add support for Streamable HTTP soon. Stay tuned.