Repository navigation
fix(mcp-server-supabase): return a tool error when a confirmation expires - #490
Merged
barryroodt merged 5 commits intoOct 27, 2026
Conversation
Coverage Report for CI Build 40527234958Warning No base build found for commit Coverage: 97.615%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats💛 - Coveralls |
mattrossman
approved these changes
Oct 27, 2026
Merged
This was referenced Oct 28, 2026
mattrossman
added a commit
that referenced
this pull request
Oct 28, 2026
When the management API types check fails, its job summary now links to the generated update PR if one is open, or links to the workflow to trigger a new one. Surfaced while reviewing #490 This also removes the [Node 20 deprecation and Ubuntu migration annotations](https://github.com/supabase/mcp/actions/runs/40527234719) from the check. If no generated PR exists ([run](https://github.com/supabase/mcp/actions/runs/40557170577)): <img width="2900" height="444" alt="CleanShot 2026-10-27 at 2 23 00 PM@2x" src="https://github.com/user-attachments/assets/61340bf9-346a-4f82-b3c9-de8c1372c0e4" /> If generated PR exists ([run](https://github.com/supabase/mcp/actions/runs/40561647929)), note since there's no real open PR this one hardcoded to link to this PR: <img width="2902" height="432" alt="CleanShot 2026-10-27 at 2 41 42 PM@2x" src="https://github.com/user-attachments/assets/89b2c3a7-6241-49d1-b912-68b3f59f8d26" />
Rodriguespn
pushed a commit
that referenced
this pull request
Oct 29, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>mcp-server-supabase: 0.15.0</summary> ## [0.15.0](mcp-server-supabase-v0.14.0...mcp-server-supabase-v0.15.0) (2026-10-29) ### Features * `submit_feedback` and `delete_feedback` tools ([#474](#474)) ([f50318a](f50318a)) * mark client-caused tool errors as ToolCallerError ([#480](#480)) ([4a619c1](4a619c1)) * **mcp-server-supabase:** detect instant elicitation cancels ([#483](#483)) ([5ad1a2a](5ad1a2a)) ### Bug Fixes * **mcp-server-supabase:** return a tool error when a confirmation expires ([#490](#490)) ([5ab9a98](5ab9a98)) * **mcp-server-supabase:** use POSIX path resolution for edge function filenames ([#393](#393)) ([55d2d24](55d2d24)) * **mcp:** don't split an UPDATE on a semicolon inside a dollar-quoted value ([#482](#482)) ([9f07410](9f07410)) * **mcp:** don't split an UPDATE on a semicolon inside a quoted value ([#459](#459)) ([6d93b50](6d93b50)) * **pg-meta:** order list_tables columns by ordinal position ([c242e63](c242e63)) * **pg-meta:** order primary key columns by key position and exclude INCLUDE columns ([#382](#382)) ([25d357c](25d357c)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
If a client answers a confirmation form after the signed
requestStatehas expired, the SDK rejects the resume with a generic JSON-RPC-32602"Invalid or expired requestState". The client can't tell the confirmation timed out, and the model never gets a hint to retry, so to the user it looks like our server is broken.We saw this in a support ticket where Codex answered a
create_branchcost form about 21 minutes after the first call. The token only lasts 10 minutes. AI-1337 and AI-1318 look like the same thing from Codex.What is the new behavior?
Our verify hook now catches only the SDK's
expiredcase and returns a normal tool result withisError: trueandstructuredContent: { status: 'expired', message }, with the same JSON incontent(same shape as #483). The model then reads something like:The SDK checks expiry after the MAC, so only an authentic token reaches this path. The lifetime in the message comes from the same TTL the codec uses.
This covers all six tools that resume signed state:
create_project,create_branch,execute_sql,apply_migration,run_notebookandcreate_edge_function_secret. The expired check runs before any other routing, so an expired resume never runs anything, even when the client swaps in a non-destructive query or drops form capability. We take the tool name from the tool being called and never read the expired payload.Malformed, bad-MAC and bind failures still get the SDK's
-32602unchanged. The TTL and the SDK stay the same. Confirmation tools now record aresume_validationfact withresult: 'expired', so we can finally see these.Verification
I ran a local smoke test on the in-process server with a mocked clock:
create_branch: expired result, no branch createdexecute_sqlresumed with a non-destructiveINSERT: expired result, SQL not runexecute_sqlfrom a client without form capability: expired result, SQL not run-32602Additional context
Closes AI-1372