mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 12:56:05 +00:00
docs: updated mcp tools
This commit is contained in:
@@ -311,8 +311,9 @@ export class App<
|
||||
throw new Error("MCP is not enabled");
|
||||
}
|
||||
|
||||
const url = new URL(config.path, "http://localhost").toString();
|
||||
return new McpClient({
|
||||
url: "http://localhost" + config.path,
|
||||
url,
|
||||
fetch: this.server.request,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -70,12 +70,13 @@ export class SystemController extends Controller {
|
||||
if (!config.mcp.enabled) {
|
||||
return;
|
||||
}
|
||||
const { permission } = this.middlewares;
|
||||
const { permission, auth } = this.middlewares;
|
||||
|
||||
this.registerMcp();
|
||||
|
||||
app.server.all(
|
||||
config.mcp.path,
|
||||
auth(),
|
||||
permission(SystemPermissions.mcp, {}),
|
||||
mcpMiddleware({
|
||||
setup: async () => {
|
||||
|
||||
Reference in New Issue
Block a user