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

@sezzlee/file-core

v0.3.1

Published

Shared machinery for read-only, sandboxed, file-backed MCP servers.

Readme

@sezzlee/file-core

Shared machinery for read-only, sandboxed, file-backed MCP servers. @sezzlee/excel-mcp, @sezzlee/xml-mcp and @sezzlee/pdf-mcp are all built on top of it.

The source-agnostic machinery (guard, the response budget, the error envelope, the cursor codec, the stdio server) moved to @sezzlee/mcp-core; this package consumes it, adds the file-specific layer, and re-exports its full surface except the output-writing tool type (ownOutput, OwnOutputToolDefinition, ToolCatalog, createMcpOutputServer).

This package is not @sezzlee/core and does not depend on it in either direction. @sezzlee/core is the spec's HTTP catalog reference implementation; this package is the machinery behind local file sources.

Usage

A file server names only this package (never @sezzlee/mcp-core directly): it resolves paths through createSandboxRoot/resolveSourcePath, lists sources with listSources, opens and caches documents with createDocumentStore, and wraps its handlers with the guard/toToolError this package re-exports — both already bound to the root redactor, so no file server can emit an error envelope carrying an absolute path. parseServerArgv reads the single positional sandbox root from argv.

API

| Module | Exports | | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | paths | The SandboxedPath brand, SandboxRoot, isContained, createSandboxRoot, resolveSourcePath — an ordered fail-fast chain that never discloses existence | | listing | listSources — glob matching, symlink containment, a scan limit, a count of unreadable entries | | documents | createDocumentStore — open + fstat + size gate + fingerprint + an instance-scoped LRU; parse and variantKey hooks | | cursor | fingerprint — identity from path, mtime and size; content fingerprinting comes from mcp-core | | errors | FileSourceError, CoreErrorCode, redactRoot — widens mcp-core's base with the file error codes | | formats | FormatRegistry — extension-to-format mapping, unsupported_extension | | tools | guard and toToolError wrappers — bind mcp-core's root redactor | | cli | parseServerArgv — pure argv parsing | | vocabulary | Vocabulary<TToolName> — adds rootLabel, readableLabel, tooLargeRecovery to mcp-core's base |

Rules

  • No format-specific vocabulary. A string literal such as "workbook", "sheet", "spreadsheet" or "excel" inside this package is a defect; user-facing names arrive through the injected Vocabulary.
  • Error instances come from the injected ErrorFactory. The package never calls new FileSourceError(...), which keeps a consumer's own error class and instanceof checks intact.
  • zod and @modelcontextprotocol/sdk are peer dependencies. Two resolved copies would break z.infer type identity, and the SDK's schema introspection does an instanceof check.
  • Root redaction is bound by guard, not at call sites. redactRoot plugs into mcp-core's ErrorContext.redact seam here, so no file server can produce an error envelope carrying an absolute path.
  • The SandboxedPath brand is declared only here, and Fingerprint only in mcp-core. A second unique symbol declaration is not the same brand.

What stays here

cli.ts (parseServerArgv) and fingerprint(realPath, mtimeMs, size) stay in this package rather than in mcp-core: the single positional root argument and an identity built from file metadata are file concepts. A database server takes its connection from the environment, because a connection secret must never be in argv. The generic fingerprintFromDigest and contentFingerprint are in mcp-core.

Development

pnpm turbo run build check-types lint --filter=@sezzlee/file-core
pnpm turbo run test --filter=@sezzlee/file-core

Always build through Turbo, never pnpm --filter @sezzlee/file-core run build on its own — downstream consumers such as excel-mcp resolve this package through exports.default → ./dist/index.js, so a bare filter can leave them testing against a stale dist.