Supabase Storage MCP
Provides comprehensive file and bucket management capabilities for Supabase Storage, including secure file uploads, batch operations, image transformations, signed URL generation, and advanced security features with audit logging.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Supabase Storage MCP upload my profile picture from /photos/avatar.jpg to the users bucket"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Supabase Storage MCP
A secure, production-ready Model Context Protocol (MCP) server for Supabase Storage with advanced security features, batch operations, and comprehensive file management.
Features
π‘οΈ Enterprise-Grade Security
Multi-layer Defense: Rate limiting, threat detection, and audit logging
Input Validation: Comprehensive validation with Zod schemas and DOMPurify sanitization
Real-time Monitoring: Security metrics and alert system
Path Traversal Prevention: Advanced protection against directory traversal attacks
File Type Validation: MIME type verification and file signature checking
ποΈ Bucket Management
Secure Bucket Creation: Create storage buckets with security validation
Organized Structure: Automated folder organization for scalable workflows
Batch Setup: Initialize multiple buckets with consistent configuration
πΌοΈ Advanced File Operations
Batch Upload: Upload 1-500 files with progress tracking and detailed reporting
Dual Input Support: Handle both local file paths and base64 data (Claude Desktop compatible)
File Validation: Size limits, MIME type checking, and signature verification
Transform on Download: Resize, compress, and format images during download
Auto-Download System: Generate JavaScript code for browser downloads
π File Management
Secure Downloads: Time-limited signed URLs with access controls
Batch Operations: Process multiple files efficiently
Advanced Search: Filter by extension, folder, and metadata
Custom Filenames: Override default names during download
π Auto-Download Features
Intelligent Triggers: Automatic browser downloads with custom filenames
Batch Downloads: Sequential downloads with configurable delays
JavaScript Generation: Ready-to-use browser scripts
Multiple Formats: Support for signed URLs, base64, and binary data
Related MCP server: Supabase MCP Server - Self-Hosted Edition
Installation
Prerequisites
Node.js >= 18.0.0
npm >= 8.0.0
Supabase project with Storage enabled
Setup
Clone and install dependencies:
git clone https://github.com/your-username/supabase-storage-mcp.git
cd supabase-storage-mcp
npm installConfigure environment variables:
cp .env.example .envEdit .env with your Supabase credentials:
SUPABASE_URL=https://your-project-id.supabase.co
SUPABASE_SERVICE_KEY=your-service-role-key
NODE_ENV=productionBuild the project:
npm run buildStart the MCP server:
npm startConfiguration
Claude Desktop Integration
Add to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"supabase-storage": {
"command": "node",
"args": ["/path/to/supabase-storage-mcp/dist/index.js"],
"description": "Supabase Storage MCP for file and bucket management"
}
}
}Environment Variables
Variable | Required | Description | Default |
| β | Your Supabase project URL | - |
| β | Your Supabase service role key | - |
| β | Environment mode |
|
| β | Logging verbosity |
|
Security Configuration
The server includes comprehensive security features enabled by default:
Rate limiting (100 requests per minute globally)
File size limits (50MB per file, 500 files per batch)
MIME type restrictions (images only by default)
Path traversal protection
Input sanitization
Usage
Basic Bucket Operations
// Create a storage bucket
await mcp.call('create_bucket', {
bucket_name: 'my-images',
is_public: false
});
// Setup standard bucket structure
await mcp.call('setup_buckets', {
base_bucket_name: 'storage',
user_id: 'user123'
});File Upload
// Upload multiple images (file paths)
await mcp.call('upload_image_batch', {
bucket_name: 'storage-images',
batch_id: 'batch001',
folder_prefix: 'original',
user_id: 'user123',
image_paths: ['/path/to/image1.jpg', '/path/to/image2.png']
});
// Upload with base64 data (Claude Desktop compatible)
await mcp.call('upload_image_batch', {
bucket_name: 'storage-images',
batch_id: 'batch002',
folder_prefix: 'original',
user_id: 'user123',
image_data: [
{
filename: 'image1.jpg',
content: 'data:image/jpeg;base64,/9j/4AAQSkZJRg...',
mime_type: 'image/jpeg'
}
]
});File Management
// List files in a bucket
await mcp.call('list_files', {
bucket_name: 'storage-images',
folder_path: 'original/user123',
file_extension: '.jpg'
});
// Generate signed download URLs
await mcp.call('get_file_url', {
bucket_name: 'storage-images',
storage_path: 'original/user123/batch001/image1.jpg',
expires_in: 3600
});
// Batch signed URLs
await mcp.call('create_signed_urls', {
bucket_name: 'storage-images',
file_paths: ['path1.jpg', 'path2.png'],
expires_in: 1800
});Advanced Downloads
// Download with auto-trigger
await mcp.call('download_file_with_auto_trigger', {
bucket_name: 'storage-images',
file_path: 'original/user123/image1.jpg',
return_format: 'base64',
auto_download: true,
custom_filename: 'my-image.jpg'
});
// Batch download with auto-trigger
await mcp.call('batch_download', {
bucket_name: 'storage-images',
file_paths: ['image1.jpg', 'image2.png'],
return_format: 'signed_url',
auto_download: true,
download_delay: 1000
});Image Transformations
// Download with transformations
await mcp.call('download_file', {
bucket_name: 'storage-images',
file_path: 'original/image1.jpg',
return_format: 'base64',
transform_options: {
width: 800,
height: 600,
quality: 85
}
});Security Monitoring
// Get security status
await mcp.call('get_security_status', {});API Reference
Tools
Tool Name | Description |
| Create a new storage bucket |
| Initialize standard bucket structure |
| Upload multiple files with validation |
| List files in bucket with filtering |
| Generate signed download URL |
| Generate multiple signed URLs |
| Download file content with transformations |
| Download with auto-download JavaScript |
| Download multiple files with auto-trigger |
| Get security metrics and status |
File Organization
The server automatically organizes uploaded files in a structured format:
bucket-name/
βββ original/
β βββ {user_id}/
β βββ {batch_id}/
β βββ image1.jpg
β βββ image2.png
βββ processed/
βββ {user_id}/
βββ {batch_id}/
βββ thumb_image1.jpg
βββ optimized_image2.pngSecurity
Built-in Protections
Rate Limiting: Prevents API abuse
Input Validation: Sanitizes all inputs
File Validation: MIME type and signature checking
Path Security: Prevents directory traversal
Size Limits: Configurable file and batch size limits
Audit Logging: Complete operation tracking
Security Best Practices
Store your service role key securely
Use environment variables for configuration
Monitor security logs regularly
Keep dependencies updated
Use HTTPS in production
Performance
Batch Upload Performance
Small batches (1-25 files): ~15-30 seconds
Medium batches (26-100 files): ~45-90 seconds
Large batches (101-500 files): ~3-8 minutes
Parallel uploads: 3 concurrent streams
Memory efficient: Streams large files
Download Performance
File URL generation: <50ms per URL
Direct downloads: 100-500ms per file
Batch operations: ~600 files per minute
Transform on download: 200-800ms per image
Development
Build
npm run buildDevelopment Mode
npm run devSecurity Audit
npm run security-checkContributing
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
Issues: GitHub Issues
Documentation: This README and inline code comments
Community: Discussions
Built with β€οΈ for the MCP and Supabase communities.
Available Tools
10 toolsbatch_downloadC
Download multiple files with optional auto-download triggers and batch processing
Inputs: bucket_name (required), file_paths (required), return_format, auto_download, +2 more.
create_bucketB
Create a new storage bucket with comprehensive security validation and audit logging
Inputs: bucket_name (required), is_public.
create_signed_urlsC
Generate multiple signed download URLs in a single request for batch operations
Inputs: bucket_name (required), file_paths (required), expires_in.
download_fileC
Download file content directly with optional image transformations
Inputs: bucket_name (required), file_path (required), return_format, transform_options.
download_file_with_auto_triggerC
Download file with optional auto-download trigger and custom filename support
Inputs: bucket_name (required), file_path (required), return_format, auto_download, +2 more.
get_file_urlB
Generate signed download URL for secure file access
Inputs: bucket_name (required), storage_path (required), expires_in.
get_security_statusA
Get current security configuration and audit information
Inputs: no named parameters.
list_filesC
Enumerate files in bucket folder for processing or download
Inputs: bucket_name (required), folder_path, file_extension.
setup_bucketsC
Initialize standard storage buckets for organized file management workflows
Inputs: base_bucket_name, user_id.
upload_image_batchC
Upload multiple images to designated bucket and folder (supports both file paths and base64 data)
Inputs: bucket_name (required), batch_id (required), folder_prefix (required), user_id (required), +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 10 tools
There is significant overlap between download-related tools (batch_download, download_file, download_file_with_auto_trigger, get_file_url, create_signed_urls) that could cause confusion about which to use for different download scenarios. However, the descriptions help clarify some distinctions like batch operations versus single file downloads. The upload and bucket management tools are more clearly differentiated.
Most tools follow a consistent verb_noun pattern (create_bucket, download_file, list_files, upload_image_batch) with clear action-oriented names. The main deviation is 'get_file_url' and 'get_security_status' which use 'get' instead of more specific verbs like 'generate' or 'retrieve', but overall the naming is quite readable and predictable.
With 10 tools, this is a reasonable number for a storage management server. The count feels slightly high due to the multiple overlapping download tools, but it covers core storage operations (upload, download, bucket management, security) without being overwhelming. A more consolidated download interface could reduce the count to be more optimal.
The toolset provides good coverage of storage operations including CRUD-like functionality (upload, download, list), bucket management (create, setup), and security features. Minor gaps include missing file deletion, bucket deletion, and file metadata updates, but agents can accomplish most storage workflows with the available tools.
Maintenance
Related MCP Connectors
Browse, upload, download, and share files in your S3-compatible buckets with delegated roles.
Manage Supabase projects end to end across database, auth, storage, realtime, and migrations. Moniβ¦
Your Supabase account in natural language: run SQL, apply migrations, manage tables, storage, edge f
Hosted file storage for agents: upload, list, download, share by link, expire, scratch.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables minimal interaction with Supabase databases through 4 essential tools for data querying, mutations, file storage, and user authentication. Designed for 70% less context usage than standard implementations with auto-truncated results and simplified parameters.2MIT
- FlicenseNot gradedqualityFmaintenanceEnables comprehensive management of self-hosted or cloud Supabase instances with 54+ tools for database operations, authentication, storage, real-time subscriptions, migrations, monitoring, and security auditing.7-
- AlicenseAqualityDmaintenanceEnables interaction with S3-compatible storage services like AWS S3 and Cloudflare R2, supporting bucket management, object listing, reading, uploading, and deletion operations.515 npmISC
- AlicenseNot gradedqualityDmaintenanceEnables seamless integration with Backblaze B2 cloud storage for managing buckets, uploading/downloading files, handling large multipart uploads, and managing application keys through natural language interactions.17 npm2MIT