mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
feat: lazy load mcp server
This commit is contained in:
@@ -302,13 +302,13 @@ export class App<
|
||||
}
|
||||
|
||||
getMcpClient() {
|
||||
if (!this.mcp) {
|
||||
const config = this.modules.get("server").config.mcp;
|
||||
if (!config.enabled) {
|
||||
throw new Error("MCP is not enabled");
|
||||
}
|
||||
const mcpPath = this.modules.get("server").config.mcp.path;
|
||||
|
||||
return new McpClient({
|
||||
url: "http://localhost" + mcpPath,
|
||||
url: "http://localhost" + config.path,
|
||||
fetch: this.server.request,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user