Skip to content

fix(server): hide mutating stdio tools in read-only mode fixes #281#323

Closed
ahfoysal wants to merge 2 commits into
supabase:mainfrom
ahfoysal:fix/stdio-readonly-tool-list
Closed

fix(server): hide mutating stdio tools in read-only mode fixes #281#323
ahfoysal wants to merge 2 commits into
supabase:mainfrom
ahfoysal:fix/stdio-readonly-tool-list

Conversation

@ahfoysal

@ahfoysal ahfoysal commented Jul 7, 2026

Copy link
Copy Markdown

Summary

  • Ensured createSupabaseMcpServer filters tools before registration when --read-only is enabled.
  • The stdio transport now omits tools with readOnlyHint: false in read-only mode, so tools/list no longer exposes mutating actions.
  • Kept existing behavior intact for adaptive tools (e.g. execute_sql) that remain visible with adjusted annotations.

Verification

  • CI=1 ./node_modules/.bin/vitest run --project integration test/stdio.integration.ts

Closes #281

@ahfoysal ahfoysal requested a review from a team as a code owner July 7, 2026 08:21
@raulb

raulb commented Jul 7, 2026

Copy link
Copy Markdown
Member

Hey! Thank you for your contribution! I was actually reviewing #283, which seems to fix the same core issue as #281.

That other PR adds something I particularly like: the fact that write tools are still registered, and it returns a nicer error when in read mode, e.g., "Cannot apply migration in read-only mode." This PR seems to remove that altogether, which I think provides a less-than-ideal UX.

I appreciate your contribution, though, so please keep them coming!

@raulb raulb closed this Jul 7, 2026
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.

read-only stdio mode still exposes mutating tools in tools/list

2 participants