Skip to main content
Glama
martinbowling

Clipboard to Supabase MCP Helper

Supabase MCP 도우미로 클립보드 전송

시스템 클립보드를 모니터링하고 복사된 이미지를 Supabase 저장소에 업로드한 다음 공개(또는 서명된) URL을 클립보드에 다시 쓰는 로컬 에이전트입니다.

특징

  • 클릭 없이 이미지 호스팅: 이미지를 복사하고 즉시 URL을 받으세요

  • 낮은 지연 시간: 복사에서 URL까지 800ms 미만

  • 크로스 플랫폼: macOS, Windows 및 Linux에서 작동합니다.

  • MCP 통합: 클립보드 이미지 업로드를 MCP 엔드포인트로 노출

  • 자동 시작: 시스템 시작 시 실행되도록 구성

  • 효율적인 감지: CPU 사용량이 낮은 해시 기반 중복 제거

Related MCP server: ClipMCP

필수 조건

  • 노드.js 18+

  • 저장소가 활성화된 Supabase 계정

  • 플랫폼별 종속성:

    • macOS: pngpaste ( brew install pngpaste )

    • Windows/Linux: 기본 OS 클립보드 액세스

설치

  1. 저장소를 복제합니다.

지엑스피1

  1. 종속성 설치:

npm install
  1. .env.example 기반으로 .env 파일을 만듭니다.

SUPABASE_URL=https://<project>.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
BUCKET=media
MCP_PORT=3333
  1. Supabase 연결을 테스트하세요.

npm run test:supabase
  1. 프로젝트를 빌드하세요:

npm run build
  1. 시스템 서비스로 설치:

macOS의 경우:

npm run install:macos

Linux의 경우:

npm run install:linux

Windows의 경우:

npm run install:windows

용법

도우미를 설치하고 실행하면 다음 작업이 수행됩니다.

  1. 클립보드에서 이미지 변경 사항을 모니터링합니다(300ms마다 폴링).

  2. 복사된 이미지를 Supabase 버킷에 업로드하세요.

  3. 공개 URL을 클립보드에 다시 넣어 붙여넣기 준비를 하세요.

서비스 실행

클립보드 도우미는 두 가지 모드로 실행할 수 있습니다.

표준 모드(기본값)

npm start

이는 명령줄 사용에 적합한 StdioServerTransport를 사용하여 MCP 서버를 실행합니다.

HTTP 모드

npm run start:http

이는 적절한 REST API 엔드포인트를 사용하여 포트 3333(구성 가능)에서 Express HTTP 서버를 실행합니다.

MCP 통합

도우미는 다음 MCP 엔드포인트를 노출합니다.

클립보드 이미지 업로드

HTTP 서버 모드의 경우:

POST http://localhost:3333/mcp

요청 본문:

{
  "id": "1",
  "jsonrpc": "2.0",
  "method": "tool",
  "params": {
    "name": "upload_clipboard_image",
    "input": {}
  }
}

응답:

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

오래된 파일 정리

도우미는 오래된 파일을 수동으로 정리하기 위한 MCP 엔드포인트도 제공합니다.

요청 본문:

{
  "id": "1",
  "jsonrpc": "2.0",
  "method": "tool",
  "params": {
    "name": "cleanup_old_files",
    "input": {
      "days": 30
    }
  }
}

응답:

{
  "id": "1",
  "jsonrpc": "2.0",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "Cleanup completed: Deleted 5 files older than 30 days. Failed: 0."
      }
    ]
  }
}

days 매개변수는 선택 사항입니다. 지정하지 않으면 RETENTION_DAYS 환경 변수의 값이 사용됩니다.

작동 원리

  1. 변경 감지 : 300ms마다 클립보드를 폴링하고 이미지 데이터의 SHA-1 해시를 계산합니다.

  2. 중복 제거 : 해시 비교를 기반으로 새 이미지나 변경된 이미지만 처리합니다.

  3. 플랫폼 적응 : 플랫폼별 방법을 사용하여 클립보드 이미지를 캡처합니다.

  4. Supabase 통합 : 고유한 UUID를 사용하여 Supabase 버킷에 이미지를 업로드합니다.

  5. MCP Endpoint : 모델 컨텍스트 프로토콜을 통해 AI 에이전트에 기능을 노출합니다.

  6. 자동 정리 : 구성된 보존 기간(기본값: 30일)보다 오래된 이미지를 주기적으로 제거합니다.

플랫폼별 참고 사항

맥OS

  • pngpaste 필요합니다: brew install pngpaste 로 설치하세요

  • 자동 시작을 위해 LaunchAgents를 사용합니다.

윈도우

  • 이미지 캡처를 위해 PowerShell의 System.Windows.Forms.Clipboard를 사용합니다.

  • 자동 시작을 위해 Windows 레지스트리를 사용합니다.

리눅스

  • 클립보드 액세스를 위해 xclip(X11) 또는 wl-paste(Wayland)를 사용합니다.

  • 자동 시작을 위해 systemd를 사용합니다.

개발

# 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

특허

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.

Tool Schema Changelog

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

  1. 2 tool updatesv1.0.0
    • Changedcleanup_old_files1 field changed
      • addedInput schema / properties
        Added value: +{}
    • Changedupload_clipboard_image1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
  2. 2 tool updates
    • First observedcleanup_old_files
    • First observedupload_clipboard_image

TDQS

D1.8/5.0

Scored across 2 tools

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
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers