macos-clipboard-mcp
by xiaoquisme
README.md
# 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)
```json
{
"clipboard": {
"command": "uvx",
"args": [
"macos-clipboard-mcp"
]
}
}
```
### method2
```json
{
"clipboard": {
"command": "uv",
"args": [
"--directory",
"<your-local-folder>/macos-clipboard-mcp",
"run",
"main.py"
]
}
}
```
## Installation
```bash
uv sync
python main.py
```
## Requirements
- Python 3.12+
- macOS (uses AppleScript for clipboard operations)
## Usage
Start the MCP server:
```bash
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](https://github.com/astral-sh/uv) for dependency management
## License
MIT
TDQS
B3/5.0
Scored across 3 tools
Disambiguation5/5
Each tool targets a distinct clipboard operation: copying data, pasting text, and pasting images. No ambiguity between them.
Naming Consistency5/5
All tool names follow a consistent verb_noun pattern in snake_case: copy_to_clipboard, paste_from_clipboard, paste_image_from_clipboard.
Tool Count5/5
Three tools are appropriate for a clipboard utility, covering the essential operations without bloat.
Completeness5/5
The tool set covers the fundamental clipboard actions: copy, paste text, and paste image. No obvious gaps for typical usage.
Maintenance
ActivityInactive
ResponsivenessNo issues