mcp-clipboard
A minimalist, production-ready Model Context Protocol server that gives Claude Desktop seamless access to your system clipboard with automatic history tracking
Versions
1.0.1latest1.0.0Tools 4
read_clipboard Read the current content from the system clipboard. TIME MACHINE FEATURE: Automatically tracks clipboard changes in history. Each time you read, if the content is different from the last read, it gets added to the 15-item history buffer. Works on: macOS, Windows, Linux (with xclip/xsel installed) Returns: str: The text content currently stored in the clipboard. Use this tool when: - The user asks to "check my clipboard" - The user references "the error in my clipboard" - The user says "use what I just copied" - You need to analyze or process clipboard content Examples: - "What's in my clipboard?" - "Fix the error from my clipboard" - "Take my clipboard content and format it as JSON" - "Read what I just copied"
write_clipboard Write text content to the system clipboard. TIME MACHINE FEATURE: Automatically adds written content to history. This allows you to go back and retrieve things you generated earlier. Works on: macOS, Windows, Linux (with xclip/xsel installed) Args: text: The text content to copy to the clipboard Returns: str: Confirmation message indicating success or failure Use this tool when: - The user asks to "copy this to my clipboard" - The user wants to "save this for later" - You generate code/text the user wants to paste elsewhere - The user says "put this in my clipboard" Examples: - "Copy this SQL query to my clipboard" - "Save this API key to my clipboard" - "Put the fixed code in my clipboard" - "Write this to my clipboard"
get_clipboard_history TIME MACHINE: Retrieve the clipboard history (last 15 unique items). This is THE KEY TOOL for accessing things you copied minutes or hours ago. The history persists during the MCP server session and tracks both: - Things you copied from other apps (captured via read_clipboard) - Things the AI generated for you (captured via write_clipboard) Returns: str: Formatted list of clipboard history with indices, timestamps, and previews Use this tool when: - User asks "what did I copy earlier?" - User references something they copied before (e.g., "the API key from before") - User wants to see their clipboard timeline - User asks to retrieve something from N items ago - Debugging or reviewing past clipboard operations Examples: - "Show me my clipboard history" - "What was the third thing I copied?" - "Find the API key I copied earlier" - "Show me everything I've copied in this session" How it works: The deque stores the 15 most recent UNIQUE clipboard items. When the 16th item is added, the oldest (first) item is automatically removed. Each entry includes: content, timestamp, hash (for dedup), and preview.
wait_for_clipboard_change Wait for the user to copy something new to the clipboard. This is THE KEY TOOL for interactive workflows where you need the user to copy something. Works on: macOS, Windows, Linux Args: timeout_seconds: Maximum time to wait (default: 60 seconds, max: 120) check_interval: How often to check for changes in seconds (default: 0.5) Returns: str: The new clipboard content, or timeout message Use this tool when: - You ask the user to "copy something" and need to wait for it - User says "I'll copy it now" or "let me copy that" - Interactive workflows where user needs time to select and copy text - User needs to switch to another app to copy something Examples: - "Please copy the error message from your terminal, I'll wait" - "Copy the API key and I'll format it for you" - "Go ahead and copy the code you want me to review" How it works: 1. Takes a snapshot of current clipboard 2. Polls the clipboard every 0.5 seconds 3. Returns immediately when new content is detected 4. Times out after specified seconds if no change
Permissions 0
No permissions indexed yet.