Skip to content

feat(advisors): add health advisor support - #420

Open
jordienr wants to merge 8 commits into
mainfrom
jordi/add-health-advisor-v2
Open

jordienr wants to merge 8 commits into
mainfrom
jordi/add-health-advisor-v2

Conversation

@jordienr

@jordienr jordienr commented Sep 8, 2026

Copy link
Copy Markdown
Member

Problem

The MCP exposes security and performance advisors but cannot report Health Advisor error-rate findings.

Fix

Add health to get_advisors for backends that support it. Use the v2 Management API to request only high error-rate checks for Data API, Auth, Storage, and Edge Functions. Database connection and infrastructure checks are not requested.

Hide project_not_active and advisor_check_unavailable for now. Return the existing grouped advisor format and preserve compatibility with custom backends that only support security and performance.

How to test

  • Run pnpm --filter @supabase/mcp-server-supabase typecheck.
  • Run CI=1 pnpm --filter @supabase/mcp-server-supabase test -- --run src/server.test.ts src/management-api-v2/index.test.ts. Tests cover the four-check request, hidden unavailable statuses, grouped output, and legacy backend compatibility.
  • Run pnpm exec biome ci ..

An earlier live local MCP call verified v2 access-token authentication. The latest check selection and status preservation are validated with mocked API responses.

@jordienr
jordienr changed the base branch from jordi/add-management-v2-client to main September 8, 2026 10:05
@coveralls

coveralls commented Sep 15, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 34953455386

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage decreased (-0.03%) to 96.386%

Details

  • Coverage decreased (-0.03%) from the base build.
  • Patch coverage: 4 uncovered changes across 1 file (66 of 70 lines covered, 94.29%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
packages/mcp-server-supabase/src/tools/debugging-tools.ts 21 17 80.95%
Total (2 files) 70 66 94.29%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 3644
Covered Lines: 3530
Line Coverage: 96.87%
Relevant Branches: 534
Covered Branches: 497
Branch Coverage: 93.07%
Branches in Coverage %: Yes
Coverage Strength: 61.12 hits per line

💛 - Coveralls

@jordienr
jordienr marked this pull request as ready for review September 15, 2026 13:15
@jordienr
jordienr requested a review from a team as a code owner September 15, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants