Clippy

io.github.neilberkman由 GitHub 账号 neilberkman 发布v1.9.1更新于 Oct 24, 2026

Copy AI-generated content to the macOS clipboard: rich Gmail-ready email drafts, text, and files

概览

AI 生成的概览

一个仅限 macOS 的 MCP 服务器,让 AI 助手把生成的文本、邮件草稿和文件直接复制到系统剪贴板。

可以做什么
Clippy 在命令行剪贴板工具之外运行一个本地 MCP 服务器。其工具包括:clipboard_copy 复制文本或文件,copy_email 复制结构化的、可直接用于 Gmail 的富文本邮件草稿,clipboard_paste 把剪贴板内容写入文件或目录,get_recent_downloads 列出最近下载的文件,以及 buffer_copy、buffer_cut、buffer_paste、buffer_list 通过助手私有缓冲区搬运文件字节而不触碰系统剪贴板。它还能把 Markdown 渲染为富文本邮件或 Slack 编辑器格式。
适用场景
适合希望助手生成的内容(如代码、邮件草稿或 Markdown 文档)直接进入剪贴板、随时粘贴到其他应用的场景。也适合通过缓冲区工具做逐字节精确的文件编辑,让助手搬运文件内容而不必重新输出为 token。
运行要求
仅支持 macOS,作为本地进程运行。README 使用 Homebrew 安装,并通过指向 clippy 二进制文件并带上 mcp-server 参数来注册到 Claude Code 或 Claude Desktop。未声明任何账号、API 密钥、环境变量或请求头。
安装前请注意
该服务器会写入系统剪贴板,并可通过 clipboard_paste 和缓冲区工具写入、剪切或替换文件内容,批准前请检查文件操作。copy_email 只复制草稿,不会填写地址或发送邮件。可选的配套应用 Draggy 未做代码签名,README 提到需要移除 macOS 隔离标记才能打开。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Clippy,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Clippy 📎

[Homebrew] [Release] [CI] [Go Version] [License]

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:

bash
# Copy files as references (paste into any GUI app)clippy report.pdf         # ⌘V into Slack/email - uploads the fileclippy *.jpg             # Multiple files at once
# Pipe data as filescurl -sL https://picsum.photos/300 | clippy  # Download → clipboard as file
# Copy your most recent download (immediate)clippy -r                # Grabs the file you just downloadedclippy -r 3              # Copy 3 most recent downloads
# Interactive picker for recent filesclippy -i               # Choose from list of recent downloadsclippy -i 5m            # Show picker for last 5 minutes only

Stay in your terminal. Copy anything. Paste anywhere.

Installation:

bash
brew install clippy

The Terminal-First Clipboard Suite: Clippy copies files to clipboard, includes an MCP server for AI assistants, Pasty pastes 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.

Core Features

1. Smart File Copying

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

2. Recent Downloads

bash
# Immediate copy (no UI)clippy -r              # Copy your most recent downloadclippy -r 3            # Copy 3 most recent downloadsclippy -r 5m           # Copy all downloads from last 5 minutes
# Interactive pickerclippy -i              # Choose from list of recent downloadsclippy -i 3            # Show picker with 3 most recent filesclippy -i 5m           # Show picker for last 5 minutes only
# Copy and paste in one stepclippy -r --paste      # Copy most recent and paste hereclippy -i --paste      # Pick file, copy it, and paste here

3. Find Files with Spotlight

bash
clippy -f invoice      # Search for files matching "invoice"clippy -f screenshot   # Find screenshotsclippy -f .pdf         # Find all PDF files (by extension)clippy -f report.xlsx  # Find specific file "report.xlsx"# Shows interactive picker with results

No more switching to Finder to search for files - find and copy them directly from your terminal.

4. Pipe Data as Files

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

5. Copy and Paste Together

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

6. Clear Clipboard

bash
clippy --clear         # Empty the clipboardecho -n | clippy       # Also clears the clipboard

7. Content Type Detection

A nice bonus: clippy auto-detects content types (JSON, HTML, XML) so receiving apps handle them properly - something pbcopy can't do. This means when you paste into apps that support rich content, they'll handle it correctly - JSON viewers will syntax highlight, HTML will render, etc.

bash
echo '{"key": "value"}' | clippy          # Recognized as JSONclippy -t page.html                       # Recognized as HTMLclippy -t file.txt --mime application/json  # Manual override when needed

8. Gmail-Ready Markdown Email

Copy Markdown, render it as rich email content, then paste normally into Gmail, Mimestream, Mail, or another rich composer:

bash
clippy md2rich draft.md        # from a filecat draft.md | clippy md2rich  # from a pipeclippy md2rich                 # render the clipboard in place

The clipboard carries HTML, RTF, and plain-text representations together. Rich composers preserve intentional paragraph spacing, emphasis, links, lists, inline code, and Mimestream-style fenced code blocks; plain-text targets still receive a readable fallback.

9. Native Slack Messages

Write Markdown, then paste into any Slack composer and get real formatting — not literal asterisks:

bash
clippy md2slack notes.md         # from a filecat notes.md | clippy md2slack   # from a pipeclippy md2slack                  # render the clipboard in place

Slack's composer stores messages as a Quill Delta document and puts that same document on the clipboard when you copy from it. md2slack writes exactly that format, so a normal Command-V produces bold, italic, strikethrough, inline code, code blocks, block quotes, headings, links, and bulleted or numbered lists (including nesting) — as though the message had been typed in Slack.

Slack has no table, image, or horizontal-rule construct, so tables become unaligned text rows, images become links, and rules become a divider line. Anything that does not understand the Slack format receives plain text.

For aligned columns, use space-padded text inside a fenced code block. Put both fences on their own lines, with real line breaks between the rows:

markdown
Current values:
```  name   value  alpha  10  beta   20```

Indentation inside a fence is preserved; it is not required to create a code block. Keep existing column padding when editing. Input uses CommonMark/GFM syntax (**bold**, ~~strikethrough~~), not Slack's mrkdwn syntax.

The copy_slack MCP tool returns formatting counts and warnings. Set expected_code_blocks: 1 for a message with one fenced table: a mismatch returns an error before changing the clipboard. preview: true reports the same counts and warnings without copying. clippy --verbose md2slack reports counts too, and the CLI always prints formatting warnings.

These counts describe generated formatting, not a verified Slack paste. Use normal Command-V. Plain-text clipboard reads omit formatting and fence markers, so they cannot verify code blocks. If the counts are correct but the paste is wrong, inspect the clipboard/paste path before changing the Markdown. The MCP tool and CLI use the same renderer.

10. Helpful Flags

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

Why "Clippy"?

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


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.

For email drafts, the dedicated copy_email tool is advertised to the model. Prefer its explicit salutation, body_markdown, and signoff fields so the email structure is preserved without guessing at language-specific greetings. The complete-body markdown field remains available for compatibility. The tool only copies the draft; it does not address or send mail.

Setup

Claude Code:

bash
# Install for all your projects (recommended)claude mcp add --scope user clippy $(which clippy) mcp-server
# Or for current project onlyclaude mcp add clippy $(which clippy) mcp-server

Note: $(which clippy) finds the clippy binary on your system. On Apple Silicon Macs this is typically /opt/homebrew/bin/clippy, on Intel Macs it's /usr/local/bin/clippy.

Claude Desktop:

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

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

Metadata Overrides (Optional)

You can customize MCP tool/prompt/example descriptions without changing behavior:

bash
clippy mcp-server \  --tools /path/to/tools.json \  --prompts /path/to/prompts.json \  --examples /path/to/examples.json

By default, override files can be partial. Add --strict-metadata to require full coverage of every tool, prompt, and parameter.

Available Tools

System Clipboard Tools
  • clipboard_copy - Copy text or files to system clipboard
  • copy_email - Copy a structured email draft as Gmail-ready rich text (never sends)
  • clipboard_paste - Paste clipboard content to files/directories
  • get_recent_downloads - List recently downloaded files
Agent Buffer Tools
  • buffer_copy - Copy file bytes (with optional line ranges) to agent's private buffer
  • buffer_cut - Cut lines from file to buffer (copy and delete from source)
  • buffer_paste - Paste bytes to file with append/insert/replace modes
  • buffer_list - Show buffer metadata (lines, source file, range)

Why buffer tools? Solves the LLM "remember and re-emit" problem. The MCP server reads/writes file bytes directly - agents never generate tokens for copied content. Enables surgical refactoring (copy lines 17-32, paste to replace lines 5-8) with byte-for-byte accuracy, without touching your system clipboard.


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

bash
# 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

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

3. Save browser images

bash
# Right-click "Copy Image" in any browser, then:pasty photo.png          # Saves the image (auto-converts TIFF to PNG)pasty --preserve-format  # Keep original format if needed

Also handles rich text with embedded images (.rtfd bundles from TextEdit/Notes).

4. Debugging and plain text extraction

bash
pasty --inspect          # Show clipboard types + paste priority (metadata only)pasty --plain notes.txt  # Force plain text, strip all formattingpasty -f existing.txt    # Overwrite existing files instead of creating duplicates

By default, pasty uses Finder-style duplicate naming if a file already exists.


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

bash
# 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

bash
# Copy files in terminal:clippy ~/Downloads/*.pdf    # Copy PDFs with clippycurl -sL image.jpg | clippy # Pipe downloads to clipboardclippy -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:

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

Quick file sharing:

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

Recent downloads workflow:

bash
# 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.


Build from Source

bash
# Clone and buildgit clone https://github.com/neilberkman/clippy.gitcd clippygo build -o clippy ./cmd/clippygo build -o pasty ./cmd/pastysudo mv clippy pasty /usr/local/bin/
# Or use go installgo install github.com/neilberkman/clippy/cmd/clippy@latestgo install github.com/neilberkman/clippy/cmd/pasty@latest

Library

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

bash
go get github.com/neilberkman/clippy

High-Level API

go
import "github.com/neilberkman/clippy"
// Smart copy - automatically detects text vs binary fileserr := clippy.Copy("document.pdf")
// Copy multiple files as referenceserr := clippy.CopyMultiple([]string{"image1.jpg", "image2.png"})
// Copy text contenterr := clippy.CopyText("Hello, World!")
// Copy data from reader (handles text/binary detection)reader := strings.NewReader("Some content")err := clippy.CopyData(reader)
// Copy from stdinerr := clippy.CopyData(os.Stdin)
// Get clipboard contenttext, 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

来源:README.md,提交 7aab75c

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.9.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分