clipboard-mcp
Click on "Deploy 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 read the error I just copied and explain what it means"
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.
📋 clipboard-mcp
Your agent can't see what you just copied. This fixes that.
An MCP server that gives any local agent five tools: read the clipboard, write to it, search a bounded clipboard history, clear it deliberately, and check its own status. Everything stays on your machine over stdio — no cloud, no API key, no telemetry.
Why
The clipboard is where the interesting context lives: the stack trace you copied, the URL from a ticket, a JSON payload, a SQL query. You paste it into the chat anyway — but often you say "look at what I copied" and the agent has nothing.
clipboard-mcp adds that missing sense. It also keeps a small searchable history, so "the URL from earlier" becomes answerable without scrolling through chat.
Related MCP server: mindmap-mcp-server
Install
git clone https://github.com/Olivia-y-l/clipboard-mcp.git
cd clipboard-mcp
npm installRequires Node 20+ (the MCP SDK's HTTP transport pulls a Hono server that needs Node 20). On Linux, clipboardy uses xsel (a bundled fallback is included, but installing xsel is the reliable path); X11 is expected.
You do not run this in a terminal — your MCP client spawns it. For a manual check:
node bin/clipboard-mcp.js # speak JSON-RPC on stdio; Ctrl+C to stopConfigure your client
Claude Desktop (claude_desktop_config.json), Cursor (.cursor/mcp.json) and most MCP clients use the same shape:
{
"mcpServers": {
"clipboard": {
"command": "node",
"args": ["/absolute/path/to/clipboard-mcp/bin/clipboard-mcp.js"]
}
}
}Windows: use forward slashes in the path and make sure node is on PATH:
"args": ["C:/Users/you/clipboard-mcp/bin/clipboard-mcp.js"]Restart the client and the tools appear as read_clipboard, write_clipboard, clipboard_history, clear_clipboard_history, clipboard_stats.
Tools
Tool | Arguments | What it does |
| – | Returns the current clipboard text and records it. Truncates at 20k chars. |
|
| Replaces the clipboard, so the user can paste elsewhere. |
|
| Searches entries captured while the server runs. |
|
| Deletes stored history. Refuses unless |
| – | Entry count, storage path, poll interval, platform. |
Example prompts that now work:
"Read the error I just copied and explain it."
"Find the API URL I copied this morning." →
clipboard_history({ query: "api", since: "12h" })"Put this migration SQL on my clipboard." →
write_clipboard"Why isn't the clipboard tool working?" →
clipboard_stats
History and privacy
History is on by default and captures text copies every 1.5 seconds while the server is running. Treat this as a real privacy decision.
Stored at
~/.clipboard-mcp/history.json(override withCLIPBOARD_MCP_DIR).Plain text JSON. Mode
0600on POSIX; Windows ACLs are best effort.500 entries, 20,000 characters each, consecutive duplicates collapsed.
The current clipboard is captured when the server starts.
Passwords, tokens and one-time codes can end up in this file. If you use a password manager, consider running the server only when needed, or disabling history.
Disable history entirely:
"env": { "CLIPBOARD_MCP_HISTORY": "off" }With history off, no file is created and nothing is captured in the background. The tools still work; clipboard_history only sees what those tools touched in the current session.
Other settings:
Variable | Default | Meaning |
|
| data directory |
|
| poll interval, minimum 250 |
|
| max stored entries |
|
| per-entry cap |
| on | set to |
clear_clipboard_history only clears this server's file. Your OS clipboard and any clipboard manager you already use are separate.
How it works
OS clipboard ──poll 1.5s──▶ ClipboardStore (JSON, bounded)
â–²
agent ◀──stdio JSON-RPC──▶ MCP server ──read/write──▶ clipboardysrc/server.js— tool registration and text formatting.src/store.js— dedupe, truncation, atomic writes, search.src/watcher.js— polling loop that survives clipboard errors and never writes to stdout.bin/clipboard-mcp.js— wiring, env config, graceful shutdown.
Polling is a deliberate trade-off: no native dependencies or platform-specific event APIs, at the cost of missing two copies that happen within the same interval. stdout is reserved for the protocol; all logs go to stderr.
Tests
npm test22 tests cover storage (persistence, dedupe, caps, corrupt files, private permissions), the watcher (errors, repeats, timer lifecycle), and every tool over a real in-memory MCP client/server pair.
Limitations
Text only. Images and files are not captured.
History is not encrypted at rest; it relies on OS file permissions.
Polling can miss very fast consecutive copies.
Password managers that mark clipboard data as secret are not detected; their copies may still be recorded as text.
License
MIT.
Available Tools
5 toolsclear_clipboard_historyClear clipboard historyADestructive
Delete all stored clipboard history. Requires confirm=true. This does not change the current clipboard contents. Destructive and irreversible.
Inputs: confirm.
clipboard_historySearch clipboard historyARead-only
List or search clipboard entries captured while this server was running, newest first. Use when the user refers to something copied earlier ("the URL from before", "that JSON I copied") without pasting it.
Inputs: full, limit, query, since.
clipboard_statsClipboard server statusARead-only
Show clipboard history size, storage path and polling configuration. Use for troubleshooting an MCP setup.
Inputs: no named parameters.
read_clipboardRead clipboardA
Read the current text on the system clipboard. Use this when the user says "look at what I copied", "the error I just copied", or pastes something without including it. The read is also recorded in local history.
Inputs: no named parameters.
write_clipboardWrite clipboardA
Replace the system clipboard with text, so the user can paste it elsewhere. Use for code snippets, commands or links the user explicitly wants copied.
Inputs: text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
read_clipboard vs write_clipboard vs clipboard_history are clearly separable by action and target, and clear_clipboard_history is explicitly distinguished from modifying the live clipboard. The only mild overlap is clipboard_history vs clipboard_stats, since both inspect stored history, but their descriptions (entries vs size/path/config) differentiate them adequately.
Three tools follow a verb_noun pattern (read_clipboard, write_clipboard, clear_clipboard_history) while two use a bare noun prefix (clipboard_history, clipboard_stats). It's readable and clearly domain-scoped, but the verb-first vs noun-first split is a minor deviation rather than a single convention.
Five tools map cleanly onto the clipboard domain: read, write, browse history, purge history, and diagnose. Nothing feels redundant or padded, and no obvious operation was merged into an overloaded tool.
The surface covers the full lifecycle for a clipboard helper: capture, read, review, delete and inspect. Minor gaps exist—no way to delete a single history entry, and no explicit clear_clipboard for the live clipboard (as opposed to history)—but agents can work around both.
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseBqualityDmaintenanceA local-first MCP server that provides AI agents with safe codebase access through file discovery, hybrid lexical-semantic search, and project introspection. It features durable local memory and semantic indexing while keeping all data and processing entirely on your local machine.7444 npm6MIT
- AlicenseAqualityCmaintenanceA local-first MCP server for shared memory across AI tools, enabling context capture and resume across sessions.2660 npm6Apache 2.0
- AlicenseNot gradedqualityDmaintenanceA lightweight, stdio-based MCP server enabling AI assistants to perform local file system operations like reading, writing, searching, and executing commands.5,198 npmMIT
- FlicenseNot gradedqualityBmaintenanceLocal MCP server that lets your AI coding agent query its own cross-tool project history - file/command freshness, past test failures, cost & token spend, cache status, and session handoff - over stdio, 100% local, no telemetry.66-