Expose risks through the MCP server
Summary
Add a read-only list_risks MCP tool so an operator can inspect active and dismissed availability/security risks without opening the UI.
Motivation
Coroot already exposes alerts, incidents, application health, and logs through MCP, but risks are missing. The Risks page and /api/project/{project}/overview/risks already contain the data, so this can be a small addition rather than a new risk engine.
Proposed solution
Reuse the existing risk overview, enforce the same project risk-view permission, and return a bounded list with risk identity, severity, application, description, and dismissal state. Support a simple active/dismissed filter.
Acceptance criteria
- Authorized MCP clients can list active risks and, when requested, dismissed risks.
- Clients without risk-view permission receive no risk data.
- Large responses follow existing MCP truncation conventions.
- Add focused tests and document the tool alongside the other MCP tools.
Alternatives considered
The REST overview endpoint is already available, but using it requires a separate client and authentication path from the existing MCP workflow.
Source: coroot/coroot