clipboard-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@clipboard-mcp-serverread the clipboard contents"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Tools
3 tools for reading, writing, and inspecting the system clipboard:
Tool | Description |
| Read clipboard contents in a specified format (text, HTML, RTF, image, or auto-select richest) |
| Write plain text or HTML to the clipboard, replacing current contents |
| List available clipboard formats and byte sizes without reading full content |
clipboard_read
Read the current clipboard contents in a requested format.
automode returns the richest format explicitly present — priority: image > html > rtf > textimagereturns base64-encoded PNG data with pixel dimensionshtmlreturns raw HTML source as copied from a browserrtfreturns raw RTF markuptextreturns plain textSize limits: 512 KB for text/HTML/RTF, 5 MB for images (raw bytes before base64 expansion)
Returns a typed
format_unavailableerror when the requested format is not on the clipboard — useclipboard_inspectfirst to check availability
clipboard_write
Write content to the clipboard, replacing current contents.
textwrites plain texthtmlwrites HTML with an auto-generated plain-text fallback (tag-stripped), so paste targets that only accept plain text still receive something usefulSize limit: 1 MB
destructiveHint: true— replaces whatever is currently on the clipboard
clipboard_inspect
List the formats and byte sizes of what is currently on the clipboard without reading the full content.
Returns
primaryFormat— the richest format present (image > html > rtf > text), oremptyReturns
availableFormats— all semantic formats present, for deciding which format to pass toclipboard_readReturns
rawTypes— all raw platform type identifiers with byte sizes (UTIs on macOS, TARGETS on X11/Wayland, format names on Windows)Use this before
clipboard_readto avoidformat_unavailableerrors and to check content size before reading
Related MCP server: mcp-clipboard
Features
Built on @cyanheads/mcp-ts-core:
Declarative tool definitions — single file per tool, framework handles registration and validation
Unified error handling across all tools
Pluggable auth (
none,jwt,oauth)Structured logging with optional OpenTelemetry tracing
Runs locally via stdio or HTTP from the same codebase
Clipboard-specific:
Cross-platform backend detection at startup — macOS (pbcopy/pbpaste + osascript), Linux X11 (xclip), Linux Wayland (wl-clipboard), Windows (PowerShell 5.1+)
Semantic format mapping — platform-native type identifiers (UTIs, TARGETS, Windows format names) mapped to
text,html,rtf,imageacross all backendsSize-guarded reads and writes — typed
ContentTooLargeErrorwith byte/limit metadata before content returnsHTML write with automatic plain-text fallback — stripped and written alongside HTML for apps that only paste plain text
Image support — macOS and Windows backends decode PNG bytes and return width/height alongside base64 content
Getting started
Add the following to your MCP client configuration file.
{
"mcpServers": {
"clipboard-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/clipboard-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"clipboard-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/clipboard-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with Docker:
{
"mcpServers": {
"clipboard-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"ghcr.io/cyanheads/clipboard-mcp-server:latest"
]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
macOS: No additional tools required — pbcopy, pbpaste, and osascript are built in.
Linux X11: xclip must be installed.
apt install xclip # Debian/Ubuntu
pacman -S xclip # ArchLinux Wayland: wl-clipboard must be installed.
apt install wl-clipboard # Debian/Ubuntu
pacman -S wl-clipboard # ArchWindows: PowerShell 5.1+ (built-in on Windows 10 and later).
Configuration
Variable | Description | Default |
| Transport: |
|
| Port for HTTP server. |
|
| Hostname for HTTP server. |
|
| Endpoint path for the HTTP server. |
|
| Auth mode: |
|
| Log level ( |
|
| Enable OpenTelemetry instrumentation. |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
# One-time build
bun run rebuild
# Run the built server
bun run start:stdio
# or
bun run start:httpChecks and tests
bun run devcheck # Lint, format, typecheck, security
bun run test # Vitest test suiteDocker
docker build -t clipboard-mcp-server .
docker run -p 3010:3010 clipboard-mcp-serverProject structure
Path | Purpose |
| Entry point — registers tools via |
| Tool definitions: |
| Platform backends (macOS, Linux X11, Wayland, Windows) and service facade |
| Vitest tests for tools and backends |
| Agent workflow skills (add-tool, field-test, polish-docs-meta, etc.) |
Development guide
See CLAUDE.md for the full developer protocol — tool patterns, service patterns, error handling, logging conventions, and the checklist for shipping changes.
Contributing
Issues and pull requests welcome at github.com/cyanheads/clipboard-mcp-server.
License
Apache 2.0 — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityFmaintenanceProvides tools for reading and writing system clipboard data across Linux, macOS, Windows, and WSL platforms.Last updated2AGPL 3.0
- AlicenseAqualityDmaintenanceMCP server that reads and writes the system clipboard — tables, text, code, JSON, URLs, images, and more. Preserves spreadsheet structure (rows/columns) that is lost when pasting into Claude directly.Last updated44Apache 2.0
- Alicense-qualityDmaintenanceA standalone clipboard history MCP server for macOS that monitors clipboard in real-time, stores history locally in SQLite, and exposes it to any MCP-compatible AI assistant.Last updated5MIT
- FlicenseBqualityDmaintenanceProvides MCP tools to copy text to and paste text or images from the macOS clipboard using AppleScript.Last updated31
Related MCP Connectors
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
pub.dev MCP — package registry for Dart & Flutter.
Markdown utilities MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/clipboard-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server