Skip to content

clipboard

Read and write the OS clipboard. Power-up for desktop assistants.

Usage

bash
native-mcp clipboard

No 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.

OSReadWrite
Linux (Wayland)wl-paste --no-newlinewl-copy
Linux (X11 fallback)xclip -selection clipboard -oxclip -selection clipboard
macOSpbpastepbcopy
Windowspowershell.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

FieldTypeRequiredDescription
textstringyesText to put on the clipboard.

Register in Claude Code

bash
claude mcp add native-clipboard native-mcp clipboard

Released under the MIT License.