The Supabase MCP Server is a powerful tool that provides administrative control over your Supabase PostgreSQL database through Cursor's Composer and Codeium's Cascade. It enables seamless database management with features for table operations, record management, schema modifications, and more - all through natural language commands.
Clone the repository and install dependencies:
git clone https://github.com/Quegenx/supabase-mcp-server.git
cd supabase-mcp-server
npm install
npm run build
Find your Node.js path:
# On Mac/Linux
which node
# On Windows
where node
command
(stdio transport)/path/to/node /path/to/dist/index.js postgresql://postgres.[PROJECT-ID]:[PASSWORD]@aws-0-eu-central-1.pooler.supabase.com:5432/postgres
Create or edit ~/.codeium/windsurf/mcp_config.json
:
{
"mcpServers": {
"supabase-mcp": {
"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"
]
}
}
}
In Cascade:
Once configured, you can manage your database through natural language commands:
Node.js Path Issues
which node
or where node
File Path Issues
/Users/username/projects/supabase-mcp-server/dist/index.js
MCP Not Detecting Tools
For detailed logs, add DEBUG=true
to your command:
DEBUG=true /usr/local/bin/node /path/to/dist/index.js [connection-string]
"C:\\Program Files\\nodejs\\node.exe" "C:\\path\\to\\dist\\index.js" "postgresql://..."
chmod +x /path/to/dist/index.js
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.