macos-cliboard-mcp

macos-cliboard-mcp

1

MacOS Clipboard MCP is a utility designed for interacting with the macOS clipboard using Model Context Protocol. It allows users to copy text and paste text or images directly from the clipboard.

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