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

gguf-mcp

v0.1.1

Published

MCP server that inspects local GGUF and safetensors model files — architecture, quantization, parameters, tensors, and VRAM-fit estimates from headers only, without loading the model

Readme

gguf-mcp

An MCP server that inspects local model files — GGUF and safetensors — so Claude and other LLMs can answer questions about the models on your disk:

  • "What is this .gguf? Architecture, quantization, parameter count?"
  • "Will this model fit in my 12 GB GPU at 8k context?"
  • "What tensors are inside, with what shapes?"
  • "Show me its chat template / RoPE settings / tokenizer config."

Headers only. The parser never touches tensor data, so inspecting a 70 GB model takes milliseconds and a few MiB of I/O. No network, no API keys, no telemetry — your files never leave your machine.

Quick start

Claude Code

claude mcp add gguf -- npx -y gguf-mcp

Claude Desktop — add to claude_desktop_config.json:

{
  "mcpServers": {
    "gguf": {
      "command": "npx",
      "args": ["-y", "gguf-mcp"]
    }
  }
}

The same npx invocation works in Cursor, Windsurf, and any other MCP client.

Tools

| Tool | What it does | |------|--------------| | inspect_model | One-call summary: format, architecture, parameters, quantization, context length, file size, tensor count | | list_tensors | Tensor names, shapes, and storage types — filterable (attn, blk.0, ...) | | estimate_vram | Fit check: exact weights size + modeled fp16 KV cache for your chosen context length | | get_metadata | The GGUF key-value store (or safetensors __metadata__), filterable by key |

Paths can be a .gguf file, a .safetensors file, a *.safetensors.index.json, or a model directory (sharded HuggingFace layouts are aggregated across shards). Extension-less GGUF blobs — like the ones in Ollama's ~/.ollama/models/blobs — are detected by magic bytes.

Design notes

  • Context-friendly by construction. A tokenizer vocabulary is 100k+ strings; metadata arrays are returned as {count, sample} summaries and long strings (chat templates) are truncated with a marker. The full data stays on disk where it belongs.
  • Honest estimates. estimate_vram reports exact on-disk weight bytes plus the standard KV-cache formula (2 × layers × context × KV heads × head dim × 2 bytes), and says what it excludes rather than faking precision.
  • Defensive parsing. Magic checks, version checks (incl. big-endian detection), truncation detection, and sanity caps on header sizes — malformed files produce specific, actionable errors.
  • Zero runtime dependencies beyond the MCP SDK and zod. The GGUF binary reader and safetensors parser are hand-rolled and unit-tested against synthetic files built in the test suite — no fixtures, no downloads.

Development

npm install
npm test                 # offline unit tests (vitest) — synthetic model files
npm run build            # tsc → dist/
node scripts/smoke.mjs   # end-to-end: generates models, drives the server over stdio

Architecture: src/gguf.ts (binary header parser + VRAM math) and src/safetensors.ts (JSON header + shard index) are pure logic with no MCP imports; src/index.ts is the MCP wiring and path/format detection.

Out of scope

Tensor statistics (would require reading data), PyTorch .bin (pickle — unsafe by design), ONNX, and remote HuggingFace queries (HuggingFace has an official MCP server for that).

License

MIT