npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@chinchillaenterprises/mcp-file-splice

v1.0.0

Published

MCP server for efficient file content splicing - cut, copy, and move lines between files without AI reading

Readme

MCP File Splice

An MCP (Model Context Protocol) server for efficient file content splicing - cut, copy, and move lines between files without AI reading or memorizing file contents.

What it does

This MCP server provides tools for manipulating file contents at the line level:

  • Copy lines between files or within the same file
  • Cut (move) lines between files or within the same file
  • Create files automatically if destination doesn't exist
  • Safe operations - copy first, then delete for cut operations
  • Multiple modes - insert, replace, or append content

Key Features

  • Efficient: Direct file manipulation without AI reading large files
  • Safe: Copy-first approach prevents data loss
  • Flexible: Multiple insertion modes and line range support
  • Smart: Handles line number adjustments for same-file operations
  • Robust: Comprehensive error handling and validation

Installation

From NPM (When Published)

# Install with user scope
claude mcp add file-splice -s user -- npx @chinchillaenterprises/mcp-file-splice

# Start Claude to use the tools
claude

For Development

# Clone and build
cd mcp-file-splice
npm install
npm run build

# Add to Claude for testing
claude mcp add file-splice-dev -s user -- node $(pwd)/dist/index.js

Available Tools

📋 file_copy_lines

Copy lines from one file to another.

Parameters:

  • source_file - Path to source file
  • dest_file - Path to destination file (created if doesn't exist)
  • start_line - Starting line number (1-based)
  • end_line - Ending line number (1-based, inclusive)
  • dest_line - Destination line number (1-based, 0 = append)
  • mode - How to insert: "insert", "replace", or "append"

✂️ file_cut_lines

Cut (move) lines from one file to another.

Parameters: Same as file_copy_lines

📋 file_copy_within

Copy lines within the same file to another location.

Parameters:

  • file_path - Path to the file
  • start_line - Starting line number (1-based)
  • end_line - Ending line number (1-based, inclusive)
  • dest_line - Destination line number (1-based)
  • mode - How to insert: "insert", "replace", or "append"

✂️ file_cut_within

Cut (move) lines within the same file to another location.

Parameters: Same as file_copy_within

Usage Examples

Copy lines between files

Copy lines 10-15 from config.txt to backup.txt at the end:
file_copy_lines(source_file="config.txt", dest_file="backup.txt", start_line=10, end_line=15, mode="append")

Cut lines between files

Move lines 5-8 from old.txt to new.txt at line 1:
file_cut_lines(source_file="old.txt", dest_file="new.txt", start_line=5, end_line=8, dest_line=1, mode="insert")

Copy within same file

Duplicate lines 20-25 and place at line 50:
file_copy_within(file_path="document.txt", start_line=20, end_line=25, dest_line=50, mode="insert")

Cut within same file

Move lines 100-110 to the beginning of the file:
file_cut_within(file_path="document.txt", start_line=100, end_line=110, dest_line=1, mode="insert")

Modes Explained

  • insert: Insert lines at destination, shifting existing lines down
  • replace: Overwrite existing lines at destination
  • append: Add lines to the end of file (same as dest_line=0)

Safety Features

  1. Validation: Checks line ranges and file accessibility
  2. Copy-first approach: For cut operations, copies to destination before deleting source
  3. Directory creation: Automatically creates directories for destination files
  4. Error handling: Comprehensive error messages for debugging
  5. Overlap detection: Prevents invalid operations in same-file cuts

Order of Operations

Copy Operations:

  1. Read source lines
  2. Insert at destination
  3. Done ✅

Cut Operations:

  1. Read source lines
  2. Insert at destination
  3. Delete from source (only after successful insertion)
  4. Done ✅

This ensures data is never lost during operations.

Contributing

To add features or fix issues:

  1. Edit src/index.ts
  2. Build with npm run build
  3. Test locally
  4. Submit PR

Publishing

npm run build
npm publish --access public

Part of the Chinchilla Enterprises MCP suite