MacOS Clipboard MCP

by xiaoquisme

343 downloads
Not rated
GitHub

About

A simple utility that provides model context protocol (MCP) tools for interacting with the macOS clipboard.

Details

Author
xiaoquisme
Downloads
343
Categories
Other

- Copy arbitrary text strings to the clipboard
- Paste the current clipboard text as a string
- Paste clipboard images (TIFF, PNG, JPEG) as base64-encoded PNG
- Runs entirely on macOS using AppleScript
- Minimal setup with the uvx one‑command approach

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MacOS Clipboard MCP
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

The recommended setup uses uvx with no local install: add an MCP client entry with command uvx and args ["macos-clipboard-mcp"]. Alternatively, clone the repo, run uv sync, and start the server with mcp dev main.py. The server exposes three tools: copy_to_clipboard, paste_from_clipboard, and paste_image_from_clipboard.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "macos clipboard mcp": {
            "macos-cliboard-mcp": {
                "command": "uv",
                "args": [
                    "sync"
                ]
            }
        }
    }
}

McpServers

{
    "macos-cliboard-mcp": {
        "command": "uv",
        "args": [
            "sync"
        ]
    }
}

MacOS Clipboard MCP

A simple utility that provides model context protocol (MCP) tools for interacting with the macOS clipboard.

Features

- Copy text to the clipboard
- Paste text from the clipboard
- Paste images from the clipboard (supports TIFF, PNG, and JPEG formats)

mcp config

method1(recommended)

{
    "clipboard": {
        "command": "uvx",
        "args": [
            "macos-clipboard-mcp"
        ]
    }
}

method2

{
    "clipboard": {
            "command": "uv",
            "args": [
                "--directory",
                "<your-local-folder>/macos-clipboard-mcp",
                "run",
                "main.py"
            ]
        }
}

Installation

uv sync
python main.py

Requirements

- Python 3.12+
- macOS (uses AppleScript for clipboard operations)

Usage

Start the MCP server:

mcp dev main.py

This exposes the following MCP tools:

- copy_to_clipboard(data: str): Copies text to the clipboard
- paste_from_clipboard(): Returns text from the clipboard
- paste_image_from_clipboard(): Returns images from the clipboard as base64-encoded PNG

Development

This project uses modern Python tooling:

- uv for dependency management

License

MIT

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.