MCP File Merger logo

MCP File Merger

by exoticknight

Merges multiple local files into one output file through MCP, with directory access controls and merge details.

Install MCP File Merger

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "exoticknight-mcp-file-merger": {
      "command": "npx",
      "args": [
        "-y",
        "@exoticknight/mcp-file-merger"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

npx -y @exoticknight/mcp-file-merger

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 24d ago.

Overview

The exoticknight/mcp-file-merger MCP server combines multiple local files into one output file through an MCP tool. It reads inputs in the order provided, writes their contents sequentially, and reports file sizes and the total merge size. Directory access can be restricted when the server starts, and a second tool shows which directories are available. Reach for it when an agent needs to consolidate files into a single document, such as reducing the number of files sent within chat length limits.

Use cases

  • Combine source files into one context-ready document
  • Concatenate ordered files for an AI chat workflow
  • Check permitted directories before selecting files
  • Report input and total sizes after a merge

Key features

  • Sequentially merges multiple files
  • Writes to a specified output path
  • Restricts access to allowed directories
  • Lists accessible directories
  • Reports per-file and total sizes

Tools2

What MCP File Merger lets your agent do. Expand a tool for its parameters.

Verified live~221 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

17/17 checks healthy over the last 78d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 1d ago via OSV.dev · @exoticknight/mcp-file-merger (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars28Stargazers on the source repository.
npm downloads64Package downloads in the last 30 days.
Last commit2mo agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.
Tools exposed2Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP File Merger works

What exoticknight/mcp-file-merger MCP server does

The exoticknight/mcp-file-merger MCP server provides a small file-combination utility for MCP-compatible clients. It works with files on the local filesystem and produces one output file from a supplied list of input paths. The input order is preserved: content from the first path is written first, followed by the next path, and so on.

This fits the 📂 File Systems category because its primary operation reads and writes local files. A practical use case is preparing several source files as one file before giving them to an AI assistant subject to chat or context-length limits. The server also returns merge information, including individual file sizes and the combined size.

How it works

The main operation accepts an inputPaths string array and an outputPath string. It reads each input file in sequence and writes the contents into the destination. The result includes a success message with details about the completed merge.

Access is bounded by directories supplied when the process starts. The server checks that specified paths are within the allowed locations when directory restrictions are configured. Before attempting a merge, an agent can call list_allowed_directories to discover the directories it may access.

The exoticknight/mcp-file-merger MCP server does not describe file transformation, parsing, filtering, or format conversion. Its documented behavior is sequential concatenation into a single file.

Setup and configuration

  1. Clone the repository.
  2. Change into the project directory.
  3. Run npm install.
  4. Run npm run build.

For Claude Desktop, add an MCP server entry that runs the package with npx -y @exoticknight/mcp-file-merger followed by one or more allowed directory paths. The provided example uses /path/to/allowed/dir; replace it with a directory appropriate for the files the client should access.

The documented configuration uses command-line arguments rather than environment variables. The allowed-directory arguments define the filesystem scope exposed to the server.

Tools and capabilities

The exoticknight/mcp-file-merger MCP server exposes two tools:

  • merge_files: Takes inputPaths and outputPath, combines the inputs in their listed order, writes the result, and reports file and total-size information.
  • list_allowed_directories: Lists the directories available to the server so an agent can select valid paths before merging.

These tools support a straightforward workflow: inspect the permitted directories, choose input files, provide an output location, and review the merge result.

Limitations and notes

The material documents local file access and directory restrictions, but does not specify support for remote storage, file globbing, separators between files, encoding controls, duplicate handling, or overwrite behavior. Applications that require those features should verify the implementation before relying on them.

The repository is licensed under Apache License 2.0. The README specifically documents Claude Desktop configuration; other clients may require their own MCP setup format.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP File Merger

exoticknight/mcp-file-merger is an MCP server that connects an AI client to local files in configured directories. Its main tools are `merge_files`, which combines files into one output in the requested order, and `list_allowed_directories`, which reports accessible directories before a merge.

Install it from source by cloning the repository, running `npm install`, and then running `npm run build`.

Pass allowed directory paths as command-line arguments when starting the server. The Claude Desktop example supplies `/path/to/allowed/dir`; call `list_allowed_directories` afterward to see which directories the running server can access.

It documents Claude Desktop setup and uses a standard command-based MCP launch with `npx`, so Cursor support should be confirmed against that client's MCP configuration requirements.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP File Merger AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/exoticknight-mcp-file-merger?style=directory)](https://allmcps.com/mcp/exoticknight-mcp-file-merger)
HTML Embed
<a href="https://allmcps.com/mcp/exoticknight-mcp-file-merger"><img src="https://allmcps.com/api/badge/exoticknight-mcp-file-merger?style=directory" alt="MCP File Merger on AllMCPs" /></a>