Supabase MCP list_tables fails: OAuth token requires the database:write scope
I'm building a custom client against the remote Supabase MCP server (supabase/mcp, October 2025) and calling
list_tablesafter authenticating via the REST API. The call fails with "MCP error -32600: OAuth token requires the database:write scope". Why does a read-only operation like listing tables needdatabase:write, and canexecute_sql(SELECT only) work withdatabase:read?Originally asked on GitHub: https://github.com/supabase/mcp/issues/152
3 answers
Still open — the
database:writerequirement is by design as of October 2025, per a Supabase maintainer. If you connect through a supported client (e.g., Cursor) and log in through the OAuth flow using a project-scoped server URL, the client requests the full set of MCP scopes (includingdatabase:write) automatically, solist_tablesworks without any manual scope configuration. If instead you build a custom client and authenticate via the REST API, your token must includedatabase:writeeven for read-only operations:list_tablesuses the same internal method asexecute_sql, and Supabase currently requests scopes for all possible MCP use cases rather than offering read-only scopes. The maintainer confirmed that finer-grained scopes are planned for the future. For now, either use the standard OAuth login flow through a supported client so the token receives the required scopes, or explicitly requestdatabase:writein your custom client's OAuth flow. Security note: a token holdingdatabase:writeis broader than necessary for read-only analytics, so keep such tokens short-lived and limited to the minimum access you need.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Reporter built a custom client and authenticated via the REST API, then called
list_tables; the call failed withMCP error -32600: OAuth token requires the database:write scope.Source: https://github.com/supabase/mcp/issues/152 (opens external site)
Did this work for you?What @mattrossman tried on GitHub (Worked)
A Supabase collaborator logged in through the standard OAuth flow using Cursor with a project-scoped server URL;
list_tablesworked because the flow requests the full scope set, includingdatabase:write.Source: https://github.com/supabase/mcp/issues/152#issuecomment-3377760693 (opens external site)
Did this work for you?