clipboard-image
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-imagepaste image and help me debug this error"
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.
MCP Clipboard Image Server
A Model Context Protocol (MCP) server that enables Claude Code to paste images directly from your system clipboard for instant analysis and processing.
Features
🖼️ Paste images directly from clipboard (Ctrl+C/Cmd+C → MCP tool)
🔄 Cross-platform support (Windows, macOS, Linux)
📁 Automatic temporary file creation with accessible paths
🎨 Support for multiple image formats (PNG, JPEG, GIF, BMP, TIFF)
⚡ Format conversion capabilities
🛡️ Robust error handling and user feedback
🔍 Automatic format detection via magic numbers
Related MCP server: view-image-mcp
Installation
npm install
npm run buildDependencies
System Dependencies: The server requires platform-specific clipboard utilities:
macOS: Built-in osascript support, optional
pngpastefor enhanced functionalityLinux:
xclip(X11) orwl-paste(Wayland)Windows: Built-in PowerShell support
Linux Setup
# For X11-based systems
sudo apt-get install xclip
# For Wayland-based systems
sudo apt-get install wl-clipboardmacOS Setup (Optional Enhancement)
# Install pngpaste for better clipboard handling
brew install pngpasteUsage
🚀 Quick Start for Claude Code
Step 1: Install the Server
# Clone and build
git clone https://github.com/yourusername/mcp-clipboard-image-server.git
cd mcp-clipboard-image-server
npm install
npm run buildStep 2: Add to Claude Code
Choose one of these methods:
Method A: Project-scoped (Recommended)
claude mcp add clipboard-image -s project -- node /absolute/path/to/mcp-clipboard-image-server/dist/index.jsMethod B: User scope (Global - Available everywhere)
claude mcp add clipboard-image -s user -- node /absolute/path/to/mcp-clipboard-image-server/dist/index.jsMethod C: Local scope
claude mcp add clipboard-image -s local -- node /absolute/path/to/mcp-clipboard-image-server/dist/index.jsMethod D: Manual configuration
Create .mcp.json in your project root:
{
"mcpServers": {
"clipboard-image": {
"command": "node",
"args": ["/absolute/path/to/mcp-clipboard-image-server/dist/index.js"],
"env": {}
}
}
}Step 3: Restart Claude Code
Restart Claude Code to load the new MCP server.
Step 4: Test it!
Copy any image to clipboard
In Claude Code, say: "paste image"
Claude will automatically capture and analyze your image!
🎯 Claude Code Usage Examples
Basic Usage
User: paste image
Claude: [Captures image and describes what's in it]
User: paste image and help me debug this error
Claude: [Analyzes screenshot of error and provides solutions]
User: paste image and explain this diagram
Claude: [Interprets technical diagrams, flowcharts, etc.]Command Shortcuts
Claude Code Slash Commands
# Setup slash commands in Claude Code
./setup-claude-commands.sh
# Now you can use in Claude Code:
/pasteimage # Paste and analyze image
/pasteimage --debug # Paste and debug errors
/pasteimage --explain # Paste and explain diagrams
/pi # Quick shortcutShell Commands
# Install shell commands
./install-commands.sh
# Use from terminal:
paste-image --debug # Paste and debug errors
paste-image --explain # Paste and explain diagrams
pi # Quick alias for paste-imageAdvanced Usage
Screenshots: Perfect for debugging UI issues, error messages
Diagrams: Architecture diagrams, flowcharts, wireframes
Code snippets: Screenshots of code for review and suggestions
Data visualizations: Charts, graphs, analytics dashboards
Available Tools
paste_image
Captures an image from the system clipboard and saves it to a temporary file.
Parameters:
filename(optional): Custom filename without extension (UUID generated if not provided)format(optional): Target format - "png", "jpeg", "jpg", "gif", "bmp", "tiff" (preserves original if not specified)
Usage Examples:
Basic paste:
paste_imageCustom filename:
paste_image({"filename": "screenshot"})Format conversion:
paste_image({"format": "jpeg"})Both options:
paste_image({"filename": "diagram", "format": "png"})
Returns:
Success: File path, format info, and size details
Error: Helpful troubleshooting information
🎯 Slash Commands
After running ./setup-claude-commands.sh, you can use these slash commands directly in Claude Code:
Command | Description | Usage |
| Paste and analyze image |
|
| Paste and debug errors |
|
| Paste and explain diagrams |
|
| Quick paste shortcut |
|
| Paste and debug (alias) |
|
| Paste and explain (alias) |
|
Slash Command Examples:
/pasteimage → Paste image and analyze
/pasteimage --debug → Paste image and debug error
/pi → Quick paste
/paste-debug → Debug screenshotWorkflow
Copy Image: Copy any image to clipboard (Ctrl+C/Cmd+C)
Call Tool: Use
paste_imagetool in Claude CodeGet Path: Receive temporary file path
Process: Claude Code can now read and analyze the image
Error Handling
The server provides comprehensive error handling for:
No image in clipboard
Clipboard access permissions
Unsupported formats
File system errors
Platform compatibility issues
Security Considerations
Images are saved to system temporary directory
No network requests or external API calls
Temporary files use UUID naming to avoid conflicts
Cross-platform clipboard access uses standard system utilities
No persistent data storage
Platform Support
Platform | Primary Method | Fallback Method | Status |
macOS | osascript | pngpaste | ✅ Supported |
Linux | xclip | wl-paste | ✅ Supported |
Windows | PowerShell | - | ✅ Supported |
Development
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run in development mode
npm run dev
# Start production server
npm startTroubleshooting
Common Issues
"No image found in clipboard"
Ensure an image is actually copied (not just selected)
Try copying the image again
Some applications may not properly set clipboard data
Clipboard access errors
Check system permissions for clipboard access
Ensure required utilities are installed (xclip, wl-paste)
Try restarting the MCP server
Platform-specific issues
Linux: Install
xcliporwl-pastedepending on display servermacOS: Consider installing
pngpastefor better compatibilityWindows: Ensure PowerShell execution policy allows scripts
Debug Mode
Set environment variable for detailed logging:
DEBUG=1 node dist/index.jsLicense
MIT License - see LICENSE file for details.
Contributing
Fork the repository
Create a feature branch
Make changes with tests
Submit a pull request
For bug reports and feature requests, please use the GitHub issues page.
Available Tools
4 toolsauto_paste_statusA
Check the current status of auto-paste detection (enabled/disabled).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It indicates a read-only status check ('check current status') but does not explicitly state that it has no side effects or describe the return format. It adds the enabled/disabled detail, but could be more explicit about the operation being non-destructive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that front-loads the key information. Every word contributes to understanding the tool's function, with no unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple status check with no parameters and no output schema, the description is largely complete. It specifies what is being checked and the possible states. However, it could be slightly more explicit about the return value format, which is a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool accepts zero parameters, so the baseline for parameter semantics is 4. The description does not need to explain parameter details, and it correctly implies no inputs are required for the status check.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: checking the current status of auto-paste detection as enabled or disabled. The verb 'check' plus the specific resource 'status of auto-paste detection' distinguishes it from sibling tools that enable, disable, or paste.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies when to use the tool: when you need to know whether auto-paste is enabled or disabled. It does not explicitly mention alternatives or exclusions, but the sibling tools (enable/disable/paste) are conceptually distinct, making the usage context obvious.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
disable_auto_pasteA
Disable automatic paste detection. Returns to manual paste mode using slash commands only.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the immediate effect (disables auto-paste) and the resulting mode (manual via slash commands), but it omits potential side effects, reversibility, or any prerequisites. Since this is a simple toggle, some inference is reasonable, but more explicit detail would improve transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no fluff. It front-loads the action and immediately explains the result, making every word earn its place. There is no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (zero parameters, no output schema), the description is nearly complete. It states the action and the resulting mode, which is enough for an agent to invoke correctly. It could mention the opposite action (enable_auto_paste) for full completeness, but that is not essential.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline is 4 per the rubric. The description adds no parameter-specific meaning, but none is needed; the input schema is empty, and the description focuses on the action and outcome.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function with a specific verb ('Disable') and resource ('automatic paste detection'). It also differentiates from siblings by explicitly mentioning the result ('manual paste mode'), making it distinct from enable_auto_paste and auto_paste_status.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies when to use this tool: when you want to turn off automatic paste detection. It does not explicitly name alternatives, but the sibling tool 'enable_auto_paste' provides clear contrast, and the phrase 'using slash commands only' suggests the resulting behavior is manual, which guides usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
enable_auto_pasteA
Enable automatic paste detection. When enabled, copying an image and pressing Ctrl+V will automatically trigger image pasting without needing to type slash commands.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It clearly describes the trigger (copying image + Ctrl+V) and the effect (auto-triggering pasting). It does not mention side effects, persistence, or scope, but for a simple toggle, this is reasonable. The description adds value beyond the tool name without being misleading.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core action and followed by a clear explanation of the behavior. Every sentence earns its place, with no fluff or redundancy. It is concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, no output schema, no annotations), the description is complete. It fully explains what the tool does and its effect. There are no missing pieces that would prevent an agent from using it correctly. The sibling context further clarifies its role.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline is 4. The description does not need to explain parameters, and the input schema shows none. The description adds context about the tool's behavior, which compensates for the lack of parameters entirely.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Enable automatic paste detection.' It uses a specific verb (enable) and resource (automatic paste detection), and explains the exact behavior triggered. This distinguishes it from siblings like 'paste_image' (manual) and 'disable_auto_paste' (the inverse).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context by explaining what happens when enabled (copying an image and pressing Ctrl+V triggers pasting). It implicitly contrasts with using slash commands ('without needing to type slash commands'), which suggests an alternative workflow. However, it does not explicitly name sibling tools or state when not to use this tool, so it falls short of full explicit guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
paste_imageA
Paste an image from the system clipboard. Captures clipboard image data, saves it to a temporary file, and returns the file path for Claude Code to display. Supports common image formats (PNG, JPEG, GIF, BMP, TIFF).
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Optional target format. If not specified, the original format will be preserved. | |
| filename | No | Optional custom filename (without extension). If not provided, a UUID will be used. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full responsibility. It discloses the key behavioral traits: captures clipboard data, saves to a temporary file, and returns the file path. This adds meaningful transparency, though it does not cover edge cases like an empty clipboard or file cleanup.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded with the primary action. It consists of two sentences that efficiently convey the operation, behavior, and supported formats, with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with no output schema, but the description explains the return value (file path) and the save-to-file behavior. It lacks details about prerequisites (e.g., clipboard must contain an image) and potential failure modes, which would make it more complete. Still, for a straightforward clipboard utility, it covers sufficient context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Both parameters are fully described in the input schema, so the description does not need to add much. The description mentions support for common image formats, which aligns with the format enum, but adds no additional syntax or format details beyond what the schema already provides. Baseline of 3 is appropriate since schema coverage is 100%.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: pasting an image from the system clipboard, saving it to a temporary file, and returning the file path. It distinguishes paste_image from sibling tools (enable_auto_paste, disable_auto_paste, auto_paste_status) which manage auto-paste settings rather than directly pasting an image.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies when to use this tool: when an image is in the clipboard and needs to be displayed via Claude Code. It doesn't explicitly name alternatives or exclusions, but the sibling tools are clearly about toggling auto-paste, so the context is unambiguous. This is a clear usage context without explicit when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.0- First observed
auto_paste_status - First observed
disable_auto_paste - First observed
enable_auto_paste - First observed
paste_image
TDQS
Scored across 4 tools
Each tool has a singular purpose: paste_image performs the actual paste, while enable/disable/status manage the auto-paste setting. There is no overlap or ambiguity between the action-oriented and configuration-oriented tools.
Most tools follow a clear verb_noun pattern (paste_image, enable_auto_paste, disable_auto_paste). The status tool uses a noun phrase (auto_paste_status) instead of a verb, which is a slight deviation, but the style is consistent and readable.
Four tools is well-scoped for a clipboard-image server. The set covers the core function (pasting) plus the auto-paste feature without unnecessary bloat.
The tool surface fully covers the domain: manual paste, auto-paste enable/disable, and status query. There appear to be no missing operations or dead ends for a clipboard-image utility.
Maintenance
Related MCP Connectors
- lightgenOAuthapp.lightgen
Generate and edit images and create short videos inside Claude. Prepaid credits, no subscription.
Stop copy-pasting between Claude Chat and Claude Code.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Share context and questions between Claude instances — VS Code, claude.ai web, and mobile.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceGives AI assistants direct access to macOS clipboard - letting Claude copy generated code, text, or files straight to your clipboard for pasting anywhere on Mac.246MIT
- FlicenseAqualityDmaintenanceEnables Claude Code to display images inline within supported terminals like Ghostty and Kitty using the Kitty graphics protocol on macOS. It allows users to view various image formats including PNG, JPEG, GIF, and WebP directly in the terminal interface.11-
- AlicenseBqualityDmaintenanceEnables text-only AI models to understand clipboard images by describing them through a vision model, eliminating manual file saving.1244MIT
- AlicenseBqualityDmaintenanceEnables interactive feedback with image support in Cursor, allowing users to paste images for visual context and feedback.18MIT