{"record":{"id":"8ba14c8d0bcfd226","repo":"ruvnet/ruflo","slug":"tool-authorization-is-required-and-cannot-be-disab","errorCode":null,"errorMessage":"tool authorization is required and cannot be disabled","messagePattern":"tool authorization is required and cannot be disabled","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/mcp/src/server.ts","lineNumber":318,"sourceCode":"      this.emit('server:stopped');\n\n    } catch (error) {\n      this.logger.error('Error stopping MCP server', { error });\n      throw error;\n    }\n  }\n\n  registerTool(tool: MCPTool): boolean {\n    return this.toolRegistry.register(tool);\n  }\n\n  registerTools(tools: MCPTool[]): { registered: number; failed: string[] } {\n    return this.toolRegistry.registerBatch(tools);\n  }\n\n  setToolAuthorizer(authorizer?: ToolAuthorizer): void {\n    if (this.config.requireToolAuthorization && !authorizer) {\n      throw new Error('tool authorization is required and cannot be disabled');\n    }\n    this.toolRegistry.setAuthorizer(authorizer);\n  }\n\n  unregisterTool(name: string): boolean {\n    return this.toolRegistry.unregister(name);\n  }\n\n  async getHealthStatus(): Promise<{\n    healthy: boolean;\n    error?: string;\n    metrics?: Record<string, number>;\n  }> {\n    try {\n      const transportHealth = this.transports.length > 0\n        ? await Promise.all(this.transports.map((transport) => transport.getHealthStatus()))\n        : [{ healthy: false, error: 'Transport not initialized' }];\n","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/mcp/src/server.ts#L300-L336","documentation":"setToolAuthorizer() was called with no authorizer while the server config still has requireToolAuthorization enabled. Disabling the authorizer under mandatory authorization is refused — flip requireToolAuthorization off first if authorization is truly meant to be dropped.","triggerScenarios":"Configuration or a call attempts to disable tool authorization on a server where it is mandatory.","commonSituations":"A caller sets requireToolAuthorization=false after the server was created with authorization enforced.","solutions":["Keep tool authorization enabled; supply a permissive authorizer if all tools should be allowed.","Recreate the server without the mandatory-authorization constraint if the deployment genuinely does not need it."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}