Skip to content

feat(platform): add typed platform api client - #417

Open
jordienr wants to merge 2 commits into
mainfrom
jordi/add-platform-api-client
Open

feat(platform): add typed platform api client#417
jordienr wants to merge 2 commits into
mainfrom
jordi/add-platform-api-client

Conversation

@jordienr

@jordienr jordienr commented Sep 7, 2026

Copy link
Copy Markdown
Member

Problem

The MCP only has generated types and a client for the legacy Management API. Newer Platform API endpoints cannot be called safely without hand-written request and response types.

Fix

Generate a separate Platform API schema and add a typed client alongside the existing Management API client. Extend the type-generation workflows to keep both schemas synchronized.

How to test

  • Run pnpm --filter @supabase/mcp-server-supabase test -- --run src/platform-api/index.test.ts
  • Expected result: the Platform API client uses the resolved endpoint URL with Bearer authentication and caller-provided headers.
  • Run pnpm --filter @supabase/mcp-server-supabase generate:platform-api-types
  • Expected result: regeneration produces no diff.

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 34133921890

Coverage increased (+0.01%) to 96.415%

Details

  • Coverage increased (+0.01%) from the base build.
  • Patch coverage: 14 of 14 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 3572
Covered Lines: 3462
Line Coverage: 96.92%
Relevant Branches: 528
Covered Branches: 491
Branch Coverage: 92.99%
Branches in Coverage %: Yes
Coverage Strength: 60.09 hits per line

💛 - Coveralls

@jordienr
jordienr marked this pull request as ready for review September 7, 2026 15:10
@jordienr
jordienr requested a review from a team as a code owner September 7, 2026 15:10
@mattrossman

Copy link
Copy Markdown
Collaborator

Just confirming if this is still needed, since there's talk of moving the motivating health advisors endpoint to management API? As you mention, IIRC MCP doesn't have access to platform endpoints.

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.

3 participants