How to Configure Goose Supabase MCP Server
To set up a goose supabase mcp server, register the server in Goose and pass a database role secret. This lets your local AI agent run queries and read schemas on your database. Many teams start by pasting their main project admin password into the local agent settings. That shortcut gives the AI model broad admin power over every table in the project. If the model misreads a prompt, it can drop tables or read private user rows. How the goose supabase mcp server setup works Goose acts as a lo
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
To set up a goose supabase mcp server, register the server in Goose and pass a database role secret. This lets your local AI agent run queries and read schemas on your database. Many teams start by pasting their main project admin password into the local agent settings. That shortcut gives the AI model broad admin power over every table in the project. If the model misreads a prompt, it can drop tables or read private user rows.
How the goose supabase mcp server setup works
Goose acts as a local AI agent that runs tasks on your machine. It talks to external tools through the Model Context Protocol. When you add the Supabase server, Goose starts a local process for that tool. The server reads your database connection string or project key from your local settings. Then it opens a session to your Postgres instance to run queries for the agent.
Every Supabase project comes with a default postgres role that has admin privileges. Supabase does not grant full superuser status because superusers can run destructive operations. Even so, the default postgres role holds broad admin rights across your tables. The password you set when you create the project belongs to this postgres role. Supabase states that you should never give this password to a third-party service unless you trust it. Instead, Supabase recommends creating a new database user for every external service or tool.
Each project also includes built-in roles such as anon, authenticated, service_role, and authenticator. When an engineer sets up Goose, they must pick which database user the agent will use. A custom Postgres role with limited table grants is much safer than the default admin role. You create that dedicated role in your database and grant it read rights on specific schemas. Then you pass those limited credentials to the local server config.
What native roles solve and what they leave open
Database roles do a great job of deciding who can log in to your project. A custom Postgres user stops the AI agent from touching tables outside its assigned schema. If you only grant read privileges, the agent cannot delete rows or drop tables. This setup blocks broad destructive changes before they ever reach the database engine.
Kubernetes API Server Access + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Still, static roles only check permissions when the session starts or when a table is accessed. They do not inspect what individual queries do in flight within an allowed table. If an agent has read access to a customer table, it can select every column. That table might hold emails, phone numbers, card numbers, or national IDs. Native role grants do not rewrite those sensitive fields in query results before the model reads them.
Local config files also create a secret management problem for engineering teams. Every developer who runs Goose needs a valid database password stored on their laptop. Those static passwords sit in plain text files and rarely rotate. Also, shared database roles make auditing hard. When ten developers use the same service user, the database log only shows that single role name. You cannot tell which person or which agent prompt triggered a specific SQL statement. Teams also lack a way to pause a single risky command for human approval while letting safe reads pass.
Add query and result controls beside Postgres
Grants and pools govern who logs into PostgreSQL. Yet every query in an open session still runs with that role's full scope. In practice, hoop.dev runs beside your database as a sidecar for your Postgres. It reads plain and prepared queries on the wire with no change to your users or drivers.
When a tool or agent sends SQL, hoop.dev Postgres controls check each statement against your deny rules. An AI Analyzer you configure can also score intent or hold a risky query for human review. Matched sensitive columns in result rows are masked in memory before they reach the caller. Each query and decision is logged per listener, which generates evidence for SOC 2, HIPAA, and GDPR audits. View the binary on GitHub.
Frequently asked questions
Should I use the default postgres password for my Goose agent?
No, you should not use the default postgres password for an AI agent. That role has admin privileges across your project, so Supabase recommends making a separate user for each service.
How do I stop Goose from changing data in Supabase?
Create a dedicated Postgres user and grant it only select privileges on the tables it needs. Do not give the agent the default admin role or a role with write access.
Can Postgres roles hide emails or card numbers from the AI model?
Standard table grants allow or block access to whole tables or columns for a given user. They do not dynamically rewrite emails, phone numbers, or card numbers inside returned query rows.
Related guides
In this post