
List all API keys for a Supabase project. Use list_projects to find project refs.
Create a new API key for a Supabase project. Name must be lowercase alphanumeric/underscores only (e.g. 'mykey'). Use listprojects to find project refs.
Get details of a specific API key. Use listapikeys to find key IDs.
Update an API key's name or description. Name must be lowercase alphanumeric/underscores only. Use listapikeys to find key IDs.
Delete an API key from a Supabase project. Use listapikeys to find key IDs.
Get the auth configuration for a Supabase project. Includes email/phone settings, JWT config, and signup rules.
Update auth configuration for a Supabase project. Supports email/phone toggles, JWT expiry, signup, and token rotation.
List all database branches for a Supabase project. Requires branching to be enabled. Use list_projects to find refs.
Create a new database branch for a Supabase project. Requires branching to be enabled on the project.
Get a database branch by name. Use list_branches to find branch names.
Get details of a database branch by ID. Use list_branches to find branch IDs.
Update a database branch's name or git branch association. Use list_branches to find IDs.
Delete a database branch. This is irreversible. Use list_branches to find IDs.
Delete all database branches for a project. This is irreversible. Disables branching.
Push a database branch's migrations to the parent project. Use list_branches to find IDs.
Merge a database branch into the parent project. Use list_branches to find IDs.
Reset a database branch to match the parent project's schema. Use list_branches to find IDs.
Get the SQL diff between a database branch and its parent project. Use list_branches to find IDs.
Execute a SQL query against a Supabase project's database. Supports DDL (CREATE TABLE, ALTER) and DML (SELECT, INSERT, UPDATE, DELETE). Use list_projects to find refs.
List all edge functions for a Supabase project. Use list_projects to find project refs.
Create a new edge function in a Supabase project. Use list_projects to find project refs.
Get details of an edge function. Use listedgefunctions to find function slugs.
Update an edge function's name, body, or JWT settings. Use listedgefunctions to find slugs.
Delete an edge function from a Supabase project. Use listedgefunctions to find slugs.
List database migration history for a Supabase project. Use list_projects to find refs.
Create and execute a database migration for a Supabase project. Rolls back on failure. Use list_projects to find refs.
List all organizations the authenticated user belongs to.
Create a new Supabase organization.
List members of a Supabase organization. Use list_organizations to find the organization slug.
List all Supabase projects the authenticated user has access to.
Create a new Supabase project in an organization. Use list_organizations to find organization IDs.
Get details of a Supabase project by its reference ID. Use list_projects to find project refs.
Update a Supabase project's name. Use list_projects to find project refs.
Delete a Supabase project. This is irreversible. Use list_projects to find project refs.
Pause a Supabase project. Paused projects stop incurring compute costs. Use list_projects to find refs.
Restore a paused Supabase project. Use list_projects to find project refs.
Get health status of a Supabase project's services. Use list_projects to find project refs.
List all secrets for a Supabase project. Secret values may be redacted. Use list_projects to find refs.
Create or update secrets for a Supabase project (bulk). Each secret needs 'name' and 'value'.
Delete secrets from a Supabase project by name (bulk). Use list_secrets to find secret names.
List all SQL snippets accessible to the authenticated user.
Get a SQL snippet's details and content by ID. Use list_snippets to find snippet IDs.
Validate Supabase credentials by making a test API call. Returns success status and message.

In an mcp.json file, add the configuration below, and restart Cursor.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "url": "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
5 "headers": {
6 "Authorization": "Bearer yMt*****"
7 }
8 }
9 }
10}
11Open your Claude Desktop configuration file and add the server configuration below. You'll also need to restart the application for the changes to take effect.
Make sure Claude is using the Node v20+.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "mcp-remote@latest",
8 "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
9 "--header",
10 "Authorization: Bearer ${AUTH_TOKEN}"
11 ],
12 "env": {
13 "AUTH_TOKEN": "yMt*****"
14 }
15 }
16 }
17}Open your Windsurf MCP configuration file and add the server configuration below.
Click on the refresh button in the top right of the Manage MCP server page or in the top right of the chat box in the box icon.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "mcp-remote@latest",
8 "https://ah-api.merge.dev/api/v1/tool-packs/<tool-pack-id>/registered-users/<registered-user-id>/mcp",
9 "--header",
10 "Authorization: Bearer ${AUTH_TOKEN}"
11 ],
12 "env": {
13 "AUTH_TOKEN": "<ah-production-access-key>"
14 }
15 }
16 }
17 }In Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows), run "MCP: Open User Configuration".
You can then add the configuration below and press "start" right under servers. Enter the auth token when prompted.
Learn more in the official documentation ↗
1{
2 "inputs": [
3 {
4 "type": "promptString",
5 "id": "agent-handler-auth",
6 "description": "Agent Handler AUTH_TOKEN", // "yMt*****" when prompt
7 "password": true
8 }
9 ],
10 "servers": {
11 "agent-handler": {
12 "type": "stdio",
13 "command": "npx",
14 "args": [
15 "-y",
16 "mcp-remote@latest",
17 "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
18 "--header",
19 "Authorization: Bearer ${input:agent-handler-auth}"
20 ]
21 }
22 }
23}It's an MCP server that lets your agents interact directly with Supabase's backend platform via tools. Your agents can invoke these tools to run SQL queries, manage database migrations, deploy edge functions, configure project settings, and more.
Supabase offers an official MCP server, but you can also use one from a third-party platform, like Merge Agent Handler.
The use cases naturally depend on the agent you've built, but here are a few common ones:
Here are some of the most commonly used tools:
execute_query: runs a SQL statement against a Supabase Postgres database and returns the results. Use this when an agent needs to read, insert, update, or delete data as part of any data-driven workflowcreate_migration: generates and applies a new database migration to a Supabase project or branch. Good for workflows where schema changes need to be versioned and applied in response to a code or deployment eventlist_projects: returns all Supabase projects in the account along with their status and configuration metadata. Helpful when an agent needs to identify the correct project before running queries or applying changesget_project_health: checks the health status of a specific project, including database and API availability. Call this when an agent needs to confirm a project is operational before executing operations or after a deployment completescreate_edge_function: deploys a new edge function to a Supabase project with a specified name and code payload. Use this when an agent is provisioning serverless logic as part of a project setup or an automated release workflowcreate_secrets: stores environment secrets against a Supabase project, making them accessible to edge functions and server-side code. Use this when an agent is bootstrapping a new project and needs to configure third-party credentials without exposing them in source codeSupabase has its own official MCP server, but there are good reasons to run Supabase through Merge Agent Handler in production environments:
You can take the following steps:
1. Create or log into your Merge Agent Handler account and navigate to Tool Packs (collections of connector tools scoped to a specific use case).
2. Create a new Tool Pack, then find and enable the Supabase connector. Choose the tools that fit your workflow: execute_query and list_projects cover most read and reporting use cases, while create_migration, create_edge_function, and create_secrets are needed for agents that provision or modify infrastructure.
3. Add a Registered User inside the Tool Pack. This is the identity context under which your agent operates. Merge generates a unique MCP URL scoped to this user once it's created.
4. From the Registered User detail page, authenticate Supabase by completing the OAuth flow. Merge stores and manages the credentials going forward.
5. Copy the MCP URL from the Tool Pack detail page and generate an API key from Settings. You'll need both to connect your agent.
6. Add the MCP server to your agent or IDE using the MCP URL and API key. Your Supabase tools are now accessible through that endpoint.
Whether you're an engineer experimenting with agents or a product manager looking to add tools, you can get started for free now