Repository navigation
feat: submit_feedback and delete_feedback tools - #474
Merged
mattrossman merged 8 commits intoOct 20, 2026
Merged
mattrossman merged 8 commits into
mattrossman merged 8 commits into
Conversation
Coverage Report for CI Build 39323804828Coverage increased (+0.03%) to 97.376%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
…dd-feedback-submission-and-deletion-to-mcp
submit_feedback and delete_feedback tools
submit_feedback and delete_feedback toolssubmit_feedback and delete_feedback tools
mattrossman
marked this pull request as ready for review
October 19, 2026 21:01
barryroodt
approved these changes
Oct 20, 2026
barryroodt
left a comment
Contributor
There was a problem hiding this comment.
Looks good, thanks @mattrossman;
Approving with a small non-blocking, inline question.
Merged
6 tasks
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>
kanadgupta
added a commit
to supabase/supabase
that referenced
this pull request
Nov 2, 2026
## Problem The CLI (supabase/cli#5988) and MCP server (supabase/mcp#474) only submit and delete feedback. Neither reads it back. But `anon` can still read a row's feedback text with its delete token, so a leaked token exposes the submission. Linear: [CLI-2406](https://linear.app/supabase/issue/CLI-2406) ## Solution New migration on `public.interfaces_feedback`: - Revoke all privileges from `anon` and `authenticated`, then grant `anon` only `delete` and `select (delete_token)`. - Rename the select policy to "Token holders can match their own feedback for deletion". - Update the `delete_token` column comment to say it authorizes deletes only. Key choices: - **The select policy and `select (delete_token)` stay.** Clients delete with a `delete_token=eq.<token>` filter. A filtered delete needs select on the filtered column and must pass the select policy. Tested locally: revoking the grant makes deletes fail with `42501`, and dropping the policy makes them silently match 0 rows. - **Privileges are reset, not revoked column by column.** Default grants differ between Postgres images. On the current local image, `anon` gets every table privilege by default, which overrides column-level grants. Starting from `revoke all` gives the same end state everywhere. No client changes are needed. The delete policy and `submit_interfaces_feedback` are unchanged. ## Review instructions Run these against a local stack (`supabase db reset`) or this PR's preview branch. Replace the placeholders: - `<PROJECT_URL>`: for example `http://127.0.0.1:54321` - `<ANON_KEY>`: the project's anon key - `<DELETE_TOKEN>`: the token returned in step 1 or 5 1. Submit feedback. The response is the delete token. ```bash curl -X POST '<PROJECT_URL>/rest/v1/rpc/submit_interfaces_feedback' \ -H 'apikey: <ANON_KEY>' \ -H 'Content-Type: application/json' \ -d '{"feedback": "test"}' ``` 2. Try to read the feedback with the token. Expect `401` with code `42501`. ```bash curl '<PROJECT_URL>/rest/v1/interfaces_feedback?select=feedback&delete_token=eq.<DELETE_TOKEN>' \ -H 'apikey: <ANON_KEY>' \ -H 'x-feedback-token: <DELETE_TOKEN>' ``` Only `select=delete_token` succeeds. Every other column returns `42501`. 3. Delete without the token header. Expect `Content-Range: */0`. ```bash curl -i -X DELETE '<PROJECT_URL>/rest/v1/interfaces_feedback?delete_token=eq.<DELETE_TOKEN>' \ -H 'apikey: <ANON_KEY>' \ -H 'Prefer: count=exact' ``` 4. Delete with the token header. Expect `Content-Range: */1`. ```bash curl -i -X DELETE '<PROJECT_URL>/rest/v1/interfaces_feedback?delete_token=eq.<DELETE_TOKEN>' \ -H 'apikey: <ANON_KEY>' \ -H 'Prefer: count=exact' \ -H 'x-feedback-token: <DELETE_TOKEN>' ``` 5. Submit feedback with a project ref and user ID. ```bash curl -X POST '<PROJECT_URL>/rest/v1/rpc/submit_interfaces_feedback' \ -H 'apikey: <ANON_KEY>' \ -H 'Content-Type: application/json' \ -d '{"feedback": "test", "project_ref": "my-project", "user_id": "my-user"}' ``` 6. Delete with only the token header. Expect `Content-Range: */0`. ```bash curl -i -X DELETE '<PROJECT_URL>/rest/v1/interfaces_feedback?delete_token=eq.<DELETE_TOKEN>' \ -H 'apikey: <ANON_KEY>' \ -H 'Prefer: count=exact' \ -H 'x-feedback-token: <DELETE_TOKEN>' ``` 7. Delete with all three headers. Expect `Content-Range: */1`. ```bash curl -i -X DELETE '<PROJECT_URL>/rest/v1/interfaces_feedback?delete_token=eq.<DELETE_TOKEN>' \ -H 'apikey: <ANON_KEY>' \ -H 'Prefer: count=exact' \ -H 'x-feedback-token: <DELETE_TOKEN>' \ -H 'x-feedback-project-ref: my-project' \ -H 'x-feedback-user-id: my-user' ``` 8. Optional: run `supabase feedback add` and `supabase feedback delete` against this PR's preview branch. Both succeed (already confirmed). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
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.
Why
Supabase CLI added
supabase feedbackcommands recently to let agents / humans share feedback about our tooling. We also want to capture feedback from users of our MCP server (e.g. ChatGPT, Claude web, etc.) for when CLI isn't available.What
New MCP tools under a new
feedbackfeature group:submit_feedbackdelete_feedbackThe tools write to the prod
interfaces_feedbacktable normally, or staging for any other API URL. This PR includes support for the stdio /--httpserver, other platforms can opt-in later (e.g. we can omit feedback tools on self-hosted so that it doesn't phone home).For the package implementation,
user_idcomes from theX-Gotrue-Idheader on a Management API response, which the CLI relies on too, but remote MCP can populate this ID a different way. The MCP client name and version go inmetadata.I hide both tools in
read_onlymode, since even though this doesn't impact users' projects, the feedback mutates a remote table.How to test
Start the dev server with
--api-url https://api.supabase.greenand connect an MCP client. Then ask it to submit throwaway feedback:Check the new row in the
interfaces_stagingbranch of the supabase project.Then delete it:I ran a round trip with Claude Code in staging, see sample row:
{"idx":0,"id":488,"created_at":"2026-10-19 20:20:46.389158+00","feedback":"Test feedback from reviewing supabase/mcp#474, please ignore","delete_token":"4f354c21-4498-4232-8d7c-21b280bfdc2e","user_agent":"supabase-mcp/0.14.0","user_id":"20e65d1b-489d-4b03-9e0b-e58f7b9aff45","project_ref":"wzukuhfteohjnlxczohs","metadata":"{\"source\": \"mcp\", \"client_name\": \"claude-code\", \"client_version\": \"2.1.303\"}"}Notes:
Related:
Follow-ups:
Closes AI-1017