Read and write the system clipboard with support for tables, text, and images.
clipboard-mcp
An MCP (Model Context Protocol) server that reads and writes your system clipboard — tables, plain text, code, JSON, URLs, images, and more. Preserves structure when possible (e.g. spreadsheet row/column layout) and returns non-tabular content cleanly.
The Problem
When you copy cells from Google Sheets or Excel and paste into Claude's chat input, the tabular structure (rows and columns) is destroyed — it arrives as a flat string with no delimiters. And for non-tabular content, there's no easy way to say "look at what I copied" without manually pasting.
The Solution
Instead of pasting, tell Claude to "read my clipboard". This MCP server reads the clipboard directly and handles any content type: spreadsheet tables (returned as Markdown, JSON, or CSV), images (returned as image content), code snippets, JSON data, URLs, rich HTML text, and plain text. It can also write to the clipboard, so Claude can copy results back for you to paste elsewhere.
Tools
| Tool | Description |
|---|---|
clipboard_paste |
Primary tool. Read any clipboard content — tables, text, code, JSON, URLs, images. Tables are formatted as Markdown/JSON/CSV; pass include_schema=true to append inferred column types (integer, float, currency, percentage, date, boolean, text). Images are returned as image content; other content is returned with smart formatting. |
clipboard_copy |
Write text to the system clipboard |
clipboard_read_raw |
Return raw clipboard content for a given MIME type — supports text formats plus image/svg+xml, application/json, application/xml, application/xhtml+xml (diagnostic) |
clipboard_list_formats |
List what MIME types are currently on the clipboard |
Setup
Prerequisites
Python 3.11+ and one of: uv (recommended), pipx, or pip.
You also need a platform-specific clipboard tool:
| Platform | Tool | Install |
|---|---|---|
| Fedora (Wayland) | wl-paste |
sudo dnf install wl-clipboard |
| Ubuntu (Wayland) | wl-paste |
sudo apt install wl-clipboard |
| Linux (X11) | xclip |
sudo dnf install xclip or sudo apt install xclip |
| macOS | Built-in | No install needed (osascript / pbpaste) |
| Windows | Built-in | No install needed (PowerShell) |
Platform status: Linux with Wayland is tested on real hardware. X11 has unit test coverage but has not been verified on a live X11 session. macOS and Windows implementations are complete but untested on real hardware — they should work but may have edge cases. Bug reports and PRs are very welcome.
Configure Claude Desktop
Add one of the following to your Claude Desktop config file:
- Linux:
~/.config/Claude/claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Option A: uvx — no clone needed (recommended)
Requires uv. Installs and runs directly from PyPI:
{
"mcpServers": {
"clipboard": {
"command": "uvx",
"args": [
"--from", "clipboard-mcp-server",
"clipboard-mcp"
]
}
}
}
Option B: pipx — no clone needed
Requires pipx. Same idea, different tool manager:
{
"mcpServers": {
"clipboard": {
"command": "pipx",
"args": [
"run", "--spec", "clipboard-mcp-server",
"clipboard-mcp"
]
}
}
}
Note: The PyPI package name is
clipboard-mcp-serverbut the command it installs isclipboard-mcp.
Option C: Local clone with uv
git clone https://github.com/cmeans/clipboard-mcp.git
cd clipboard-mcp
uv sync
{
"mcpServers": {
"clipboard": {
"command": "uv",
"args": [
"run",
"--directory", "/path/to/clipboard-mcp",
"clipboard-mcp"
]
}
}
}
Option D: Local clone with pip
git clone https://github.com/cmeans/clipboard-mcp.git
cd clipboard-mcp
pip install -e .
{
"mcpServers": {
"clipboard": {
"command": "clipboard-mcp"
}
}
}
Note: Option D depends on
clipboard-mcpbeing on your PATH. Since Claude Desktop launches outside a shell, this may not work reliably. Prefer options A–C.
Restart Claude Desktop after editing the config.
Environment variables
Environment variables can be passed via the "env" key in the Claude Desktop config.
| Variable | Platform | Purpose | Default |
|---|---|---|---|
CLIPBOARD_MCP_DEBUG |
All | Enable debug logging (1 to enable) |
Off |
WAYLAND_DISPLAY |
Linux (Wayland) | Compositor socket name (e.g. wayland-0) or absol |
Tools (4)
clipboard_pasteRead any clipboard content including tables, text, code, JSON, URLs, and images.clipboard_copyWrite text to the system clipboard.clipboard_read_rawReturn raw clipboard content for a given MIME type.clipboard_list_formatsList what MIME types are currently on the clipboard.Environment Variables
CLIPBOARD_MCP_DEBUGEnable debug logging (1 to enable)WAYLAND_DISPLAYCompositor socket name for Linux WaylandConfiguration
{"mcpServers": {"clipboard": {"command": "uvx", "args": ["--from", "clipboard-mcp-server", "clipboard-mcp"]}}}