Skip to main content
Glama
martinbowling

Clipboard to Supabase MCP Helper

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

Related MCP server: clipboard-vision-mcp

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

Available Tools

2 tools
cleanup_old_filesD
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

upload_clipboard_imageD
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

D1.8/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: cleanup_old_files handles file management, while upload_clipboard_image handles image uploads. There is no overlap in functionality, making them easy to distinguish.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern with snake_case naming: cleanup_old_files and upload_clipboard_image. The naming is predictable and uniform across the set.

Tool Count2/5

With only 2 tools, the server feels thin for a 'Clipboard to Supabase MCP Helper' that might imply broader clipboard or Supabase integration. This minimal set likely leaves gaps in functionality.

Completeness2/5

Inferred domain includes clipboard operations and Supabase integration, but the tools only cover image uploads and file cleanup. Missing obvious functions like handling text/data from clipboard or other Supabase CRUD operations.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/martinbowling/clipboard-to-supabase-mcp-helper'

If you have feedback or need assistance with the MCP directory API, please join our Discord server