Skip to main content
Glama
Supabase GodMode MCP Server

Supabase GodMode MCP Server

by prompted365

Supabase GodMode MCP Server

Complete Supabase project management via Model Context Protocol (MCP) with OAuth authentication.

Deploy to Smithery npm version License: MIT

πŸš€ Quick Start

One-click deploy to Smithery (recommended):

npx @smithery/cli install @prompted365/supabase-godmode --project_ref YOUR_PROJECT_REF

Or deploy from GitHub for automatic CD.

Related MCP server: Taskade MCP Server

✨ Features

  • Account Management - List projects, manage settings, handle billing

  • Database Operations - Execute SQL, inspect schema, manage tables

  • Edge Functions - Deploy, invoke, and monitor serverless functions

  • Storage Management - Upload files, manage buckets, set permissions

  • Documentation Access - Search docs, get code examples

  • OAuth Authentication - Secure token management with auto-refresh

πŸ“¦ Installation

One-click deployment with automatic builds and hosting:

npx @smithery/cli install @prompted365/supabase-godmode

πŸ“– Full deployment guide

Option 2: Local Development

# Clone repository
git clone https://github.com/prompted365/supabase-godmode.git
cd supabase-godmode

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run in development mode
npm run dev

πŸ“– See more installation options

βš™οΈ Configuration

Environment Variables

Create a .env file:

PROJECT_REF=your-project-ref
OAUTH_CLIENT_ID=your-oauth-client-id
OAUTH_CLIENT_SECRET=your-oauth-client-secret
FEATURES=docs,account,database,functions,storage

MCP Client Configuration

Warp Terminal

Add to your MCP configuration:

{
  "supabase-godmode": {
    "command": "node",
    "args": ["/path/to/supabase-godmode/dist/index.js"],
    "env": {
      "PROJECT_REF": "your-project-ref",
      "OAUTH_CLIENT_ID": "your-client-id",
      "OAUTH_CLIENT_SECRET": "your-client-secret"
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "supabase-godmode": {
      "command": "node",
      "args": ["/path/to/supabase-godmode/dist/index.js"],
      "env": {
        "PROJECT_REF": "your-project-ref"
      }
    }
  }
}

πŸ”§ Available Tools

Account Management

  • list-projects - Get all projects for authenticated user

  • get-project-settings - Retrieve project configuration

  • update-project-settings - Update project settings

Database Operations

  • execute-query - Run SQL queries against your database

  • list-tables - Get all tables in a schema

  • describe-table - Get detailed table schema information

  • create-table - Create new database tables

Edge Functions

  • list-functions - List all edge functions

  • deploy-function - Deploy or update a function

  • invoke-function - Test function execution

  • get-function-logs - Retrieve function logs

Storage Management

  • list-buckets - List all storage buckets

  • create-bucket - Create a new bucket

  • upload-file - Upload files to storage

  • list-files - List files in a bucket

  • delete-file - Remove files from storage

Documentation

  • search-docs - Search Supabase documentation

  • get-code-example - Get code examples for operations

πŸ’‘ Usage Examples

Query Database

// Through MCP client
await callTool('execute-query', {
  project_ref: 'abc123',
  query: 'SELECT * FROM users WHERE created_at > NOW() - INTERVAL \'7 days\'',
});

Deploy Edge Function

await callTool('deploy-function', {
  project_ref: 'abc123',
  function_name: 'hello-world',
  code: `
    export default async (req) => {
      return new Response('Hello World!', {
        headers: { 'Content-Type': 'text/plain' },
      });
    }
  `,
  verify_jwt: true,
});

Upload File to Storage

await callTool('upload-file', {
  project_ref: 'abc123',
  bucket: 'avatars',
  path: 'user-123/profile.png',
  file_data: base64EncodedData,
  content_type: 'image/png',
});

πŸ” OAuth Setup

1. Create OAuth Application

  1. Go to your Supabase project dashboard

  2. Navigate to Authentication > Providers

  3. Create a new OAuth application

  4. Set callback URL: http://localhost:3000/callback

  5. Copy client ID and secret

2. Configure Server

Add credentials to .env:

OAUTH_CLIENT_ID=your_client_id
OAUTH_CLIENT_SECRET=your_client_secret

3. Authenticate

On first run, the server will:

  1. Generate authorization URL

  2. Open browser for authentication

  3. Store tokens securely

  4. Auto-refresh when expired

πŸ› οΈ Development

Project Structure

supabase-godmode/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ server/
β”‚   β”‚   β”œβ”€β”€ index.ts          # Main server entry
β”‚   β”‚   β”œβ”€β”€ oauth.ts          # OAuth provider
β”‚   β”‚   └── tools/
β”‚   β”‚       β”œβ”€β”€ account.ts    # Account tools
β”‚   β”‚       β”œβ”€β”€ database.ts   # Database tools
β”‚   β”‚       β”œβ”€β”€ functions.ts  # Edge functions tools
β”‚   β”‚       β”œβ”€β”€ storage.ts    # Storage tools
β”‚   β”‚       └── docs.ts       # Documentation tools
β”‚   └── shared/
β”‚       └── types.ts          # TypeScript types
β”œβ”€β”€ smithery.yaml             # Smithery configuration
β”œβ”€β”€ package.json
└── tsconfig.json

Build Commands

# Development with hot reload
npm run dev

# Build for production
npm run build

# Run built server
npm start

# Run tests
npm test

Adding New Tools

  1. Create tool function in appropriate module

  2. Use Zod for parameter validation

  3. Handle errors consistently

  4. Return MCP-formatted responses

Example:

server.tool(
  'my-new-tool',
  {
    description: 'Description of what this tool does',
    parameters: z.object({
      param1: z.string().describe('First parameter'),
      param2: z.number().optional().describe('Optional parameter'),
    }),
  },
  async ({ param1, param2 }) => {
    try {
      // Tool implementation
      return {
        content: [
          {
            type: 'text',
            text: 'Result data',
          },
        ],
      };
    } catch (error: any) {
      return {
        content: [
          {
            type: 'text',
            text: `Error: ${error.message}`,
          },
        ],
        isError: true,
      };
    }
  }
);

πŸ”’ Security

  • Token Storage: OAuth tokens stored securely in memory

  • Auto-Refresh: Tokens refreshed automatically before expiration

  • Input Validation: All inputs validated with Zod schemas

  • SQL Injection: Use parameterized queries

  • Rate Limiting: Respects Supabase API rate limits

πŸ› Troubleshooting

Common Issues

OAuth Authentication Fails

  • Verify client ID and secret are correct

  • Check callback URL matches OAuth app settings

  • Ensure project reference is valid

Database Query Errors

  • Verify table/column names exist

  • Check user permissions

  • Review SQL syntax

Function Deployment Issues

  • Verify function code is valid TypeScript/JavaScript

  • Check function name is unique

  • Ensure sufficient permissions

Debug Mode

Enable detailed logging:

DEBUG=* npm run dev

🀝 Contributing

Contributions welcome! Please:

  1. Fork the repository

  2. Create a feature branch

  3. Add tests for new functionality

  4. Submit a pull request

License

MIT License - see LICENSE file for details

πŸ“š Documentation

πŸ’¬ Support

Acknowledgments


Prompted LLC - Making AI infrastructure accessible

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers