Supabase MCP Server

Supabase MCP Server

Enables notes management through MCP integration with a Supabase PostgreSQL database, supporting full CRUD operations. It features secure user data isolation using JWT authentication and Row Level Security policies.

Category
Visit Server

README

Supabase MCP Server - Notes Application

Description

A full-featured notes management application built with Model Context Protocol (MCP) integration and Supabase as the database backend. The application ensures secure user access with role-based isolation through combined protection at the application level (JWT) and database level (RLS policies).

Features

🔐 Security

  • OAuth 2.0 Authentication - supports Email/Password and GitHub login
  • JWT Token Validation - protects MCP endpoints
  • Row Level Security (RLS) - database policies for user data isolation
  • XSS Protection - HTML escape functions in client code

📝 Functionality

  • CRUD Operations - Create, read, update, and delete notes
  • User Association - each note is linked to its creator
  • Responsive Interface - optimized for all devices
  • User Management - login, registration, and logout

🏗️ Architecture

  • Backend: Node.js Express server with MCP integration
  • Frontend: HTML/CSS/JavaScript without external dependencies
  • Database: Supabase PostgreSQL
  • API: RESTful MCP endpoints with JWT authentication

Getting Started

Prerequisites

  • Node.js (v14+)
  • Supabase project (https://supabase.com)
  • Postman for API testing (optional)

Installation

  1. Navigate to project directory:
cd supabase-mcp-server
  1. Install dependencies:
npm install
  1. Configure .env file:
cp .env.example .env

Fill in the following values from your Supabase project:

SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
PORT=3000
  1. Start the server:
npm start

The server will start at http://localhost:3000

Usage

Frontend Application

  1. Open http://localhost:3000 in your browser
  2. Choose a login option:
    • Email/Password: Enter your email and password
    • GitHub: Click the GitHub button
  3. After login, you can:
    • Create notes - fill in title and content, click "Add"
    • Edit notes - click "Edit", make changes, click "Save"
    • Delete notes - click "Delete" and confirm

MCP Endpoints (Postman)

The application provides MCP endpoints for CRUD operations:

Postman Collection: Open postman_collection.json in Postman

Testing Steps:

  1. Log in to the frontend
  2. Copy the JWT token (displayed in the application)
  3. In Postman, go to Collection Variables
  4. Paste the token in the {{token}} variable
  5. Execute the requests

Technical Details

notes Table:

CREATE TABLE notes (
  id BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
  user_id UUID REFERENCES auth.users(id) ON DELETE CASCADE,
  title TEXT NOT NULL,
  content TEXT,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

RLS Policies

Four RLS policies protect data access:

Policy Operation Condition
Users see own notes SELECT auth.uid() = user_id
Users insert own notes INSERT auth.uid() = user_id
Users update own notes UPDATE auth.uid() = user_id
Users delete own notes DELETE auth.uid() = user_id

Local Testing

  1. Open two browser windows - one for each user
  2. Log in with different accounts
  3. Create notes in each account
  4. Verify that each user sees only their own notes

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured