mcp-windows-clipboard
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-windows-clipboard
Native Windows clipboard access for AI coding assistants via Model Context Protocol
Problem Solved
Clipboard image pasting doesn't work in many AI coding assistants on Windows. This MCP server provides a reliable bridge to access Windows clipboard content (including images) from Claude Code, OpenCode, Cursor, and other MCP-compatible tools.
Related MCP server: WSLSnapit-MCP
Features
Image Support - Read PNG, BMP, and DIB images from clipboard
Text Support - Read text content from clipboard
Auto-Detection - Automatically detects content type
Autopaste - Automatically captures clipboard content when you press Ctrl+V
AI Analysis Ready - Cached pastes ready for AI to analyze on demand
File Output - Save images directly to files for use with other tools
Base64 Output - Get image data as base64 for inline use
Non-Blocking - Autopaste monitoring doesn't interfere with normal paste operations
Quick Start
Installation
npm install -g mcp-windows-clipboardOr install from source:
git clone https://github.com/marco-jardim/mcp-windows-clipboard.git
cd mcp-windows-clipboard
npm install
npm run buildConfiguration
Add to your MCP client configuration:
OpenCode (~/.config/opencode/opencode.json)
{
"mcp": {
"windows-clipboard": {
"type": "local",
"command": ["node", "C:/path/to/mcp-windows-clipboard/dist/index.js"],
"environment": {},
"enabled": true
}
}
}Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json)
{
"mcpServers": {
"windows-clipboard": {
"command": "mcp-windows-clipboard"
}
}
}Cursor / VS Code
Add to your MCP extension settings:
{
"mcp.servers": {
"windows-clipboard": {
"command": "mcp-windows-clipboard"
}
}
}Available Tools
read_clipboard
Read the current clipboard contents. Returns text directly or base64-encoded image data.
Parameters:
format(optional):"auto"|"text"|"image"- Force specific format detection
Example usage:
Read my clipboard and tell me what's thereread_clipboard_image
Read an image from clipboard and save it to a file. Returns the file path for use with image analysis tools.
Parameters:
outputPath(optional): Custom path to save the image
Example usage:
Save my clipboard image to a file and analyze itclipboard_has_image
Check if the clipboard currently contains an image.
Example usage:
Do I have an image in my clipboard?get_last_paste
Get the most recently pasted content (captured automatically when you pressed Ctrl+V). Returns text content directly or file path for images. This is the key tool for the autopaste feature.
Example usage:
What did I just paste?
Analyze my last pasteautopaste_status
Check if autopaste monitoring is active and get information about the last captured paste.
Example usage:
Is autopaste working?clear_paste_cache
Clear the cached paste content. Useful for privacy or to reset state.
Example usage:
Clear my paste historyUsage Examples
Basic Image Paste Workflow
Take a screenshot (
Win+Shift+S)Ask your AI assistant: "What's in my clipboard?"
The assistant will read and describe the image
Save and Analyze
Copy an image or screenshot
Ask: "Save my clipboard image and analyze it"
The image is saved to temp folder and analyzed
Text Content
Copy some text (
Ctrl+C)Ask: "Read my clipboard"
Returns the text content directly
Autopaste Workflow (NEW!)
The autopaste feature automatically captures whatever you paste, so the AI can analyze it without you having to explicitly request a clipboard read:
Copy something (text or image)
Press
Ctrl+Vto paste it anywhere (your normal paste works as expected)Ask your AI assistant: "What did I just paste?" or "Analyze my last paste"
The AI uses
get_last_pasteto retrieve and analyze the content
This is especially useful for:
Quick image analysis after pasting a screenshot
Reviewing what you just pasted
Seamless workflow without explicit clipboard commands
How It Works
This MCP server uses PowerShell to access the native Windows clipboard API:
Image Detection: Checks
[System.Windows.Forms.Clipboard]::ContainsImage()Image Reading: Uses
[System.Windows.Forms.Clipboard]::GetImage()and saves as PNGText Reading: Uses
[System.Windows.Forms.Clipboard]::GetText()
Autopaste Technology
The autopaste feature uses uiohook-napi for non-blocking global keyboard monitoring:
Non-blocking: Keyboard events are observed, not intercepted - your normal Ctrl+V paste always works
Automatic caching: When Ctrl+V is detected, clipboard content is automatically read and cached
Graceful degradation: If the keyboard hook fails to initialize, all other clipboard tools continue to work normally
No external dependencies or native binaries required for core functionality - just Node.js and PowerShell (included with Windows).
Requirements
Windows 10/11 - Uses Windows-specific clipboard APIs
Node.js 18+ - Required for ES modules support
PowerShell - Included with Windows, no additional setup needed
Troubleshooting
"Clipboard is empty" when it's not
Ensure the content was copied properly (try
Ctrl+Cagain)Some applications use custom clipboard formats not supported
Try copying from a different application
PowerShell errors
Ensure PowerShell execution policy allows scripts:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
MCP connection issues
Verify the path in your config is correct
Check that Node.js is in your PATH
Try running
mcp-windows-clipboarddirectly to test
Image not saving
Check write permissions in the output directory
Try specifying a custom
outputPathEnsure enough disk space is available
Development
# Install dependencies
npm install
# Build
npm run build
# Run in development mode
npm run dev
# Run tests
npm testContributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Make your changes
Run tests:
npm testSubmit a pull request
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Acknowledgments
Model Context Protocol by Anthropic
Inspired by the WSL clipboard challenges faced by the community
Related Projects
mcp-clip - Go-based MCP clipboard for WSL2
mcp-clipboard - Persistent clipboard manager
Made with frustration and determination - because pasting images shouldn't be this hard.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Read-only context from your desktop activity, so your AI assistant knows what you worked on.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI coding agents like Claude to read Windows clipboard contents (text and images) from within WSL environments, providing seamless cross-platform clipboard access through the Model Context Protocol.5MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to capture screenshots and read clipboard content from Windows applications while operating within a WSL environment. It supports monitor or window-specific targeting and features intelligent image optimization for efficient data transfer.25MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to directly read, write, watch, clear, and probe the system clipboard across platforms.10MIT
- AlicenseNot gradedqualityBmaintenanceEnables an AI assistant to search and retrieve local clipboard history, pin or delete clips, and set or copy clipboard content while automatically hiding sensitive data such as passwords, tokens, and card numbers.MIT