What is Quegenx supabase mcp server
Supabase MCP Server ๐
*
*
*
*
*
*
๐ฅ A powerful Model Context Protocol (MCP) server that provides full administrative control over your Supabase PostgreSQL database through both Cursor's Composer and Codeium's Cascade. This tool enables seamless database management with comprehensive features for table operations, record management, schema modifications, and more.
๐ Table of Contents
- Prerequisites
- Quick Start
- Integrations
- Features
- Usage
- Security Notes
- Troubleshooting
- Contributing
- License
๐ง Prerequisites
- Node.js >= 16.x
- npm >= 8.x
- A Supabase project with:
- Project ID
- Database password
- PostgreSQL connection string
- Cursor IDE or Codeium's Cascade (for paying users)
๐ Quick Start
๐ฅ Installation
# Clone the repository
git clone https://github.com/Quegenx/supabase-mcp-server.git
cd supabase-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
โ๏ธ Configuration
-
Install dependencies and build the project:
npm install npm run build
-
In Cursor's MCP settings, add the server with this command:
/opt/homebrew`/bin/node` /path/to/dist/index.js postgresql://postgres.[PROJECT-ID]:[PASSWORD]@aws-0-eu-central-1.pooler.supabase.com:5432/postgres
Replace:
/path/to/dist/index.js
with your actual path[PROJECT-ID]
with your Supabase project ID[PASSWORD]
with your database password
Note: Keep your database credentials secure and never commit them to version control.
๐ฏ Integrations
Cursor MCP Integration
The Model Context Protocol (MCP) allows you to provide custom tools to agentic LLMs in Cursor. This server can be integrated with Cursor's Composer feature, providing direct access to all database management tools through natural language commands.
Setting up in Cursor
-
Open Cursor Settings > Features > MCP
-
Click the "+ Add New MCP Server" button
-
Fill in the modal form:
- Name: "Supabase MCP" (or any nickname you prefer)
- Type:
command
(stdio transport) - Command: Your full command string with connection details
-
Build the project first:
npm install npm run build
-
Get your Node.js path:
# On Mac/Linux which node # On Windows where node
-
Add the server command:
/path/to/node /path/to/dist/index.js postgresql://postgres.[PROJECT-ID]:[PASSWORD]@aws-0-eu-central-1.pooler.supabase.com:5432/postgres
Replace:
/path/to/node
with your actual Node.js path (from step 5)/path/to/dist/index.js
with your actual path to the built JavaScript file[PROJECT-ID]
with your Supabase project ID[PASSWORD]
with your database password
-
Click "Add Server" and then click the refresh button in the top right corner
Using the Tools in Cursor
The Composer Agent will automatically detect and use relevant tools when you describe your database tasks. For example:
- "List all tables in my database"
- "Create a new users table"
- "Add an index to the email column"
When the agent uses a tool, you'll see:
- A prompt to approve/deny the tool call
- The tool call arguments (expandable)
- The response after approval
Note: For stdio servers like this one, the command should be a valid shell command. If you need environment variables, consider using a wrapper script.
Windsurf/Cascade Integration
This MCP server also supports Codeium's Cascade (Windsurf) integration. Note that this feature is currently only available for paying individual users (not available for Teams or Enterprise users).
Setting up with Cascade
-
Create or edit
~/.codeium/windsurf/mcp_config.json
:{ "mcpServers": { "supabase-mcp": { ```json "command": "/path/to/node" ```, "args": [ "/path/to/dist/index.js", "postgresql://postgres.[PROJECT-ID]:[PASSWORD]@aws-0-eu-central-1.pooler.supabase.com:5432/postgres" ] } } }
-
Quick access to config:
- Find the toolbar above the Cascade input
- Click the hammer icon
- Click "Configure" to open mcp_config.json
-
Replace in the configuration:
/path/to/node
with your actual Node.js path/path/to/dist/index.js
with your actual path[PROJECT-ID]
with your Supabase project ID[PASSWORD]
with your database password
-
In Cascade:
- Click the hammer icon in the toolbar
- Click "Configure" to verify your setup
- Click "Refresh" to load the MCP server
- Click the server name to see available tools
Important Notes for Cascade Users
- Only tools functionality is supported (no prompts or resources)
- MCP tool calls will consume credits regardless of success or failure
- Image output is not supported
- Only stdio transport type is supported
- Tool calls can invoke code written by arbitrary server implementers
- Cascade does not assume liability for MCP tool call failures
โจ Features
๐ฏ Available Database Tools
Table Management
- Tables:
list_tables
,create_table
,drop_table
,rename_table
- Columns:
add_column
,drop_column
,alter_column
- Records:
fetch_records
,create_record
,update_record
,delete_record
Indexes & Constraints
- Indexes:
list_indexes
,create_index
,delete_index
,update_index
- Constraints:
list_constraints
,add_constraint
,remove_constraint
,update_constraint
Database Functions & Triggers
- Functions:
list_functions
,create_function
,update_function
,delete_function
- Triggers:
list_triggers
,create_trigger
,update_trigger
,delete_trigger
Security & Access Control
- Policies:
list_policies
,create_policy
,update_policy
,delete_policy
- Roles:
list_roles
,create_role
,update_role
,delete_role
Storage Management
- Buckets:
list_buckets
,create_bucket
,delete_bucket
- Files:
delete_file
,bulk_delete_files
- Folders:
list_folders
Data Types & Publications
- Enumerated Types:
list_enumerated_types
,create_enumerated_type
,update_enumerated_type
,delete_enumerated_type
- Publications:
list_publications
,create_publication
,update_publication
,delete_publication
Realtime Features
- Policies:
list_realtime_policies
,create_realtime_policy
,update_realtime_policy
,delete_realtime_policy
- Channels:
list_realtime_channels
,manage_realtime_channels
,send_realtime_message
,get_realtime_messages
- Management:
manage_realtime_status
,manage_realtime_views
User Management
- Auth:
list_users
,create_user
,update_user
,delete_user
Direct SQL Access
- Query:
query
- Execute custom SQL queries
๐ Key Benefits
- Natural Language Control: Manage your Supabase database through simple conversational commands
- Comprehensive Coverage: Full suite of tools covering tables, records, indexes, functions, security, and more
- Seamless Integration: Works directly within Cursor's Composer and Codeium's Cascade
- Developer Friendly: Reduces context switching between IDE and database management tools
- Secure Access: Maintains your database security with proper authentication
๐ Project Structure
supabase-mcp-server/
โโโ dist/ # Compiled JavaScript files
โ โโโ index.d.ts # TypeScript declarations
โ โโโ index.js # Main JavaScript file
โโโ src/ # Source code
โ โโโ index.ts # Main TypeScript file
โโโ package.json # Project configuration
โโโ package-lock.json # Dependency lock file
โโโ tsconfig.json # TypeScript configuration
๐ก Usage
Once configured, the MCP server provides all database management tools through Cursor's Composer. Simply describe what you want to do with your database, and the AI will use the appropriate commands.
Examples:
- ๐ "Show me all tables in my database"
- โ "Create a new users table with id, name, and email columns"
- ๐ "Add an index on the email column of the users table"
๐ Security Notes
- ๐ Keep your database connection string secure
- โ ๏ธ Never commit sensitive credentials to version control
- ๐ฎ Use appropriate access controls and permissions
- ๐ก๏ธ Validate and sanitize all inputs to prevent SQL injection
๐ ๏ธ Troubleshooting
Common Connection Issues
-
Node.js Path Issues
- Ensure you're using the correct Node.js path
- On Mac/Linux: Use
which node
to find the correct path - On Windows: Use
where node
to find the correct path - Replace
/usr/local
/bin/node`` with your actual Node.js path
-
File Path Issues
- Use absolute paths instead of relative paths
- On Mac/Linux: Use
pwd
in the project directory to get the full path - On Windows: Use
cd
to get the full path - Example:
/Users/username/projects/supabase-mcp-server/dist/index.js
-
MCP Not Detecting Tools
- Click the refresh button in Cursor's MCP settings
- Ensure the server is running (no error messages)
- Check if your connection string is correct
- Verify your Supabase credentials are valid
-
Permission Issues
- Make sure the
dist
directory exists (runnpm run build
) - Check file permissions (
chmod +x
on Unix systems) - Run
npm install
with appropriate permissions
- Make sure the
Debug Mode
Add DEBUG=true
before your command to see detailed logs:
DEBUG=true `/usr/local`/bin/node`` /path/to/dist/index.js [connection-string]
Platform-Specific Notes
Windows Users
# Use this format for the command
"C:\\Program Files\\nodejs\\node.exe" "C:\\path\\to\\dist\\index.js" "postgresql://..."
Linux Users
# Find Node.js path
which node
# Make script executable
chmod +x /path/to/dist/index.js
If you're still experiencing issues, please open an issue with:
- Your operating system
- Node.js version (
node --version
) - Full error message
- Steps to reproduce
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
๐ License
Leave a Comment
Frequently Asked Questions
What is MCP?
MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.
What are MCP Servers?
MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.
How do MCP Servers work?
MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.
Are MCP Servers secure?
Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.
Related MCP Servers
chrisdoc hevy mcp
sylphlab pdf reader mcp
An MCP server built with Node.js/TypeScript that allows AI agents to securely read PDF files (local or URL) and extract text, metadata, or page counts. Uses pdf-parse.
aashari mcp server atlassian bitbucket
Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.
aashari mcp server atlassian confluence
Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP interface.
prisma prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
Zzzccs123 mcp sentry
mcp sentry for typescript sdk
zhuzhoulin dify mcp server
zhongmingyuan mcp my mac
zhixiaoqiang desktop image manager mcp
MCP ๆๅกๅจ๏ผ็จไบ็ฎก็ๆก้ขๅพ็ใๆฅ็่ฏฆๆ ใๅ็ผฉใ็งปๅจ็ญ๏ผๅฎๅ จ่ฎฉTraeๅฎ็ฐ๏ผ
zhixiaoqiang antd components mcp
An MCP service for Ant Design components query | ไธไธชๅๅฐ Ant Design ็ปไปถไปฃ็ ็ๆๅนป่ง็ MCP ๆๅก๏ผๅ ๅซ็ณป็ปๆ็คบ่ฏใ็ปไปถๆๆกฃใAPI ๆๆกฃใไปฃ็ ็คบไพๅๆดๆฐๆฅๅฟๆฅ่ฏข
Submit Your MCP Server
Share your MCP server with the community
Submit Now