File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1515 McpSchema$ClientCapabilities
1616 McpSchema$Content
1717 McpSchema$GetPromptRequest
18+ McpSchema$LoggingMessageNotification
1819 McpSchema$Prompt
1920 McpSchema$PromptArgument
2021 McpSchema$PromptMessage
6768 (getProcessBuilder [] (-> (ProcessBuilder. ^List pb-init-args)
6869 (.directory (io/file work-dir)))))))
6970
70- (defn ^:private ->client ^McpSyncClient [transport config]
71+ (defn ^:private ->client ^McpSyncClient [transport config workspaces ]
7172 (-> (McpClient/sync transport)
7273 (.requestTimeout (Duration/ofSeconds (:mcpTimeoutSeconds config)))
7374 (.capabilities (-> (McpSchema$ClientCapabilities/builder )
7475 (.roots true )
7576 (.build )))
77+ (.roots ^List (mapv #(McpSchema$Root. (:uri %) (:name %)) workspaces))
78+ (.loggingConsumer (fn [^McpSchema$LoggingMessageNotification notification]
79+ (logger/info logger-tag (.data notification))))
7680 (.build )))
7781
7882(defn ^:private ->server [mcp-name server-config status db]
150154 obj-mapper (ObjectMapper. )]
151155 (try
152156 (let [transport (->transport server-config workspaces)
153- client (->client transport config)]
157+ client (->client transport config workspaces )]
154158 (on-server-updated (->server name server-config :starting db))
155159 (swap! db* assoc-in [:mcp-clients name] {:client client})
156- (doseq [{:keys [name uri]} workspaces]
157- (.addRoot client (McpSchema$Root. uri name)))
158160 (.initialize client)
159161 (swap! db* assoc-in [:mcp-clients name :tools ] (list-server-tools obj-mapper client))
160162 (swap! db* assoc-in [:mcp-clients name :prompts ] (list-server-prompts client))
You can’t perform that action at this time.
0 commit comments