Labsco
mnardit logo

clipboard-mcp

โ˜… 9

from mnardit

Cross-platform MCP server for system clipboard access. Three tools: get_clipboard, set_clipboard, watch_clipboard. Single Rust binary, zero runtime deps.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

clipboard-mcp

Cross-platform Model Context Protocol (MCP) server that gives AI assistants direct read/write access to your system clipboard. Website

Copy an error โ†’ ask Claude to fix it โ†’ the fix lands in your clipboard. No manual paste into chat, no manual copy from response.

cargo install clipboard-mcp

Why clipboard-mcp?

  • Single binary โ€” no Python, no Node.js, no runtime to install
  • Native clipboard โ€” uses arboard by 1Password, not shell commands like pbcopy/xclip
  • Watch mode โ€” watch_clipboard lets agents react to what you copy in real-time
  • HTML + format detection โ€” read HTML content, probe available clipboard formats
  • Cross-platform โ€” Windows, macOS (Intel + Apple Silicon), Linux (X11 + Wayland)
  • HTTP transport โ€” run as a local HTTP server for remote agent access

Tools

ToolDescription
get_clipboardRead current text from the clipboard. Content over 100 KB is truncated.
get_clipboard_htmlRead HTML content from the clipboard (e.g., rich text from browsers).
set_clipboardWrite text to the clipboard (max 1 MB).
watch_clipboardWait for clipboard text to change (default 30s, max 300s). Max 5 concurrent.
list_clipboard_formatsProbe which formats are available (text, HTML, image, files).
clear_clipboardClear all clipboard content.

watch_clipboard parameters

ParameterTypeDefaultDescription
timeout_secsinteger (optional)30Seconds to wait for a change (max 300)

Platform Support

  • Windows (x86_64) โ€” clipboard persists via OS pasteboard
  • macOS (x86_64, aarch64) โ€” clipboard persists via OS pasteboard
  • Linux (x86_64, aarch64) โ€” X11 and Wayland (via wl-data-control protocol)

Linux note: On Linux, clipboard content set by the server is kept alive by a background thread. If no clipboard manager is running (bare WMs like i3/dwm), install clipman, parcellite, or copyq.

How It Works

Single binary. Uses arboard (by 1Password) for native clipboard access. Communicates via MCP protocol over stdio (default) or HTTP (--http flag, Streamable HTTP transport). No runtime dependencies on Windows and macOS; Linux requires X11 libs or a Wayland compositor with wl-data-control support.

Security

This server gives connected MCP clients full read/write access to your system clipboard:

  • get_clipboard / get_clipboard_html โ€” return clipboard content verbatim
  • set_clipboard โ€” silently overwrites clipboard contents (max 1 MB)
  • watch_clipboard โ€” returns the next thing you copy, verbatim
  • clear_clipboard โ€” wipes clipboard without confirmation

Only connect this server to AI sessions you trust. Do not use it in environments where sensitive data (passwords, tokens) may be on the clipboard.

HTTP mode: Default bind is 127.0.0.1 (localhost only). Binding to 0.0.0.0 with --host exposes clipboard to all reachable network interfaces. Browser-initiated requests (with Origin header) are rejected with 403. There is no authentication โ€” non-browser HTTP clients are not restricted. For remote access, prefer SSH tunneling over exposing to the network.