clipboard
Read and write the OS clipboard. Power-up for desktop assistants.
Usage
bash
native-mcp clipboardNo flags.
Backing tools
The server shells out to platform-native clipboard commands. Each must be available on PATH for the server to work on that platform.
| OS | Read | Write |
|---|---|---|
| Linux (Wayland) | wl-paste --no-newline | wl-copy |
| Linux (X11 fallback) | xclip -selection clipboard -o | xclip -selection clipboard |
| macOS | pbpaste | pbcopy |
| Windows | powershell.exe -Command "Get-Clipboard -Raw" | clip.exe |
On Linux, Wayland is preferred when WAYLAND_DISPLAY is set; otherwise xclip is used. Headless servers will not have either — the server returns a clear error in that case.
Tools
read
No arguments. Returns the current clipboard text. Trailing newlines depend on the underlying tool (Wayland's --no-newline is used; X11 returns the clipboard verbatim).
write
| Field | Type | Required | Description |
|---|---|---|---|
text | string | yes | Text to put on the clipboard. |
Register in Claude Code
bash
claude mcp add native-clipboard native-mcp clipboard