No-Code

Connect to enterprise-grade MCP servers instantly!Klavis MCP Servers - No Code CreationGet Started →

For Developer

Follow the instructions below to integrate Supabase MCP server to your API or SDK.

Prerequisites

1. Create a Supabase MCP Server

Use the following endpoint to create a new remote Supabase MCP server instance:

Request

from klavis import Klavis
from klavis.types import McpServerName

klavis_client = Klavis(api_key="<YOUR_API_KEY>")

# Create a Supabase MCP server instance
supabase_server = klavis_client.mcp_server.create_server_instance(
    server_name=McpServerName.SUPABASE,
    user_id="<YOUR_USER_ID>",
    platform_name="<YOUR_PLATFORM_NAME>",
)

Response

{
  "serverUrl": "https://supabase-mcp-server.klavis.ai/mcp/?instance_id=<instance-id>",
  "instanceId": "<instance-id>",
  "oauthUrl": "https://api.klavis.ai/oauth/supabase/authorize?instance_id=<instance-id>"
}
serverUrl specifies the endpoint of the Supabase MCP server, which you can connect and use this MCP Server with your Supabase databases and services.
instanceId is used for authentication and identification of your server instance.
If you want to enable your MCP server to access your private Supabase infomation:

Option 1: Supabase OAuth Flow

To enable your MCP server to access your private Supabase information through OAuth:
import webbrowser

webbrowser.open(supabase_server.oauth_url)

Option 2: Set Auth Token

Instead of OAuth, you can also set your Supabase personal access token by calling our endpoint below:
curl --request POST \
  --url https://api.klavis.ai/mcp-server/instance/set-auth \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "instanceId": "<string>",
  "authData": {
    "token": "<string>"
  }
}'

Response

{
  "success": true,
  "message": "<string>"
}

Watch the Example

Explore MCP Server Tools

For more details about tool input schema, use the list_tool API.