mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 16:16:02 +00:00
mcp: added path config, register at /api path by default to work with frameworks
This commit is contained in:
@@ -60,8 +60,9 @@ export class SystemController extends Controller {
|
||||
|
||||
register(app: App) {
|
||||
app.server.route("/api/system", this.getController());
|
||||
const config = app.modules.get("server").config;
|
||||
|
||||
if (!this.app.modules.get("server").config.mcp.enabled) {
|
||||
if (!config.mcp.enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -97,7 +98,7 @@ export class SystemController extends Controller {
|
||||
explainEndpoint: true,
|
||||
},
|
||||
endpoint: {
|
||||
path: "/mcp",
|
||||
path: config.mcp.path as any,
|
||||
// @ts-ignore
|
||||
_init: isNode() ? { duplex: "half" } : {},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user