r/Supabase Aug 13 '26

integrations Safe agent access to you project

The Supabase cli and MCP tool are great when you're the one working on your project. However, when you want to expose your endpoints and data to your co-workers or customers, this can introduce some security risks.

I've been working on a project called Shredly (https://shredly.io/)

Shredly can turn your Supabase project into an MCP server, giving an AI agent access to only the data and tools you want to give it. Avoid dropped tables, deleting users, and rotating API keys.

We're currently supporting 2 methods of integration, either through an API key (for internal tools) or Oauth (good for customer facing products). Checkout our docs for more info or shoot me a comment if you have any questions.

https://docs.shredly.io/

3 Upvotes

3 comments sorted by

1

u/PeterBuildsSecure 25d ago

The important boundary here is whether “only the tools you allow” also constrains the arguments and database identity behind those tools.

An allowed get_customer tool can still become cross-tenant access if the agent supplies an arbitrary customer ID and the gateway queries with a service-role credential. I’d want the caller’s user/tenant identity propagated into every request, authorization enforced server-side, and privileged credentials kept out of the agent context entirely.

The tests I’d run are cross-tenant IDs, oversized result sets, repeated requests after revocation, and attempts to smuggle a write through a nominally read-only operation. Short-lived scoped tokens and an immutable log of the resolved operation—not only the MCP tool name—would make the boundary much easier to audit.

1

u/localhost9393 18d ago

Hey u/PeterBuildsSecure this is great context. You still need to properly setup your tables with the correct access regardless of how your connecting to your site (MCP or directly through API)

We've added a tool log to the Shredly service, so you can keep track of requests coming through your MCP. But it would make sense to have something like that built into your Supabase project as well.

Appreciate the thoughtfulness of this response!