✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

Clipboard to Supabase MCP Helper

A local agent that monitors the system clipboard, uploads any copied image to Supabase Storage, then writes the public (or signed) URL back to the clipboard.

Features

  • Zero-click image hosting: Copy an image, get a URL instantly
  • Low latency: Under 800ms from copy to URL
  • Cross-platform: Works on macOS, Windows, and Linux
  • MCP integration: Expose clipboard image upload as an MCP endpoint
  • Auto-start: Configure to run at system startup
  • Efficient detection: Hash-based deduplication with low CPU usage

Prerequisites

  • Node.js 18+
  • Supabase account with Storage enabled
  • Platform-specific dependencies:
    • macOS: pngpaste (brew install pngpaste)
    • Windows/Linux: Native OS clipboard access

Installation

  1. Clone the repository:
git clone https://github.com/martinbowling/clipboard-to-supabase-mcp-helper.git
cd clipboard-to-supabase-mcp-helper
  1. Install dependencies:
npm install
  1. Create a .env file based on .env.example:
SUPABASE_URL=https://<project>.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
BUCKET=media
MCP_PORT=3333
  1. Test your Supabase connection:
npm run test:supabase
  1. Build the project:
npm run build
  1. Install as a system service:

For macOS:

npm run install:macos

For Linux:

npm run install:linux

For Windows:

npm run install:windows

Usage

Once installed and running, the helper will:

  1. Monitor your clipboard for image changes (polling every 300ms)
  2. Upload any copied images to your Supabase bucket
  3. Place the public URL back in your clipboard, ready to paste

Running the Service

The clipboard helper can be run in two modes:

Stdio Mode (Default)

npm start

This runs the MCP server with StdioServerTransport, ideal for command-line usage.

HTTP Mode

npm run start:http

This runs an Express HTTP server on port 3333 (configurable) with a proper REST API endpoint.

MCP Integration

The helper exposes the following MCP endpoints:

Upload Clipboard Image

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"
      }
    ]
  }
}

Cleanup Old Files

The helper also provides an MCP endpoint to manually trigger cleanup of old files.

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. If not provided, it will use the value from the RETENTION_DAYS environment variable.

How It Works

  1. Change Detection: Polls clipboard every 300ms and computes SHA-1 hash of image data
  2. Deduplication: Only processes new or changed images based on hash comparison
  3. Platform Adaptation: Uses platform-specific methods to capture clipboard images
  4. Supabase Integration: Uploads images to your Supabase bucket with unique UUIDs
  5. MCP Endpoint: Exposes functionality to AI agents via Model Context Protocol
  6. Automatic Cleanup: Periodically removes images older than the configured retention period (default: 30 days)

Platform-Specific Notes

macOS

  • Requires pngpaste: Install with brew install pngpaste
  • Uses LaunchAgents for auto-start

Windows

  • Uses PowerShell’s System.Windows.Forms.Clipboard for image capture
  • Uses Windows Registry for auto-start

Linux

  • Uses xclip (X11) or wl-paste (Wayland) for clipboard access
  • Uses systemd for auto-start

Development

# Run with live reload (stdio mode)
npm run dev

# Run with live reload (HTTP mode)
npm run dev:http

# Build for production
npm run build

# Run stdio version
npm start

# Run HTTP version
npm run start:http

License

MIT

Clipboard Image Uploader

Project Details

Recomended MCP Servers

Federal Reserve Economic Data Server
Federal Reserve Economic Data Server

Open-source FRED MCP Server (Federal Reserve Economic Data)

AiryLark Translation Server
AiryLark Translation Server

强大的MCP翻译服务器!#AiryLarkMCP 🌐 专为专业翻译人员设计: • 三阶段翻译流程:分析规划、精准翻译、全文审校 • 自动识别专业领域术语 • 提供全面翻译质量评估 • 支持多语种互译 • 保持原文风格与专业性 💯 无缝集成Claude/Cursor等支持MCP的AI助手,让AI翻译达到专业水准!

🧩
Instagram Video Downloader

MCP service for downloading Instagram videos

CoinMarketCap MCP Server
CoinMarketCap MCP Server

Real-time access to cryptocurrency data from the CoinMarketCap API.

Yudao UI Admin Vue3
Yudao UI Admin Vue3

芋道管理后台,基于 Vue3 + Element Plus 实现,支持 RBAC 动态权限、数据权限、SaaS 多租户、Flowable 工作流、三方登录、支付、短信、商城、CRM、ERP、AI 大模型等功能。

AutoGen
AutoGen

A programming framework for agentic AI 🤖 PyPi: autogen-agentchat Discord: https://aka.ms/autogen-discord Office Hour: https://aka.ms/autogen-officehour

🧩
Project Content Server
box3-engine-openapi-mcp
box3-engine-openapi-mcp

基于 Model Context Protocol (MCP) 的服务器,提供对神岛引擎开放接口整合工具。

SysOperator
SysOperator

MCP for Ansible, Terraform, LocalStack, and other IaC tools. Create and iterate IaC

Discord Relay
Discord Relay
🧩
Simple Website Fetching Tool

The official Python SDK for Model Context Protocol servers and clients

🧩
Webhook Forwarder and Inspector

webhook forwarder and inspector by manus

Featured Templates

View More
AI Engineering
Python Bug Fixer
119 1433
Data Analysis
Pharmacy Admin Panel
252 1957
AI Characters
Your Speaking Avatar
169 928
Customer service
Multi-language AI Translator
136 921
AI Assistants
Image to text with Claude 3
152 1366

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.