This MCP server monitors your system clipboard, automatically uploads copied images to Supabase Storage, and returns the public URL to your clipboard—making image sharing seamless and efficient with sub-800ms latency.
pngpaste
(brew install pngpaste
)git clone https://github.com/martinbowling/clipboard-to-supabase-mcp-helper.git
cd clipboard-to-supabase-mcp-helper
npm install
Create a .env
file with your Supabase credentials:
SUPABASE_URL=https://<project>.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
BUCKET=media
MCP_PORT=3333
npm run test:supabase
npm run build
For macOS:
npm run install:macos
For Linux:
npm run install:linux
For Windows:
npm run install:windows
Once installed and running, the helper automatically:
npm start
npm run start:http
This runs an Express HTTP server on port 3333 (configurable).
With HTTP server mode:
POST http://localhost:3333/mcp
Request body:
{
"id": "1",
"jsonrpc": "2.0",
"method": "tool",
"params": {
"name": "upload_clipboard_image",
"input": {}
}
}
Response:
{
"id": "1",
"jsonrpc": "2.0",
"result": {
"content": [
{
"type": "text",
"text": "https://your-project.supabase.co/storage/v1/object/public/media/clips/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.png"
}
]
}
}
Request body:
{
"id": "1",
"jsonrpc": "2.0",
"method": "tool",
"params": {
"name": "cleanup_old_files",
"input": {
"days": 30
}
}
}
Response:
{
"id": "1",
"jsonrpc": "2.0",
"result": {
"content": [
{
"type": "text",
"text": "Cleanup completed: Deleted 5 files older than 30 days. Failed: 0."
}
]
}
}
The days
parameter is optional and defaults to the value in the RETENTION_DAYS
environment variable.
pngpaste
: Install with brew install pngpaste
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.