- Home
- MCP servers
- MCP Cut Copy Paste
MCP Cut Copy Paste
- typescript
2
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"pr0j3c7t0dd-ltd-cut-copy-paste-mcp": {
"command": "npx",
"args": [
"cut-copy-paste-mcp"
]
}
}
}You use this MCP server to perform clipboard-like operations on code blocks across files. It lets you copy, cut, paste, undo, and audit those actions in a session-scoped clipboard, enabling safer AI-assisted coding workflows with a reliable undo path and per-session isolation.
How to use
You connect an MCP client to the clipboard server and start performing operations across files. Use the available tools to copy or cut specific line ranges from a source file, paste that content into one or more destinations, and undo pastes when needed. Every session maintains its own clipboard, and you can review the operation history for debugging.
Practical workflow patterns include extracting a function or boilerplate with cut_lines or copy_lines, then pasting into a new module or multiple targets with paste_lines. If a paste was a mistake, you can undo it; if you cut code first, undo will restore both the target and the original source where the lines came from.
Before pasting, verify clipboard contents with show_clipboard to ensure you are pasting the intended lines. When you need to revert changes, use undo_last_paste to restore previous file states and, if applicable, the original cut source.
How to install
Prerequisites: you need Node.js installed on your system and access to the command line.
Option 1: Run via NPX (recommended) to start the MCP server on demand.
npx cut-copy-paste-mcp
Option 2: Install globally with NPM, then run the CLI.
npm install -g cut-copy-paste-mcp
cut-copy-paste-mcp
Option 3: Local development setup. Clone the project, install dependencies, build, then run the CLI from the built distribution.
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
Configuration and runtime notes
The server stores its data locally in a cross-session database and maintains an audit trail of operations. Run from a directory where you have write access, and ensure you have permissions to create and modify the clipboard database and any necessary files.
Security and reliability notes
Clipboard entries are scoped to sessions, and the server tracks operation history to assist debugging. Binary files are automatically rejected to prevent accidental binary data handling. You can enable path access restrictions to limit filesystem operations if desired.
Troubleshooting tips
If a paste fails, check that the clipboard contains text data suitable for insertion and that target files exist. Use show_clipboard to inspect the current clipboard, and get_operation_history to review recent actions. If undo is not available for a given paste, verify you are undoing the most recent paste and that the operation originated from a compatible copy or cut.
Example workflow
You identify a block to extract from a source file, then cut it from its original location, and paste it into a new destination. If you decide to revert, undo the paste to restore both the destination and the original source.
Notes on usage patterns
- Use multi-paste to distribute boilerplate across several files. - Always verify clipboard contents before pasting. - Rely on undo to back out changes safely. - Review operation history when debugging complex sequences.
Available tools
copy_lines
Copy lines from a file to the session clipboard without modifying the source, specifying file_path, start_line, and end_line.
cut_lines
Cut lines from a file to the session clipboard, removing them from the source and saving to clipboard, with file_path and line range inputs.
paste_lines
Paste clipboard content to one or more targets, specifying a list of destinations with file_path and target_line.
show_clipboard
Display current clipboard contents along with metadata such as source file, line range, operation type, and timestamp.
undo_last_paste
Undo the most recent paste operation, restoring destination files and, if applicable, the original cut source.
get_operation_history
Retrieve the history of operations for debugging, with an optional limit on the number of results.