Clippy is a powerful clipboard utility designed specifically for macOS that bridges the gap between terminal operations and GUI applications. It solves the problem that pbcopy only copies file contents, while GUI apps expect file references, allowing you to stay productive in your terminal workflow.
You can install Clippy using Homebrew:
brew install clippy
Or build from source:
git clone https://github.com/neilberkman/clippy.git
cd clippy
go build -o clippy ./cmd/clippy
go build -o pasty ./cmd/pasty
sudo mv clippy pasty /usr/local/bin/
Clippy intelligently handles file references so you can paste them into any GUI application:
# Copy files as references (paste into any GUI app)
clippy report.pdf # Paste into Slack/email to upload the file
clippy *.jpg # Copy multiple files at once
# Use -t flag to copy text content instead of file reference
clippy -t notes.txt
Quickly access your downloaded files without switching to Finder:
# 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
Search for files directly from your terminal:
clippy -f invoice # Search for files matching "invoice"
clippy -f screenshot # Find screenshots
clippy -f .pdf # Find all PDF files (by extension)
clippy -f report.xlsx # Find specific file "report.xlsx"
Create and copy files directly from piped data:
curl -sL https://example.com/image.jpg | clippy
cat archive.tar.gz | clippy
Streamline your workflow with single-command operations:
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
Empty your clipboard when needed:
clippy --clear # Empty the clipboard
echo -n | clippy # Also clears the clipboard
Clippy automatically detects content types for proper handling by receiving applications:
echo '{"key": "value"}' | clippy # Recognized as JSON
clippy -t page.html # Recognized as HTML
clippy -t file.txt --mime application/json # Manual override when needed
Clippy includes a built-in MCP (Model Context Protocol) server that lets AI assistants like Claude copy generated content directly to your clipboard.
# Install for all your projects (recommended)
claude mcp add --scope user clippy $(which clippy) mcp-server
# Or for current project only
claude mcp add clippy $(which clippy) mcp-server
Add to your config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"clippy": {
"command": "clippy",
"args": ["mcp-server"]
}
}
}
The MCP server provides several tools:
Pasty complements Clippy by enabling intelligent pasting operations in the terminal.
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
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
Save browser images
# 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
Debugging and plain text extraction
pasty --inspect # Show what's on clipboard and what pasty will use
pasty --plain notes.txt # Force plain text, strip all formatting
Draggy is an optional menu bar app that provides a visual interface for clipboard operations.
# Separate brew install (not included with clippy)
brew install --cask neilberkman/clippy/draggy
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "clippy" '{"command":"clippy","args":["mcp-server"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"clippy": {
"command": "clippy",
"args": [
"mcp-server"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"clippy": {
"command": "clippy",
"args": [
"mcp-server"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect