Clipboard MCP

io.github.mnardit由 GitHub 账号 mnardit 发布v0.1.0更新于 Oct 24, 2026

Cross-platform MCP server for system clipboard access (read, write, watch)

已验证STDIO仅桌面效率与工作流开发者工具

概览

AI 生成的概览

本地 MCP 服务器,让 AI 助手读取、写入系统剪贴板,并可监听新的复制内容。

可以做什么
  • 读取剪贴板当前文本,或读取其中的 HTML 内容(如浏览器复制的富文本)
  • 向剪贴板写入文本,或清空全部剪贴板内容
  • 等待剪贴板发生变化并返回下一次复制的文本,超时时间可配置
  • 探测剪贴板当前可用的格式(文本、HTML、图片、文件)
适用场景
适合在助手与桌面应用之间传递文本而无需手动粘贴到对话中:复制报错或代码片段让助手修复、转换剪贴板内容后写回、或让助手对你接下来复制的内容作出反应。
运行要求
作为本地进程在桌面运行;通过 cargo 安装或从发布页下载单个二进制文件,无需 Python 或 Node.js 运行时。Windows 与 macOS 无需额外依赖;Linux 需要 X11 库或支持 wl-data-control 的 Wayland 合成器,裸窗口管理器还需剪贴板管理器。macOS 需为终端授予剪贴板权限。可选 HTTP 模式默认仅绑定本机。
安装前请注意
连接的客户端拥有完整的剪贴板读写权限:读取会原样返回内容,写入会静默覆盖,监听模式会返回你接下来复制的任何内容,因此不要在剪贴板可能含密码或令牌的环境中使用。清空操作不经确认即删除内容。HTTP 模式没有身份验证,绑定到 0.0.0.0 会把剪贴板暴露到网络,建议改用 SSH 隧道。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Clipboard MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

clipboard-mcp

[CI] [Crates.io] [License: MIT]

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.

bash
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)

Installation

bash
cargo install clipboard-mcp

Or download a binary from GitHub Releases.

Configuration

Claude Desktop (stdio, default)

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "clipboard": {      "command": "clipboard-mcp"    }  }}

Claude Code (stdio)

bash
# Add for current projectclaude mcp add clipboard clipboard-mcp
# Or add globallyclaude mcp add --scope user clipboard clipboard-mcp

HTTP Transport

Run as an HTTP server for remote or programmatic access:

bash
clipboard-mcp --http                          # 127.0.0.1:3100clipboard-mcp --http --port 8080              # custom portclipboard-mcp --http --host 0.0.0.0           # expose to network (see Security)

MCP endpoint: http://HOST:PORT/mcp

Usage Examples

Read and transform:

"Take whatever is on my clipboard and rewrite it in a more formal tone, then put the result back."

Watch for changes:

"Watch my clipboard for 60 seconds. When I copy something, summarize it in one sentence."

Round-trip:

"Get my clipboard, translate it to German, and set the translation back."

Data transform:

Copy a CSV table → "Convert what's on my clipboard to JSON" → paste formatted JSON into your editor.

Code from clipboard:

Copy a code snippet from a browser → "Review the code on my clipboard for bugs" → Claude reads it directly, no pasting into chat.

Step-by-step agent output via clipboard history:

Run a multi-step task and set_clipboard after each step. With any clipboard manager (Paste, CopyQ, Klipper), you get a chronological log of every result — browse, search, and review the agent's work without switching windows.

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.

Troubleshooting

Linux: clipboard content disappears Ensure a clipboard manager is running. On bare window managers (i3, dwm), install clipman, parcellite, or copyq.

Wayland: "clipboard is empty or contains non-text content" Your compositor must support the wl-data-control protocol. Sway, Hyprland, GNOME, and KDE all do. Older compositors may not.

macOS: clipboard access denied Ensure the terminal running the MCP server has clipboard permissions in System Settings > Privacy & Security.

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.

Contributing

Bug reports and pull requests are welcome. For major changes, please open an issue first.

License

MIT

来源:README.md,提交 17cfa44

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分