clippy

clippy

Gives AI assistants direct access to macOS clipboard - letting Claude copy generated code, text, or files straight to your clipboard for pasting anywhere on Mac.

Category
访问服务器

README

Clippy 📎

Copy files from your terminal that actually paste into GUI apps. No more switching to Finder.

macOS only - built specifically for the Mac clipboard system.

Why Clippy?

pbcopy copies file contents, but GUI apps need file references. When you pbcopy < image.png, you can't paste it into Slack or email - those apps expect files, not raw bytes.

Clippy bridges this gap by detecting what you want and using the right clipboard format:

# Copy files as references (paste into any GUI app)
clippy report.pdf         # ⌘V into Slack/email - uploads the file
clippy *.jpg             # Multiple files at once

# Pipe data as files
curl -sL https://picsum.photos/300 | clippy  # Download → clipboard as file

# Copy your most recent download (immediate)
clippy -r                # Grabs the file you just downloaded
clippy -r 3              # Copy 3 most recent downloads

# Interactive picker for recent files
clippy -i               # Choose from list of recent downloads
clippy -i 5m            # Show picker for last 5 minutes only

Stay in your terminal. Copy anything. Paste anywhere.

The Terminal-First Clipboard Suite: Clippy copies files to clipboard, Pasty pastes them intelligently, and Draggy (optional GUI) bridges drag-and-drop workflows. Use as a Go library for custom integrations. All designed to minimize context switching from your terminal.

💡 Bonus: Clippy includes an MCP server for AI assistants like Claude to copy generated content directly to your clipboard.

Installation

Homebrew (Recommended)

brew install neilberkman/clippy/clippy

Build from Source

# Clone and build
git clone https://github.com/neilberkman/clippy.git
cd clippy
go build -o clippy ./cmd/clippy
sudo mv clippy /usr/local/bin/

# Or use go install
go install github.com/neilberkman/clippy/cmd/clippy@latest

Core Features

1. Smart File Copying

clippy document.pdf    # Copies as file reference (paste into any app)
clippy notes.txt       # Also copies as file reference
clippy -t notes.txt    # Use -t flag to copy text content instead
clippy *.jpg          # Multiple files at once

2. Recent Downloads

# Immediate copy (no UI)
clippy -r              # Copy your most recent download
clippy -r 3            # Copy 3 most recent downloads
clippy -r 5m           # Copy all downloads from last 5 minutes

# Interactive picker
clippy -i              # Choose from list of recent downloads
clippy -i 3            # Show picker with 3 most recent files
clippy -i 5m           # Show picker for last 5 minutes only

# Copy and paste in one step
clippy -r --paste      # Copy most recent and paste here
clippy -i --paste      # Pick file, copy it, and paste here

3. Pipe Data as Files

curl -sL https://example.com/image.jpg | clippy
cat archive.tar.gz | clippy

4. Copy and Paste Together

clippy ~/Downloads/report.pdf --paste  # Copy to clipboard AND paste here
clippy -r --paste          # Copy recent download and paste here
clippy -i --paste           # Pick file, copy it, and paste here

5. Clear Clipboard

clippy --clear         # Empty the clipboard
echo -n | clippy       # Also clears the clipboard

6. Helpful Flags

clippy -v file.txt     # Show what happened
clippy --debug file.txt # Technical details for debugging

Why "Clippy"?

Because it's a helpful clipboard assistant that knows what you want to do! 📎


Pasty - Intelligent Clipboard Pasting

When you copy a file in Finder and press ⌘V in terminal, you just get the filename as text. Pasty actually copies the file itself to your current directory.

Core Use Cases

1. Copy file in Finder → Paste actual file in terminal

# 1. Copy any file in Finder (⌘C)
# 2. Switch to terminal and run:
pasty
# File gets copied to your current directory (not just the filename!)

2. Smart text file handling

# Copy a text file in Finder (⌘C), then:
pasty                    # Outputs the file's text content to stdout
pasty notes.txt          # Saves the file's text content to notes.txt

Install & Use

# Install via Homebrew
brew install neilberkman/clippy/clippy

# Or build from source
go install github.com/neilberkman/clippy/cmd/clippy@latest
go install github.com/neilberkman/clippy/cmd/pasty@latest

Draggy - Visual Clipboard Companion

Draggy is a menu bar app that brings visual functionality to your clipboard workflow. While clippy handles copying from the terminal, Draggy provides a visual interface for dragging files to applications and viewing recent downloads.

Important: Draggy is a separate, optional tool. It's not automatically installed with clippy.

Features

Core Functionality

  • Drag & Drop Bridge - Makes clipboard files draggable to web browsers, Slack, and other apps
  • Recent Downloads Viewer - Toggle between clipboard and recent downloads with one click
  • File Thumbnails - Visual previews for images and PDFs right in the file list
  • Quick Preview - Hold ⌥ Option while hovering to see larger previews
  • Zero Background Activity - No polling or battery drain, only activates on demand

User Experience

  • Double-Click to Open - Quick access to files without leaving the menu
  • Keyboard Shortcuts - ESC to close, Space to refresh

Design Philosophy

  • Not a clipboard manager - No history, no database, no complexity
  • Terminal-first workflow - Designed to complement terminal usage, not replace it
  • Minimal but complete - Every feature serves a specific workflow need

Installation

# Separate brew install (not included with clippy)
brew install --cask neilberkman/clippy/draggy

⚠️ First Launch: macOS may show a security warning since Draggy isn't code-signed. If you see "Draggy is damaged and can't be opened":

  • The Homebrew cask automatically removes the quarantine flag during installation
  • If the warning persists, run: xattr -dr com.apple.quarantine /Applications/Draggy.app
  • Or right-click Draggy.app and select "Open" to bypass Gatekeeper

Usage

# Copy files in terminal:
clippy ~/Downloads/*.pdf    # Copy PDFs with clippy
curl -sL image.jpg | clippy # Pipe downloads to clipboard
clippy -r                   # Copy most recent download

# Use Draggy GUI:
# 1. Click Draggy icon in menu bar
# 2. Drag files to browser upload fields, Slack, etc.
# 3. Toggle to Recent Downloads view with clock icon
# 4. Hold ⌥ Option to preview files
# 5. Double-click to open files

Workflow Examples

Upload screenshots to GitHub:

# Take screenshot (macOS saves to Desktop)
# In terminal: clippy ~/Desktop/Screenshot*.png
# In Draggy: Drag to GitHub comment box

Quick file sharing:

# Terminal: clippy ~/Downloads/report.pdf
# Draggy: Shows thumbnail, drag to Slack or email

Recent downloads workflow:

# Download file in browser
# Click Draggy → Click clock icon → See your download
# Drag where needed or double-click to open

Philosophy

Draggy is intentionally not a clipboard manager. No history, no search, no database. It's a visual bridge between your terminal clipboard workflow and GUI applications. For terminal users who occasionally need to see what's on their clipboard or drag files somewhere, then get back to work.

MCP Server

Clippy includes a built-in MCP (Model Context Protocol) server that lets AI assistants copy generated content directly to your clipboard.

Ask Claude to generate any text - code, emails, documents - and have it instantly available to paste anywhere:

  • "Write a Python script to process CSV files and copy it to my clipboard"
  • "Draft an email about the meeting and put it on my clipboard"
  • "Generate that regex and copy it so I can paste into my editor"

No more manual selecting and copying from the chat interface.

Setup

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "clippy": {
      "command": "clippy",
      "args": ["mcp-server"]
    }
  }
}

Available Tools

  • clipboard_copy - Copy text or files to clipboard
  • clipboard_paste - Paste clipboard content to files/directories
  • get_recent_downloads - List recently downloaded files

Claude can generate content and put it directly on your clipboard, ready to paste wherever you need it.

Library

Clippy can be used as a Go library in your own applications:

go get github.com/neilberkman/clippy

High-Level API

import "github.com/neilberkman/clippy"

// Smart copy - automatically detects text vs binary files
err := clippy.Copy("document.pdf")

// Copy multiple files as references
err := clippy.CopyMultiple([]string{"image1.jpg", "image2.png"})

// Copy text content
err := clippy.CopyText("Hello, World!")

// Copy data from reader (handles text/binary detection)
reader := strings.NewReader("Some content")
err := clippy.CopyData(reader)

// Copy from stdin
err := clippy.CopyData(os.Stdin)

// Get clipboard content
text, ok := clippy.GetText()
files := clippy.GetFiles()

Features

  • Smart Detection: Automatically determines whether to copy as file reference or text content
  • Multiple Files: Copy multiple files in one operation
  • Reader Support: Copy from any io.Reader with automatic format detection
  • Clipboard Access: Read current clipboard content (text or file paths)
  • Cross-Platform Types: Uses standard Go types, handles platform-specific clipboard internally

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选