feat: lazy load mcp server

This commit is contained in:
dswbx
2025-09-23 13:46:39 +02:00
parent 54eee8cd34
commit 49aee37199
13 changed files with 56 additions and 32 deletions
+5 -1
View File
@@ -1,6 +1,6 @@
import { Exception } from "core/errors";
import { isDebug } from "core/env";
import { $console, s } from "bknd/utils";
import { $console, mcpLogLevels, s } from "bknd/utils";
import { $object } from "modules/mcp";
import { cors } from "hono/cors";
import { Module } from "modules/Module";
@@ -25,6 +25,10 @@ export const serverConfigSchema = $object(
mcp: s.strictObject({
enabled: s.boolean({ default: false }),
path: s.string({ default: "/api/system/mcp" }),
logLevel: s.string({
enum: mcpLogLevels,
default: "warning",
}),
}),
},
{