Eduardo Ruesta
07/26/2025, 2:31 AMimplementation(libs.koog.agents)
implementation(libs.mcp)
mcp = { module = "io.modelcontextprotocol:kotlin-sdk", version.ref = "mcp" }
and
koog-agents = { module = "ai.koog:koog-agents", version.ref = "koog" }
with this version:
koog = "0.3.0"
mcp = "0.6.0"
but when i tried to add the mcp tool to my agent like this:
// Start the MCP server (e.g., as a process)
val process = ProcessBuilder("path/to/mcp/server").start()
// Create a ToolRegistry with tools from the MCP server
val toolRegistry = McpToolRegistryProvider.fromTransport(
transport = McpToolRegistryProvider.defaultStdioTransport(process)
)
// Use the tools in an AI agent
val agent = AIAgent(
promptExecutor = executor,
strategy = strategy,
agentConfig = agentConfig,
toolRegistry = toolRegistry
)
// Run the agent
agent.run("Your task here")
my Android Studio can't find these classes McpToolRegistryProvider
, McpTool
and McpToolRegistryProvider
Anastasiia Zarechneva
07/28/2025, 8:25 AMEduardo Ruesta
07/28/2025, 1:22 PMEduardo Ruesta
07/28/2025, 1:45 PMcommonMain.dependencies {
is notEduardo Ruesta
07/28/2025, 2:06 PMkoog-mcp = { module = "ai.koog:koog-agents-mcp", version.ref ="koog" }
or with this one is okay:
koog-agents = { module = "ai.koog:koog-agents", version.ref = "koog" }
Pavel Gorgulov
07/28/2025, 3:05 PMkoog-mcp = { module = "ai.koog:agents-mcp-jvm", version.ref = "koog" }
Also note that koog 0.3.0 is using mcp client version 0.5.0. There were breaking changes introduced in version 0.6.0, so compatibility between client and server of different versions is not guaranteedEduardo Ruesta
07/28/2025, 3:15 PMEduardo Ruesta
07/28/2025, 3:28 PMMcpToolRegistryProvider
inside the commonMain is not working?Pavel Gorgulov
07/28/2025, 4:00 PMEduardo Ruesta
07/28/2025, 4:15 PM