Repository navigation
feat: support skip_elicitations in the local HTTP server - #434
Conversation
Coverage Report for CI Build 34984814779Coverage increased (+0.2%) to 96.589%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
| log?: (line: string) => void; | ||
| }; | ||
|
|
||
| const supportedElicitationTools = ['create_project', 'create_branch'] as const; |
There was a problem hiding this comment.
Thinking out loud if this variable should be shared between the npm package and the platform. This seems the type of information we would want in sync with the platform behavior
There was a problem hiding this comment.
Gave this a bit more thought and we have the supported elicitation array in three different locations (in the local http server, in the server.ts file and in the platform repo under SUPPORTED_ELICITATION_TOOLS.
We already export shared types inside types.ts
Wdyt about moving this to here instead?
// supabase-mcp/packages/mcp-server-supabase/src/types.ts
export const CURRENT_ELICITATION_TOOLS = ['create_project', 'create_branch'] as const;
export type ElicitationToolName = (typeof CURRENT_ELICITATION_TOOLS)[number];There was a problem hiding this comment.
Main reason I didn't do this from the outset is that I didn't want the platform update relying on a new package release and I'd like to get that platform update in first. Considered that it would make more sense when we add the url & sql elicitations, since those will require a new release.
If you're happy with multiple, quick fire releases, then we can do this first.
There was a problem hiding this comment.
I didn't want the platform update relying on a new package release and I'd like to get that platform update in first
Agree on not making the platform changes dependent on a new package release.
I would still push for moving the CURRENT_ELICITATION_TOOLS to packages/mcp-server-supabase/src/types.ts so later we can import it and replace it in platform, once we publish the package
I'll approve this PR to unlock you and wait on your feedback
There was a problem hiding this comment.
I'll add it to #408 as a small refactor - it'll then also include the sql tools
Rodriguespn
left a comment
There was a problem hiding this comment.
Approving to unlock you @barryroodt but pending feedback on this comment
Thank you!
🤖 I have created a release *beep* *boop* --- <details><summary>mcp-server-supabase: 0.13.0</summary> ## [0.13.0](mcp-server-supabase-v0.12.0...mcp-server-supabase-v0.13.0) (2026-09-17) ### ⚠ BREAKING CHANGES * **mcp:** confirm destructive SQL via elicitation and rename costConfirmation option ([#408](#408)) ### Features * add --http local HTTP entry to mcp-server-supabase ([#401](#401)) ([ff063b4](ff063b4)) * **management:** add v2 api client ([#419](#419)) ([02ca542](02ca542)) * **mcp:** confirm destructive SQL via elicitation and rename costConfirmation option ([#408](#408)) ([c9c4e3f](c9c4e3f)) * support skip_elicitations in the local HTTP server ([#434](#434)) ([9442e82](9442e82)) * URL-mode secret collection for create_edge_function_secret ([#412](#412)) ([fb88629](fb88629)) ### Bug Fixes * discourage host-filesystem access in raw-SQL tool descriptions ([#410](#410)) ([641ed1e](641ed1e)) </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>
Why
Let local HTTP callers opt out of cost elicitations per tool, matching platform #38134 (contract reference, not a deployment dependency).
Closes AI-1217.
What changed
skip_elicitationsCSV parameter containingcreate_projectand/orcreate_branch. Trim whitespace and ignore empty entries; omitted or blank preserves defaults.How to test
From the PR checkout root (branch
barryroodt/ai-1217-http-skip-elicitations, containingpackage.jsonandpackages/), use Node LTS and pnpm 10. Leave port 3111 alone; 3112 is an example, so choose a free port and substitute it consistently.Build and start the no-create local check
Expect Node LTS, pnpm 10, and successful typechecks/builds for the package and its workspace dependency. Stop if installation requires registry authentication; the reviewer handles it, not an agent. The install recipe was not rerun during verification.
Keep this server running in terminal A. Its unreachable loopback API and the synthetic bearer below keep this check away from real resources. No credentials are needed.
Run the credential-free checks first. In terminal B, list tools with this form-capable modern request. Keep the method header and protocol metadata:
Synthetic curl commands and expected results
Expect HTTP 200 and
result.tools. Run this list request for each URL row, changing only the URL, and inspect each create tool'sinputSchema.required:?features=account,branching&skip_elicitations=create_branch&skip_elicitations=create_project&skip_elicitations=create_project,create_branch&skip_elicitations=(blank)With both skipped,
get_costandconfirm_costare listed. With omitted/blank, they are hidden for this form-capable request. To check CSV normalization, use&skip_elicitations=%20create_project%20,,create_branch,%20: expect the both-skipped schemas.Run these two calls only with the both-skipped URL shown, never an unskipped create call:
Each returns HTTP 200 with
result.isError: trueand aZodErroratconfirm_cost_id: “User must confirm understanding of costs before creating a project/branch.” This is a tool error, not HTTP 400, and no form or resource is created. Do not supply the missing ID or attempt a repair.Check invalid query handling:
Expect HTTP 400 naming the allowed
create_project/create_branchvalues. Replace the query with each of these; all return 400:skip_elicitations=apply_migrationskip_elicitations=Create_Projectskip_elicitations=create_branch&skip_elicitations=create_projectskip_elicitations%5B%5D=create_branchThe last two report
skip_elicitations must be a single CSV string. When finished, Ctrl-C only the server you started. No resources need cleanup.Optional: real Claude staging walkthrough (decline-only, not a no-create guarantee)
Strict no-create reviewers should stop after the synthetic check. A free project can be created without a form. Even a positive quote can become stale before the create call. A paid organization alone is not sufficient. Departing from this flow may create resources and incur real costs.
Use an existing staging PAT, a paid staging organization, an eligible disposable existing staging project in it, a valid region, and fresh project/branch names. Avoid concurrent organization/plan/project-count changes. Stop only your terminal A server, then restart it against staging:
mise exec -- node packages/mcp-server-supabase/dist/cli.js --http --port 3112 --api-url https://api.supabase.greenIn terminal B, create a private temporary config. Do not edit
.mcp.jsonor existing registrations:MCP_REVIEW_CONFIG=$(mktemp "${TMPDIR:-/tmp}/supabase-skip-review.XXXXXX")Open that exact path in your editor and save this single-server config, keeping the variable references literal:
{ "mcpServers": { "supabase-skip-review": { "type": "http", "url": "${SUPABASE_REVIEW_URL}", "headers": { "Authorization": "Bearer ${SUPABASE_REVIEW_PAT}" } } } }Enter your existing PAT silently in interactive bash/zsh, one line at a time. Stop if empty. Do not enable tracing, paste the PAT as a command, print the environment, capture authorization headers, or acquire new credentials:
Start with both tools skipped, where
get_costis available, to quote project and branch costs before any unskipped project call:Launch syntax was checked on Claude Code 2.1.272. Verify no managed, SDK, or policy-forced plugin hooks can auto-answer
Elicitation/ElicitationResult.disableAllHooksdoes not disable those; stop if uncertain. In/mcpverify onlysupabase-skip-reviewis connected at the expected URL. Stop on authentication, configuration, or capability errors.Paste this preflight prompt after replacing the organization:
Record the positive project quote, recurrence, and exact organization privately, then exit Claude fully. Start with the omitted URL below; repeat with each remaining row from the matrix above, including both-skipped and blank. Export exactly one URL and rerun the same launch command for every fresh session, with no
--resume/--continue. Check/mcpeach time. If the quote or target changes, repeat the separate both-skipped preflight first.Paste this prompt with your row, exact targets, and previously obtained quote. Do not accept any cost form. Ordinary tool-permission dialogs authorize execution; they are not server cost forms.
Expected: unskipped tools elicit, and you decline/cancel; skipped tools require
confirm_cost_idand fail without it, with no form. A client's refusal to send invalid arguments is not server-error proof; the synthetic curl checks provide that proof. Do not retry, repair, callconfirm_cost, provide a confirmation ID, or auto-answer. On unexpected creation or a missing expected form, stop and report it; resource cleanup needs separate human approval.Exit Claude, then remove only the temporary review configuration and stop only your own server:
Trade-offs
Keep this at the local HTTP boundary rather than add a core configuration API. Validation is deliberately limited to this parameter.
Verification: 73 tests (26 socket tests) and the dependency-inclusive build passed. The built CLI's synthetic schema/error paths were exercised. The optional authenticated Claude/staging walkthrough is not an observed result; no hosted or production behavior is claimed.