Large File

MCP Server for efficient large file operations
  • typescript

8

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": {
    "willianpinho-large-file-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@willianpinho/large-file-mcp"
      ],
      "env": {
        "CACHE_TTL": "300000",
        "CACHE_SIZE": "104857600",
        "CHUNK_SIZE": "1000",
        "CACHE_ENABLED": "true",
        "MAX_FILE_SIZE": "10737418240",
        "OVERLAP_LINES": "10"
      }
    }
  }
}

A Large File MCP Server provides intelligent handling of large text files through smart chunking, context-aware navigation, and powerful search. It streams data efficiently, minimizes memory usage, and exposes a set of tools to read, analyze, and navigate very large files from any MCP-compatible client.

How to use

You interact with the Large File MCP Server through an MCP client. Start by adding the server to your preferred client or automation workflow, then call its available tools to read, search, or analyze large files. You can read specific chunks, search with patterns (including regex), navigate to a given line with surrounding context, and stream data for processing without loading entire files into memory.

You can combine multiple tools to build workflows such as: reading a chunk for quick inspection, performing a regex search across logs, and then streaming a portion of a very large dataset for downstream processing.

How to install

Prerequisites you need before installing: Node.js and npm. Ensure you have access to the command line or terminal.

npm install -g @willianpinho/large-file-mcp

Alternatively you can run the server directly with npx without a global install.

npx @willianpinho/large-file-mcp

Add the MCP server to Claude Code CLI for local project scope or user scope. The CLI uses a stdio transport and runs the MCP via npx.

# Add for current project only (local scope)
claude mcp add --transport stdio --scope local large-file-mcp -- npx -y @willianpinho/large-file-mcp

# Add globally for all projects (user scope)
claude mcp add --transport stdio --scope user large-file-mcp -- npx -y @willianpinho/large-file-mcp

Additional setup via Claude Desktop

If you use Claude Desktop, include the MCP server configuration in your claude_desktop_config.json so the client can launch the server automatically.

{
  "mcpServers": {
    "large-file": {
      "command": "npx",
      "args": ["-y", "@willianpinho/large-file-mcp"]
    }
  }
}

Other platforms

If you integrate with other AI platforms, you can declare the MCP server as a tool. Use the same npx command so the platform can start the MCP server when needed.

{
  "tools": [
    {
      "name": "large-file-mcp",
      "command": "npx @willianpinho/large-file-mcp",
      "protocol": "mcp"
    }
  ]
}

Usage patterns to try

Once configured, you can issue natural language requests to operate on large files. For example, ask to read the first chunk of a file, search for a pattern across logs, or show the structure of a large CSV.

Performance and scale notes

The server uses streaming to handle large files without loading them into memory and applies a configurable chunking strategy to optimize navigation and search. A lightweight cache accelerates repeated access to frequently read chunks.

Troubleshooting

If you encounter issues, ensure the file path is accessible and readable. If memory usage is high, reduce the chunk size or disable caching to free memory.

# Example: reduce chunk size via environment variable
export CHUNK_SIZE=1000
export CACHE_ENABLED=true

Notes on usage with Claude Code CLI and Claude Desktop

Use the exact commands shown above to add and configure the MCP server in Claude Code CLI or Claude Desktop. Restart Claude after editing the configuration to apply changes.

Available tools

read_large_file_chunk

Read a specific chunk of a large file with intelligent chunking. Parameters include filePath, chunkIndex, linesPerChunk, and includeLineNumbers.

search_in_large_file

Search for patterns in large files with context, supporting case sensitivity, regex mode, max results, and surrounding context lines.

get_file_structure

Analyze file structure and return metadata, line statistics, recommended chunk size, and sample lines.

navigate_to_line

Jump to a specific line with surrounding context for quick code or text navigation.

get_file_summary

Provide a comprehensive statistical summary of a file, including metadata, line statistics, character statistics, and word count.

stream_large_file

Stream a file in chunks for processing very large files without loading them entirely into memory.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational