Read and write the system clipboard β tables, text, code, JSON, URLs, images, and more.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
An MCP server that gives your AI assistant direct access to your system clipboard: read what you copied, or write clean text straight to it. Works with any MCP-compatible client, including Claude Code, Claude Desktop, Cursor, Windsurf, and others.
When you copy cells from Google Sheets or Excel and paste into a chat input, the tabular structure (rows and columns) is destroyed. It arrives as a flat string with no delimiters. The model has to guess where one cell ends and the next begins, and it often guesses wrong.
mcp-clipboard preserves it. Instead of pasting, tell your assistant to "read my clipboard." The server reads the clipboard directly, detects tabular data from the HTML that spreadsheet apps put on the clipboard, and returns it as a properly formatted Markdown table, JSON, or CSV. No structure lost, no guessing.
Claude Code's terminal renderer adds 2-character padding, hard line breaks at ~80 columns, and trailing whitespace to all output. When you select and copy text from the terminal, those artifacts come along for the ride:
This has been reported repeatedly on the claude-code repo (issues #4686, #6827, #7670, #13378, #15199, #25040, #25427, #26016) with dozens of upvotes and no fix shipped.
mcp-clipboard sidesteps the problem entirely. Instead of copying text from the terminal, ask Claude Code to put it on your clipboard:
"Copy that command to my clipboard"
Claude Code calls clipboard_copy, writes the clean text directly to your system clipboard, and you paste it wherever you need it. No padding, no hard wraps, no cleanup.
Tip: To make this automatic, add a line to your project or global CLAUDE.md:
Claude Code will then copy every command it suggests without you having to ask.
Linux desktops have two clipboards: the CLIPBOARD that Ctrl-C / Ctrl-V uses, and the PRIMARY selection. PRIMARY is whatever text you currently have highlighted, pasted by middle-click. It updates as soon as you select something; you don't have to copy it.
mcp-clipboard reads PRIMARY too. Pass selection="primary" to clipboard_paste, clipboard_read_raw, or clipboard_list_formats and the server reads the selection buffer instead of the Ctrl-C clipboard. Some workflows this enables:
v-select a function, ask the model to explain it or refactor it.Linux only. macOS and Windows have no equivalent buffer; passing selection="primary" on those platforms returns a clear error.
| 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. Images are returned as image content the model can see. Optional selection="primary" reads the X11/Wayland PRIMARY selection (middle-click / select-text-to-paste buffer) instead of the default Ctrl-C clipboard. |
clipboard_copy | Write text content to the system clipboard. Accepts an optional mime_type parameter (text/plain by default; also text/html, text/rtf, image/svg+xml, or any text/* on Wayland/X11). |
clipboard_copy_markdown | Render markdown to HTML and place both formats on the clipboard so paste targets pick the right one β Slack/Gmail/Notion/Discord get rich text; vim/terminal get the source. macOS/Windows write both atomically; Wayland/X11 are single-MIME and write only text/html. |
clipboard_copy_image | Write a PNG or JPEG image to the system clipboard from base64-encoded bytes. Pass-through with no re-encoding; magic bytes are validated against the declared MIME. Use clipboard_copy for text. |
clipboard_list_formats | List what MIME types are currently on the clipboard. Accepts selection="primary" for the X11/Wayland PRIMARY selection. |
clipboard_read_raw | Return raw clipboard content for a given MIME type (diagnostic). Any non-binary type passes through; only image/*, audio/*, video/*, and application/octet-stream are rejected. Use clipboard_paste for images. Accepts selection="primary" for the X11/Wayland PRIMARY selection. |
clipboard_version | Return the running mcp-clipboard package version as {"name": "mcp-clipboard", "version": "<x.y.z>"}. Diagnostic. Useful for hosts that don't surface the standard MCP serverInfo block to the model, and for test harnesses that need to record which build served a given run. |
mcp-clipboard is a Python package on PyPI. Any Python tool that can install and launch console-script entry points works for running it as an MCP server. The two most common choices are pipx and uv; both appear in the install-counts badges at the top of this README and both are in active use. Pick whichever you have or prefer:
apt, dnf, pacman, brew, etc.).Verify your chosen runner is on PATH:
The rest of this section shows commands for both runners; substitute the one you installed.
macOS and Windows have everything they need built in. Linux needs one CLI utility:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/clipboard)<a href="https://allmcps.com/mcp/clipboard"><img src="https://allmcps.com/api/badge/clipboard?style=directory" alt="Clipboard on AllMCPs" /></a>