postgrestRequest returns PostgREST error responses as successful results
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
Research direction
Find the postgrestRequest implementation in the mcp-server-postgrest package and read how it handles the HTTP response and constructs the tool result. Check the existing tests for that request, or add coverage for an error status if none is mentioned in the issue. Done means non-success responses return isError: true and include the status code and response body.
Written by the indexing model from the issue text.
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
When PostgREST answers a postgrestRequest call with an error status, the tool returns the error body as a normal result and isError is not set. A request for a table that does not exist, or with a malformed filter, looks like a successful call.
To Reproduce
-
Run
mcp-server-postgrestagainst a Supabase project's REST API:mcp-server-postgrest --apiUrl https://<project-ref>.supabase.co/rest/v1 --apiKey <publishable key> --schema public -
Call
postgrestRequestwith{ "method": "GET", "path": "/no_such_table?select=*" }. -
The call returns
isError: falseand:{"result":{"code":"PGRST205","details":null,"hint":null,"message":"Could not find the table 'public.no_such_table' in the schema cache"}} -
Call it with
{ "method": "GET", "path": "/no_such_table?select=*&bad=" }. This also returnsisError: false:{"result":{"code":"PGRST100","details":"unexpected end of input expecting \"not\" or operator (eq, gt, ...)","hint":null,"message":"\"failed to parse filter ()\" (line 1, column 1)"}} -
Start the server with an invalid
--apiKeyand call it with{ "method": "GET", "path": "/" }. This also returnsisError: false:{"result":{"message":"Invalid API key","hint":"Double check your Supabase `anon` or `service_role` API key."}}
Expected behavior
A response with an error status is returned as an error (isError: true) that includes the status code and the response body, so the caller can tell the request failed.
System information
- OS: Ubuntu (WSL2)
- Browser: N/A
- Version of @supabase/mcp-server-postgrest: 0.2.0
- Version of Node.js: 24.15.0
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 432
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 52
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/mcp
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Let execute_sql run as a project role you choosePossibly taken @barryroodt claimed this 5 days ago. Open
supabase/mcp#537 · 1 assignee ·
Maintainers usually reply within 1 day
-
execute_sql runs MERGE ... WHEN MATCHED THEN DELETE without the destructive confirmationPossibly taken @barryroodt claimed this 5 days ago. OpenMCP
Difficulty 3/5 1-2 days Newbie friendliness 69/100
supabase/mcp#532 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
list_tables: schemas says it defaults to all schemas but defaults to ["public"], so the RLS advisory silently reports on a partial databasePossibly taken @PranshulSoni claimed this 75 days ago. Openbug MCP
Difficulty 4/5 3-5 days Newbie friendliness 55/100
supabase/mcp#395 · 4 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Feature MCP
Difficulty 3/5 1-2 days Newbie friendliness 65/100
supabase/mcp#361 · 3 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Wallet functions throws TypeError when the wallet has no account IDPossibly taken @Medhansh-741 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
hiero-ledger/hiero-sdk-js#4781 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dataforgoodfr/mediterranean-rescue#91 ·
Maintainers usually reply within 1 day
-
transformer-directives: `@apply` drops a utility whose CSS is a substring of an earlier one'sPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Add: KRT TVOpenapproved check:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 65/100
iptv-org/iptv#58647 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
milind-soni/OpenMausBot#5829 ·
Maintainers usually reply within 1 day