Large File MCP logo

Large File MCP

by willianpinho

MCP server for efficient large file handling with smart chunking, regex search, navigation, streaming, and caching.

Install Large File MCP

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": {
    "willianpinho-large-file-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@willianpinho/large-file-mcp"
      ]
    }
  }
}

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

Automated check passed— started and listed 6 tools correctly (23d ago).

Overview

This MCP server enables intelligent processing of large files by automatically chunking files optimally based on type, supporting regex search with context, and allowing navigation to specific lines with surrounding context. It streams files efficiently without loading them fully into memory and uses built-in LRU caching for performance. It is suitable for applications needing scalable, memory-efficient access and analysis of large text files.

Use cases

  • Read specific chunks of large log or data files
  • Search large files using regex with context lines
  • Navigate to specific lines in large files with context
  • Analyze file metadata and structure
  • Stream large files efficiently without full memory load

Key features

  • Smart chunking with automatic optimal chunk size detection
  • Regex search with configurable context lines
  • Line navigation with surrounding context
  • File metadata and statistical analysis
  • Memory-efficient streaming of large files
  • Built-in LRU caching for frequently accessed chunks

Tools6

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

Verified live~781 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 1d ago

Recent health check succeeded.

6/7 checks healthy over the last 79d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev · @willianpinho/large-file-mcp (npm)

Adoption & maintenance

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

GitHub stars18Stargazers on the source repository.
npm downloads500Package downloads in the last 30 days.
Last commit7d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed6Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

Large File MCP Server

MCP server for intelligent handling of large files — smart chunking, search, navigation, and streaming.

npm version npm downloads CI codecov License: MIT TypeScript Node.js MCP Documentation GitHub stars GitHub issues

Large File MCP Server

🔗 Live Demo / Landing Page — install with npx @willianpinho/large-file-mcp

📚 Full Documentation | API Reference | Examples

Features

  • Smart Chunking - Automatically determines optimal chunk size based on file type
  • Intelligent Navigation - Jump to specific lines with surrounding context
  • Powerful Search - Regex support with context lines before/after matches
  • File Analysis - Comprehensive metadata and statistical analysis
  • Memory Efficient - Stream files of any size without loading into memory
  • Performance Optimized - Built-in LRU caching for frequently accessed chunks
  • Type Safe - Written in TypeScript with strict typing
  • Cross-Platform - Works on Windows, macOS, and Linux

Installation

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

Or use directly with npx:

Terminal
npx @willianpinho/large-file-mcp

Quick Start

Claude Code CLI

Add the MCP server using the CLI:

bash
# 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

Verify installation:

Terminal
claude mcp list
claude mcp get large-file-mcp

Remove if needed:

bash
# Remove from local scope
claude mcp remove large-file-mcp -s local

# Remove from user scope
claude mcp remove large-file-mcp -s user

MCP Scopes:

  • local - Available only in the current project directory
  • user - Available globally for all projects
  • project - Defined in .mcp.json for team sharing

Claude Desktop

Add to your claude_desktop_config.json:

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

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Restart Claude Desktop after editing.

Other AI Platforms

Gemini:

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

Usage

Once configured, you can use natural language to interact with large files:

text
Read the first chunk of /var/log/system.log
text
Find all ERROR messages in /var/log/app.log
text
Show me line 1234 of /code/app.ts with context
text
Get the structure of /data/sales.csv

Available Tools

read_large_file_chunk

Read a specific chunk of a large file with intelligent chunking.

Parameters:

  • filePath (required): Absolute path to the file
  • chunkIndex (optional): Zero-based chunk index (default: 0)
  • linesPerChunk (optional): Lines per chunk (auto-detected if not provided)
  • includeLineNumbers (optional): Include line numbers (default: false)

Example:

config.json
{
  "filePath": "/var/log/system.log",
  "chunkIndex": 0,
  "includeLineNumbers": true
}

search_in_large_file

Search for patterns in large files with context.

Parameters:

  • filePath (required): Absolute path to the file
  • pattern (required): Search pattern
  • caseSensitive (optional): Case sensitive search (default: false)
  • regex (optional): Use regex pattern (default: false)
  • maxResults (optional): Maximum results (default: 100)
  • contextBefore (optional): Context lines before match (default: 2)
  • contextAfter (optional): Context lines after match (default: 2)

Example:

config.json
{
  "filePath": "/var/log/error.log",
  "pattern": "ERROR.*database",
  "regex": true,
  "maxResults": 50
}

get_file_structure

Analyze file structure and get comprehensive metadata.

Parameters:

  • filePath (required): Absolute path to the file

Returns: File metadata, line statistics, recommended chunk size, and sample lines.

navigate_to_line

Jump to a specific line with surrounding context.

Parameters:

  • filePath (required): Absolute path to the file
  • lineNumber (required): Line number to navigate to (1-indexed)
  • contextLines (optional): Context lines before/after (default: 5)

get_file_summary

Get comprehensive statistical summary of a file.

Parameters:

  • filePath (required): Absolute path to the file

Returns: File metadata, line statistics, character statistics, and word count.

stream_large_file

Stream a file in chunks for processing very large files.

Parameters:

  • filePath (required): Absolute path to the file
  • chunkSize (optional): Chunk size in bytes (default: 64KB)
  • startOffset (optional): Starting byte offset (default: 0)
  • maxChunks (optional): Maximum chunks to return (default: 10)

Supported File Types

The server intelligently detects and optimizes for:

  • Text files (.txt) - 500 lines/chunk
  • Log files (.log) - 500 lines/chunk
  • Code files (.ts, .js, .py, .java, .cpp, .go, .rs, etc.) - 300 lines/chunk
  • CSV files (.csv) - 1000 lines/chunk
  • JSON files (.json) - 100 lines/chunk
  • XML files (.xml) - 200 lines/chunk
  • Markdown files (.md) - 500 lines/chunk
  • Configuration files (.yml, .yaml, .sh, .bash) - 300 lines/chunk

Configuration

Customize behavior using environment variables:

VariableDescriptionDefault
CHUNK_SIZEDefault lines per chunk500
OVERLAP_LINESOverlap between chunks10
MAX_FILE_SIZEMaximum file size in bytes10GB
CACHE_SIZECache size in bytes100MB
CACHE_TTLCache TTL in milliseconds5 minutes
CACHE_ENABLEDEnable/disable cachingtrue

Example with custom settings (Claude Desktop):

config.json
{
  "mcpServers": {
    "large-file": {
      "command": "npx",
      "args": ["-y", "@willianpinho/large-file-mcp"],
      "env": {
        "CHUNK_SIZE": "1000",
        "CACHE_ENABLED": "true"
      }
    }
  }
}

Example with custom settings (Claude Code CLI):

Terminal
claude mcp add --transport stdio --scope user large-file-mcp \
  --env CHUNK_SIZE=1000 \
  --env CACHE_ENABLED=true \
  -- npx -y @willianpinho/large-file-mcp

Examples

Analyzing Log Files

text
Analyze /var/log/nginx/access.log and find all 404 errors

The AI will use the search tool to find patterns and provide context around each match.

Code Navigation

text
Find all function definitions in /project/src/main.py

Uses regex search to locate function definitions with surrounding code context.

CSV Data Exploration

text
Show me the structure of /data/sales.csv

Returns metadata, line count, sample rows, and recommended chunk size.

Large File Processing

text
Stream the first 100MB of /data/huge_dataset.json

Uses streaming mode to handle very large files efficiently.

Performance

Caching

  • LRU Cache with configurable size (default 100MB)
  • TTL-based expiration (default 5 minutes)
  • Speeds up repeated access to the same file chunk or structure lookup

Cache hit-rate depends entirely on your access pattern (how often you re-request the same chunk), so there's no single universal number — run pnpm run benchmark to measure it against a documented, repeatable "hot chunk" workload. On that workload it currently measures 95% (95/100 accesses hit the cache).

Memory Management

  • Streaming architecture - files are read line-by-line, never fully loaded
  • Configurable chunk sizes - adjust based on your use case
  • Smart buffering - minimal memory footprint for search operations

Read Latency (measured)

Uncached readChunk() latency from scripts/benchmark.mjs, generated fixtures, Apple M1 Pro laptop — re-run the script on your own hardware for your own numbers:

Reviews

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

Frequently Asked Questions about Large File MCP

It streams files and processes them in chunks without loading entire files into memory.

Yes, the server supports regex search with configurable context lines before and after matches.

Yes, it uses a built-in LRU cache for frequently accessed file chunks.

It works on Windows, macOS, and Linux.

Install globally via npm or run directly with npx using 'npx -y @willianpinho/large-file-mcp'.

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 PreviewLarge File MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/willianpinho-large-file-mcp?style=directory)](https://allmcps.com/mcp/willianpinho-large-file-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/willianpinho-large-file-mcp"><img src="https://allmcps.com/api/badge/willianpinho-large-file-mcp?style=directory" alt="Large File MCP on AllMCPs" /></a>