The SSE protocol will be deprecated soon. Please use streamable-http as the connectionType moving forward.

Prerequisites

To get the most out of this guide, you’ll need to:

1. Create a Supabase MCP Server

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

Request

curl --request POST \
  --url https://api.klavis.ai/mcp-server/instance/create \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "serverName": "Supabase",
  "userId": "<YOUR_USER_ID>",
  "platformName": "<YOUR_PLATFORM_NAME>"
}'

Response

{
  "serverUrl": "https://supabase-mcp-server.klavis.ai/sse?instance_id=<instance-id>",
  "instanceId": "<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:

const authUrl = `https://api.klavis.ai/oauth/supabase/authorize?instance_id=${instanceId}`;
window.location.href = authUrl;

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-token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "instanceId": "<string>",
  "authToken": "<string>"
}'

Response

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

Watch the Example

Explore MCP Server Tools