
Cut Copy Paste
Provides clipboard-style cut, copy, paste operations for code across multiple files with undo functionality. Uses encrypted storage and maintains session-based clipboards for AI coding workflows.
Provides secure clipboard operations with cut, copy, paste, and undo functionality using encrypted SQLite storage and path-based access controls for managing code blocks across multiple files.
What it does
- Copy lines from files to clipboard
- Cut lines from files to clipboard
- Paste clipboard content to multiple locations
- Undo paste operations with file restoration
- View clipboard contents and operation history
- Control file access with path allowlists
Best for
About Cut Copy Paste
Cut Copy Paste is a community-built MCP server published by pr0j3c7t0dd-ltd that provides AI assistants with tools and capabilities via the Model Context Protocol. Securely manage your Mac OS X clipboard history with encrypted storage, cut, copy, paste, undo, and access controls for It is categorized under productivity, developer tools. This server exposes 6 tools that AI clients can invoke during conversations and coding sessions.
How to install
You can install Cut Copy Paste in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
License
Cut Copy Paste is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Tools (6)
Copy lines from a file to session clipboard
Cut lines from a file to session clipboard
Paste clipboard content to one or more locations
Display current clipboard contents
Undo the most recent paste operation
MCP Cut-Copy-Paste Clipboard Server
A Model Context Protocol (MCP) server that provides clipboard-style operations for AI-assisted coding agents. Cut, copy, paste, and undo code blocks across files with full audit trail and session management.
Features
- π― 6 MCP Tools: copy_lines, cut_lines, paste_lines, show_clipboard, undo_last_paste, get_operation_history
- π Session-Based Clipboard: Each session maintains independent clipboard state
- β©οΈ Smart Undo Support: Revert paste operations with complete file snapshots - automatically restores cut source files
- π Audit Trail: SQLite-based operation logging for debugging
- π Encrypted Clipboard Storage: AES-256-GCM encrypted payloads with per-installation keys stored beside the SQLite DB
- π‘οΈ Path Access Control: Optional
.gitignore-style allowlist to restrict filesystem access (docs) - π Session Management: Automatic cleanup with 24-hour timeout
- π NPX Ready: Easy installation and updates via npm
- π Unicode Support: Full support for international characters and emoji
- π‘οΈ Binary File Detection: Automatically rejects PNG, PDF, JPEG, GIF, and other binary formats
- π Flexible Line Insertion: Supports paste at line 0 (beginning of file)
Installation
Via NPX (Recommended)
npx cut-copy-paste-mcp
Via NPM
npm install -g cut-copy-paste-mcp
cut-copy-paste-mcp
Local Development
git clone https://github.com/Pr0j3c7t0dd-Ltd/cut-copy-paste-mcp.git
cd cut-copy-paste-mcp
npm install
npm run build
node dist/cli.js
Quick Start
For Claude Code / Claude Desktop Users
-
Configure the MCP server:
- Open
~/Library/Application Support/Claude/claude_desktop_config.json(macOS) - Or
%APPDATA%\Claude\claude_desktop_config.json(Windows) - Add the configuration:
{ "mcpServers": { "clipboard": { "command": "npx", "args": ["cut-copy-paste-mcp"] } } } - Open
-
Restart Claude Desktop/Code to load the MCP server
-
Verify the tools are available:
- In your conversation, you should see clipboard tools available
- Try: "Show me the available clipboard tools"
-
Start using the clipboard:
- "Copy lines 10-25 from src/utils.ts"
- "Show me what's in the clipboard"
- "Paste the clipboard to line 5 in src/helpers.ts"
For Other MCP Clients
- Install the server (see Installation above)
- Configure your MCP client to connect to
cut-copy-paste-mcp - Configure AI agent instructions (optional but recommended):
- Copy the usage guidelines from
docs/AGENTIC_USAGE.mdinto your agent's instruction files:- Claude Desktop/Code: Add to
CLAUDE.mdin your project root - Cursor IDE: Add to
.cursorrulesorAGENTS.mdin your project - Other agents: Add to your agent's custom rules/instructions file
- Claude Desktop/Code: Add to
- These guidelines help the AI understand when and how to use clipboard operations effectively
- Copy the usage guidelines from
- Start using clipboard operations in your AI coding workflow
Example Workflow
You/AI: "I need to refactor the authentication logic.
Copy lines 45-80 from src/auth/old-auth.ts"
AI: [Uses copy_lines tool]
β Copied 36 lines from src/auth/old-auth.ts:45-80
You/AI: "Now paste this into a new file src/auth/token-handler.ts at line 1"
AI: [Uses paste_lines tool]
β Pasted to src/auth/token-handler.ts:1
You/AI: "Actually, I want to undo that and paste it somewhere else"
AI: [Uses undo_last_paste tool]
β Undone paste operation, restored 1 file(s)
MCP Tools Reference
1. copy_lines
Copy lines from a file to session clipboard without modifying the source.
Parameters:
file_path(string, required): Path to source filestart_line(number, required): Starting line number (1-indexed)end_line(number, required): Ending line number (inclusive)
Example:
{
"tool": "copy_lines",
"arguments": {
"file_path": "src/utils/helpers.ts",
"start_line": 10,
"end_line": 25
}
}
Returns:
{
"success": true,
"content": "...",
"lines": ["..."],
"message": "Copied 16 line(s) from src/utils/helpers.ts:10-25"
}
2. cut_lines
Cut lines from a file (removes from source, saves to clipboard).
Parameters:
file_path(string, required): Path to source filestart_line(number, required): Starting line number (1-indexed)end_line(number, required): Ending line number (inclusive)
Example:
{
"tool": "cut_lines",
"arguments": {
"file_path": "src/legacy/old-module.ts",
"start_line": 50,
"end_line": 75
}
}
Returns:
{
"success": true,
"content": "...",
"lines": ["..."],
"message": "Cut 26 line(s) from src/legacy/old-module.ts:50-75"
}
3. paste_lines
Paste clipboard content to one or more locations.
Parameters:
targets(array, required): Array of paste targetsfile_path(string): Target file pathtarget_line(number): Line number to paste at (1-indexed)
Example (single target):
{
"tool": "paste_lines",
"arguments": {
"targets": [
{
"file_path": "src/components/NewComponent.tsx",
"target_line": 20
}
]
}
}
Example (multiple targets):
{
"tool": "paste_lines",
"arguments": {
"targets": [
{
"file_path": "src/services/auth.ts",
"target_line": 5
},
{
"file_path": "src/services/api.ts",
"target_line": 8
},
{
"file_path": "src/services/storage.ts",
"target_line": 3
}
]
}
}
Returns:
{
"success": true,
"pastedTo": [
{ "file": "src/components/NewComponent.tsx", "line": 20 }
],
"message": "Pasted to 1 location(s)"
}
4. show_clipboard
Display current clipboard contents with metadata.
Parameters: None
Example:
{
"tool": "show_clipboard",
"arguments": {}
}
Returns:
{
"hasContent": true,
"content": "...",
"sourceFile": "src/utils/helpers.ts",
"startLine": 10,
"endLine": 25,
"operationType": "copy",
"copiedAt": 1699564800000
}
5. undo_last_paste
Undo the most recent paste operation. If the paste came from a cut operation, both the paste target(s) AND the cut source are restored to their original state.
Parameters: None
Example:
{
"tool": "undo_last_paste",
"arguments": {}
}
Returns:
{
"success": true,
"restoredFiles": [
{ "file": "src/components/NewComponent.tsx", "line": 20 },
{ "file": "src/legacy/old-module.ts", "line": 0 }
],
"message": "Undone paste operation, restored 2 file(s)"
}
Behavior:
- Copy β Paste β Undo: Restores only the paste target file(s)
- Cut β Paste β Undo: Restores both the paste target(s) AND the cut source file
6. get_operation_history
Retrieve operation history for debugging.
Parameters:
limit(number, optional): Max number of operations to return (default: 10)
Example:
{
"tool": "get_operation_history",
"arguments": {
"limit": 5
}
}
Returns:
{
"operations": [
{
"operationId": 42,
"operationType": "paste",
"timestamp": 1699564800000,
"details": {
"targetFile": "src/components/NewComponent.tsx",
"targetLine": 20
}
}
]
}
Usage Patterns
Pattern 1: Refactoring - Extract Function
1. Identify code to extract β Analyze file and find lines to move
2. Cut the code β Use cut_lines to remove from original location
3. Verify clipboard β Use show_clipboard to confirm content
4. Paste to new location β Use paste_lines to insert at new location
5. Verify result β Check both files for correctness
Pattern 2: Copying Boilerplate
1. Find source code β Identify reusable code pattern
2. Copy the pattern β Use copy_lines to capture boilerplate
3. Identify targets β List all files needing this pattern
4. Multi-paste β Use paste_lines with multiple targets
5. Verify β Spot-check pasted content
Pattern 3: Moving Code Between Files
1. Cut from source β Use cut_lines to remove code
2. Paste to destination β Use paste_lines to insert
3. Verify both files β Check source is cleaned up
4. Update references β Fix imports if needed
Pattern 4: Safe Experimentation
1. Copy code for testing β Use copy_lines to capture current state
2. Paste to test location β Create experimental version
3. Test changes β Make modifications
4. Decide β Use undo_last_paste if unsuccessful
Pattern 5: Undoing Cut Operations
1. Cut code from source β Use cut_lines (removes from source)
2. Paste to destination β Use paste_lines (adds to destination)
3. Realize mistake β Decide to revert the move
4. Undo paste operation β Use undo_last_paste
5. Result β Both source AND destination restored to original state
Note: When you undo a paste from a cut operation, the server automatically restores BOTH files - the paste target(s) are restored, and the cut source is restored with the lines that were removed.
README truncated. View full README on GitHub.
Alternatives
Related Skills
Browse all skillsGenerate HTML meta tags for SEO, Open Graph, Twitter Cards, JSON-LD. Copy-paste ready. Perfect for web developers. Free CLI tool.
Research a topic from the last 30 days on Reddit + X + Web, become an expert, and write copy-paste-ready prompts for the user's target tool.
UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.
Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools
Autonomous agents are AI systems that can independently decompose goals, plan actions, execute tools, and self-correct without constant human guidance. The challenge isn't making them capable - it's making them reliable. Every extra decision multiplies failure probability. This skill covers agent loops (ReAct, Plan-Execute), goal decomposition, reflection patterns, and production reliability. Key insight: compounding error rates kill autonomous agents. A 95% success rate per step drops to 60% b
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".