Read, write, and inspect the system clipboard on macOS, Linux (X11/Wayland), and Windows via MCP.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Read, write, and inspect the system clipboard across macOS, Linux (X11/Wayland), and Windows via MCP. STDIO or Streamable HTTP.
3 tools for reading, writing, and inspecting the system clipboard:
| Tool | Description |
|---|---|
clipboard_read | Read clipboard contents in a specified format (text, HTML, RTF, image, or auto-select richest) |
clipboard_write | Write plain text or HTML to the clipboard, replacing current contents |
clipboard_inspect | List available clipboard formats and byte sizes without reading full content |
clipboard_readRead the current clipboard contents in a requested format.
auto mode returns the richest format explicitly present β priority: image > html > rtf > textimage returns base64-encoded PNG data with pixel dimensionshtml returns raw HTML source as copied from a browserrtf returns raw RTF markuptext returns plain textformat_unavailable error when the requested format is not on the clipboard β use clipboard_inspect first to check availabilityclipboard_writeWrite content to the clipboard, replacing current contents.
text writes plain texthtml writes HTML; macOS and Windows also publish an auto-generated, tag-stripped plain-text fallback, while Linux X11 and Wayland publish only text/htmlpreviousContent β the plain text that was on the clipboard immediately before the write, so an unintended overwrite can be undone by writing it back. Absent when the clipboard was empty, held no text representation, or its text exceeded the 512 KB read limitdestructiveHint: true β replaces whatever is currently on the clipboardCLIPBOARD_READ_ONLY is set β see Configurationclipboard_inspectList the formats and byte sizes of what is currently on the clipboard without reading the full content.
primaryFormat β the richest format present (image > html > rtf > text), or emptyavailableFormats β all semantic formats present, for deciding which format to pass to clipboard_readrawTypes β all raw platform type identifiers with byte sizes (UTIs on macOS, TARGETS on X11/Wayland, format names on Windows)clipboard_read to avoid format_unavailable errors and to check content size before readingBuilt on @cyanheads/mcp-ts-core:
none, jwt, oauth)Clipboard-specific:
text, html, rtf, image across all backendsContentTooLargeError with byte/limit metadata before content returnstext/htmlAdd the following to your MCP client configuration file.
Or with npx (no Bun required):
For Streamable HTTP, set the transport and start the server:
macOS: No additional tools required β pbcopy, pbpaste, and osascript are built in.
Linux X11: xclip must be installed.
Linux Wayland: wl-clipboard must be installed.
Windows: PowerShell 5.1+ (built-in on Windows 10 and later).
| Variable | Description | Default |
|---|---|---|
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for HTTP server. | 3010 |
MCP_HTTP_HOST | Hostname for HTTP server. | 127.0.0.1 |
MCP_HTTP_ENDPOINT_PATH | Endpoint path for the HTTP server. | /mcp |
MCP_HTTP_MAX_BODY_BYTES | Max inbound JSON-RPC request body, in bytes. Raised above the framework's 1 MiB default so a full-size clipboard_write survives JSON escaping (worst case costs 6 wire bytes per source byte). 0 disables the guard and defers to the reverse proxy. | 7340032 |
MCP_SESSION_MODE | HTTP session mode: auto, stateful, or stateless. auto resolves to stateful. This server defaults to stateless β it keeps no per-session state. | stateless |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (debug, info, notice, warning, error). | info |
OTEL_ENABLED | Enable OpenTelemetry instrumentation. | false |
CLIPBOARD_READ_ONLY | Serve the clipboard read-only. When true, clipboard_write is not registered β absent from tools/list and uncallable, though still shown in a disabled state on the manifest and landing page. Accepts true/false/1/0/yes/no/on/off; an unrecognized value fails startup. | false |
See .env.example for the full list of optional overrides.
| Path | Purpose |
|---|---|
src/index.ts | Entry point β registers tools via createApp() |
src/mcp-server/tools/definitions/ | Tool definitions: clipboard_read, clipboard_write, clipboard_inspect |
src/services/clipboard/ | Platform backends (macOS, Linux X11, Wayland, Windows) and service facade |
tests/ | Vitest tests for tools and backends |
skills/ | Agent workflow skills (add-tool, field-test, polish-docs-meta, etc.) |
See CLAUDE.md for the full developer protocol β tool patterns, service patterns, error handling, logging conventions, and the checklist for shipping changes.
Issues and pull requests welcome at github.com/cyanheads/clipboard-mcp-server.
Apache 2.0 β see LICENSE.
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-mcp-server)<a href="https://allmcps.com/mcp/clipboard-mcp-server"><img src="https://allmcps.com/api/badge/clipboard-mcp-server?style=directory" alt="Clipboard MCP Server on AllMCPs" /></a>