🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@abhishekmcp/files

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abhishekmcp/files

MCP server for the local filesystem — read, search, edit, copy, archive, and safely manage files within sandboxed roots, from any MCP client.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

@abhishekmcp/files

A robust, sandboxed filesystem MCP server. Gives any MCP client (Claude Desktop, Claude Code, Cursor, …) safe, capable access to files within directories you allow — read, search, edit, organize, archive — with a security-first design. Pure JavaScript, no native dependencies, no API keys.

Features

Read & navigate

  • read_file — read text with optional head/tail or a 1-based line window (pagination + truncation flag)
  • read_media — read images/audio/binary as base64 (returned as an image/audio block when possible)
  • read_multiple — batch-read several files
  • stat — metadata (type, size, timestamps, mode); does not follow a final symlink
  • list_dir — directory listing with type + size, sortable, paginated
  • tree — recursive directory tree (depth-capped)
  • changed_since — files modified after a timestamp (poll-based change detection)
  • list_roots — the allowed sandbox roots
  • find_files — glob search (**/*.ts), excludes node_modules/.git by default
  • search_content — content grep (substring or regex) with context lines; skips binaries

Integrity

  • file_hash — sha256/sha1/md5 checksum
  • find_duplicates — duplicate files by size then sha256
  • list_archive — list a .zip's contents without extracting

Edit & write (token-efficient)

  • write_file — create/overwrite (atomic; no-clobber unless overwrite)
  • edit_file — replace a unique oldText with newText (refuses ambiguous matches); dryRun shows a unified diff
  • edit_lines — replace a line range, optionally guarded by a content hash (expectedHash) to reject stale edits

Organize

  • create_dir, move, copy (recursive)
  • deletesoft-delete to trash (recoverable), list_trash, restore, empty_trash
  • zip / unzip — archives (zip-slip protected)

Every destructive tool supports dryRun to preview before committing.

Configuration

VariableRequiredEffect
FS_ROOTSyesAllowed root directories, comma-separated. The server refuses to start without it.
FS_READONLYno1/true registers only read tools (safe sharing).
FS_ALLOW_SECRETSno1/true disables the secret denylist (see below).
FS_AUDIT_LOGnoPath to append a JSON-lines audit record of every mutation.
FS_OP_TIMEOUT_MSnoPer-operation timeout (default 30000).
FS_MAX_CONCURRENCYnoMax concurrent tool executions (default 8).

Secret protection

By default the server blocks reads of, and hides from discovery, files that commonly hold secrets: .env, *.pem, *.key, id_rsa*, .ssh/**, .aws/**, .npmrc, credentials, and more. Add your own patterns in a per-root .mcpignore (gitignore syntax). Set FS_ALLOW_SECRETS=1 to disable.

Production hardening

Every mutation is timestamped to FS_AUDIT_LOG (if set) and stderr. All ops run under a concurrency limit + per-op timeout. Reads stream (head reads and hashing never load whole files), and edits preserve line endings (a CRLF file stays CRLF) and BOMs. The server ships with a committed node:test suite (unit tests for the sandbox + integration/security tests) run in CI.

Security

The whole design is sandbox-first:

  • Every path is confined to FS_ROOTS, checked both lexically and via realpath — a symlink inside a root that points outside is rejected (on reads and writes).
  • Writes/edits/deletes refuse to act through a symlink; writes are atomic (temp + rename).
  • unzip is zip-slip protected (entries can't escape the destination).
  • Size limits on reads, depth/result caps on tree/search/copy, control-char/.. rejection.
  • Deletes are soft (moved to .mcp-trash) and restorable.

Usage

Claude Code — plugin

/plugin marketplace add Abhishekkumar2021/mcp-suite
/plugin install files

Claude Code — manual

claude mcp add files --env FS_ROOTS=$HOME/projects -- npx -y @abhishekmcp/files

Claude Desktop

{
  "mcpServers": {
    "files": {
      "command": "npx",
      "args": ["-y", "@abhishekmcp/files"],
      "env": { "FS_ROOTS": "/absolute/path/to/allow" }
    }
  }
}

License

MIT

Keywords

mcp

FAQs

Package last updated on 28 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts