|
20 | 20 | import static dev.enola.ai.mcp.McpServerConnectionsConfig.ServerConnection.Type.http;
|
21 | 21 | import static dev.enola.ai.mcp.McpServerConnectionsConfig.ServerConnection.Type.stdio;
|
22 | 22 |
|
23 |
| -import com.google.common.collect.ImmutableMap; |
24 | 23 | import com.google.common.collect.MapMaker;
|
25 | 24 | import com.google.errorprone.annotations.CanIgnoreReturnValue;
|
26 | 25 |
|
|
38 | 37 | import io.modelcontextprotocol.client.transport.StdioClientTransport;
|
39 | 38 | import io.modelcontextprotocol.spec.McpClientTransport;
|
40 | 39 | import io.modelcontextprotocol.spec.McpSchema;
|
41 |
| -import io.modelcontextprotocol.spec.McpTransport; |
42 | 40 |
|
43 | 41 | import org.slf4j.Logger;
|
44 | 42 | import org.slf4j.LoggerFactory;
|
@@ -90,20 +88,6 @@ public Optional<McpSyncClient> opt(String name) {
|
90 | 88 | return Optional.of(clients.computeIfAbsent(name, k -> createSyncClient(config, name)));
|
91 | 89 | }
|
92 | 90 |
|
93 |
| - // TODO Remove this method again, if both dev.enola.ai.adk.tool.ADK and McpLoaderTest don't use? |
94 |
| - // TODO create MCP transports in parallel, and asynchronously? |
95 |
| - private Map<String, McpTransport> createTransports( |
96 |
| - Iterable<McpServerConnectionsConfig> configs) { |
97 |
| - var transports = new ImmutableMap.Builder<String, McpTransport>(); |
98 |
| - for (var config : configs) { |
99 |
| - for (var name : config.servers.keySet()) { |
100 |
| - var transport = createTransport(config, name); |
101 |
| - transports.put(name, transport); |
102 |
| - } |
103 |
| - } |
104 |
| - return transports.build(); |
105 |
| - } |
106 |
| - |
107 | 91 | public static McpClientTransport createTransport(
|
108 | 92 | McpServerConnectionsConfig config, String name) {
|
109 | 93 | McpClientTransport transport;
|
|
0 commit comments