Skip to main content
Supabase is an open-source backend platform that provides a hosted Postgres database, auth, storage, and realtime APIs. The Supabase MCP server exposes these capabilities as tools that can be used in MeshAgent. In this guide you’ll learn how to:
  • Create a Supabase account and access token
  • Quick start: Install a pre-built Supabase toolkit into Powerboards in minutes
  • Build and customize: Connect, test, and deploy the Supabase MCP server using the MeshAgent CLI

Supabase Setup (required for both paths)

  1. Create a Supabase account and a project at https://supabase.com.
  2. From the Project Settings -> General page you will see the Project ID (also called Project Reference). You will use this value to connect MeshAgent to your Supabase project.
  3. Create a Supabase access token. Go to Account Settings -> Access Tokens. Generate a new token and set an expiration date for it. Keep this value private.
Note: Each MCP connection is scoped to a single Supabase project. If you need to connect multiple projects, repeat the steps below with a different project reference and toolkit name.

Quickstart: Install via Powerboards

If you want to get up and running without using the MeshAgent CLI, you can install the Supabase toolkit directly into Powerboards.
  1. Click the link below to open the supabase toolkit installer: Install Supabase Toolkit in Powerboards.
  2. Powerboards will walk you through the setup, you will sign in, create/select a Project, create/select a room, then install the toolkit. You will need to paste in your Supabase Project ID and Supabase Access Token you generated above. Powerboards will automatically store the access token as a secret.
  3. Next, click the link to install an agent that uses the toolkit: Install Agent that Uses Supabase Toolkit in Powerboards.
  4. Follow the same process to install the agent.
Once installed, the Supabase toolkit will be available in your room. Any agent in the room with access to the toolkit can use it to interact with your Supabase project.

Build and Customize: CLI Guide

This path walks you through connecting and testing the Supabase MCP server locally, then deploying it as a persistent service. This is useful if you want to customize the toolkit, test changes before deploying, or understand how the pre-built Powerboards template works under the hood.

Prerequisites

Before you begin, make sure you have:
  • The MeshAgent CLI installed (either globally via brew install meshagent or in a python environment via uv add "meshagent[all]")
  • Connected to the MeshAgent project you want to work in (run meshagent setup to authenticate and select your project)
  • Room admin access to the room you plan to use
  • Your Supabase Project Reference and Access Token from the setup step above
Permissions note: Step 2 of this guide creates a room secret for another identity (the supabase toolkit). This requires you to be a room admin and have a participant token with api.secrets and api.admin grants. If you’re a room admin or project owner, when you run meshagent setup the CLI mints a participant token for you with those grants automatically. If you do not have a token with these grants ask an admin to do Step 2 for you.

Step 1: Export your credentials

Export your Supabase credentials so the following commands can reference them:
bash
export SUPABASE_PROJECT_REF="your_project_ref"
export SUPABASE_ACCESS_TOKEN="your_access_token"

Step 2: Store the access token as a room secret

Create a room-scoped secret so the MCP server can authenticate with Supabase. This stores your access token under the secret ID supabase and makes it available to the supabase identity (this is the identity we’ll use for the toolkit).
bash
meshagent setup # authenticate to MeshAgent if not already signed in

meshagent room secrets set \
  --room myroom \
  --secret-id supabase \
  --name supabase \
  --for-identity supabase \
  --text "$SUPABASE_ACCESS_TOKEN"
When you create a room secret with --for-identity supabase, that secret belongs to the supabase identity — not to you. Running meshagent room secrets list --room myroom while authenticated as yourself won’t show it.To view or delete secrets for another identity, you need to generate a participant token for that identity and temporarily act as them.1. Create a token request file (e.g. supabase_token.yaml):
version: v1
kind: ParticipantToken
identity: supabase
room: myroom
api:
  secrets: {}
2. Generate the token:
meshagent token generate --input supabase_token.yaml
Copy the token value, then export it along with your project and room:
export MESHAGENT_TOKEN="the_generated_token"
export MESHAGENT_ROOM="myroom"
export MESHAGENT_PROJECT_ID="your_project_id"
You can find your project ID by running meshagent project list or from the output of meshagent setup.3. View or delete the secrets:
meshagent room secrets list --room myroom
meshagent room secrets delete --room myroom --secret-id supabase
4. Unset the environment variables when you’re done — otherwise your CLI will continue executing commands using the token you created:
unset MESHAGENT_TOKEN MESHAGENT_ROOM MESHAGENT_PROJECT_ID
5. Reauthenticate and connect as yourself
meshagent setup

Step 3: Start the MCP Session

This command connects to the Supabase MCP server and exposes it as a toolkit in your room. The {supabase} placeholder in --header-secret resolves to the room secret you created in Step 2 (matching the --secret-id supabase). The project_ref parameter in the URL determines which Supabase project this toolkit can access. Agents or humans using this toolkit will only be able to interact with that specific project.
bash
meshagent mcp http \
  --room myroom \
  --toolkit-name supabase \
  --url "https://mcp.supabase.com/mcp?project_ref=$SUPABASE_PROJECT_REF" \
  --header-secret "Authorization:Bearer {supabase}" 
This will print an output like
Connecting to room...
INFO:mcp.client.streamable_http:Received session ID: ...
How can I see the MCP toolkit? Open a new terminal tab then run:
bash
meshagent setup # authenticate and connect to the same project
meshagent room agents list-toolkits --room myroom
You should see the supabase toolkit listed along with all its available tools. You can also verify in MeshAgent Studio. Navigate to myroom, open the menu in the upper left, and select Toolkits. You will see the supabase toolkit and its associated tools.

Step 4: Test with an agent

With the MCP session still running in your first terminal tab, from a second tab in your terminal start a chatbot agent that uses the Supabase toolkit:
bash
meshagent chatbot join \
  --room myroom \
  --agent-name supabase-agent \
  --require-toolkit supabase \
  --web-search \
  --room-rules "agents/supabase-agent/rules.txt" \
  --rule "You are an agent who helps users work with Supabase. Use the Supabase toolkit to interact with a specific Supabase project. If the web search tool is enabled, you can search the web to learn more about the latest updates to Supabase."
Note: The --room-rules flag is optional. It creates a file at the specified path that anyone in the room can edit to customize the agent’s rules. This is useful if you want to tweak the agent’s behavior without redeploying it.
Try it out in MeshAgent Studio:
  1. Enter myroom
  2. Select the supabase-agent from the participants list
  3. Ask the agent to perform a task, such as listing tables in your Supabase project.
  4. Optionally, click the + button and enable Web Search to let the agent look up Supabase documentation on the fly.
Now that you’ve tried it in MeshAgent Studio you can deploy the supabase toolkit and accompanying agent.

Step 5: Deploy the Supabase toolkit as a persistent service

Once you’ve verified everything works locally, you can deploy the Supabase toolkit as a persistent service so the toolkit stays available without a local terminal session. Create a ServiceTemplate configuration file, meshagent.yaml, that defines the service:
kind: ServiceTemplate
version: v1
metadata:
  name: mcp-supabase
  description: "Expose Supabase MCP tools via meshagent mcp http"
  annotations:
    meshagent.service.id: "mcp-supabase" # required for powerboards
variables:
  - name: supabase_project_ref
    description: "Supabase project ref (from project settings)"
  - name: supabase_access_token
    description: "Supabase access token"
    obscure: true
    annotations:
      meshagent.secret.id: supabase
      meshagent.secret.identity: supabase
      meshagent.secret.name: supabase
      meshagent.secret.type: text
container:
  image: "us-central1-docker.pkg.dev/meshagent-public/images/cli:{SERVER_VERSION}-esgz"
  command: >
    /usr/bin/meshagent mcp http
    --toolkit-name supabase
    --url 'https://mcp.supabase.com/mcp?project_ref={{ supabase_project_ref }}'
    --header-secret "Authorization:Bearer {supabase}"
  environment:
    - name: SUPABASE_PROJECT_REF
      value: "{{ supabase_project_ref }}"
    - name: MESHAGENT_TOKEN
      token:
        identity: supabase
        api:
          agents:
            register_public_toolkit: true
            register_private_toolkit: true
            register_agent: true
            call: true
            use_agents: true
            use_tools: true
          secrets: {}

Deploy the service template:
bash
meshagent service create-template \
  --file "meshagent.yaml" \
  --value supabase_project_ref=$SUPABASE_PROJECT_REF \
  --room myroom
Warning: This command will deploy the service, but if the room secret does not exist the container will exit with Secret 'supabase' not found and the toolkit will not register.
After deployment, the Supabase toolkit will be available to any participant or agent in the room without a local MCP session. To deploy the chatbot that uses the toolkit run:
bash
meshagent chatbot deploy \
  --service-name supabase-agent \
  --room myroom \
  --agent-name supabase-agent \
  --require-toolkit supabase \
  --web-search \
  --room-rules "agents/supabase-agent/rules.txt" \
  --rule "You are an agent who helps users work with Supabase. Use the Supabase toolkit to interact with a specific Supabase project. If the web search tool is enabled, you can search the web to learn more about the latest updates to Supabase."
Once the agent is deployed you’ll be able to interact with it from both MeshAgent Studio and Powerboards.

Publishing to Powerboards

Once you’re happy with your service template, you can make it installable via Powerboards so others can use it without going through the CLI steps.
  1. Push your meshagent.yaml to a GitHub Gist (or any publicly accessible URL).
  2. Click the Raw button on the gist to get the direct URL to the file.
  3. Construct the Powerboards install link: https://app.powerboards.com/install?url=YOUR_RAW_URL
Anyone who clicks that link will be able to install the toolkit into their own room — Powerboards handles secret creation and configuration for them.
Powerboards note: the ServiceTemplate includes a supabase_access_token variable with meshagent.secret.* annotations. Powerboards uses that to prompt for the token and store the room secret automatically. The CLI ignores those annotations, so you still need to set the room secret yourself before deploying the toolkit that uses the service from the command line.