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

contextsliver

v0.1.5

Published

Universal context-management MCP server for AI coding agents. On-demand dependency-graph pruning with session awareness.

Readme

ContextSliver

On-demand context management for AI coding agents. Stop reading whole files — ask for the connected subgraph instead.

CI License: MIT npm version

The problem

When you ask an AI coding agent (Claude Code, Cursor, Cline) to "fix the bug in AuthService," it repeatedly reads entire files to find the 5% that's relevant — burning 40,000–80,000 tokens on a question that needed ~3,000.

find . -name "*.ts"   → 2,000 tokens (a file listing)
cat AuthService.ts    → 3,000 tokens (whole file)
grep -r "AuthService" → 5,000 tokens (40 matches)
cat AuthMiddleware.ts → 2,500 tokens (whole file, again)
... × 10 more ...

Existing tools don't fully fix it: Graphify dumps one enormous whole-repo map into context up front; Repomix packs the entire repo into one file; Aider's repo-map sends a whole-repo summary with every message. None of them track what the agent has already seen this session.

What ContextSliver does

ContextSliver runs as a background MCP server on your machine. It indexes your codebase into a local SQLite graph of every function, class, and import. When the agent needs context, it calls an MCP tool instead of reading files:

Agent:   "What connects to AuthService? Budget: 2,000 tokens."

ContextSliver:
  symbol:        AuthService  (src/auth/AuthService.ts)
  callers:       [AuthMiddleware, LoginController]      ← who uses it
  dependencies:  [UserRepository, TokenService]         ← what it uses
  already_in_context: [UserRepository]                  ← skipped, agent already has it
  // ~380 tokens

Three things make it different:

  1. On-demand pruning — never sends the whole graph, only the connected subgraph for the task.
  2. Session ledger — tracks what the agent has already seen and skips re-sending it.
  3. One-command setupnpx contextsliver init. No database server, no API key.

Quickstart

# In your project root:
npx contextsliver init      # creates .sliver/, .mcp.json, CLAUDE.md, indexes the repo
npx contextsliver start     # runs the MCP server + file watcher (stdio)

Then restart Claude Code / Cursor / Cline — they'll pick up the five tools automatically. See the templates for client-specific config.

The five MCP tools

| Tool | What it does | Typical tokens | |------|-------------|---------------| | cs_index_repo | Trigger a full re-index | ~50 | | cs_get_context | Symbol definition + immediate connections | ~300–800 | | cs_blast_radius | All callers + dependents up to N hops | ~500–2,000 | | cs_search_symbols | Full-text search across indexed symbols | ~200–600 | | cs_index_status | Index health, file count, last-updated | ~100 |

Pass the session_id from your first cs_get_context call to every subsequent call to enable deduplication.

Supported languages

  • TypeScript / JavaScript / TSX (v0.1)
  • Python (v0.1)
  • Go, Rust, Java — planned (see roadmap)

Adding a language = add a grammar package + a grammars/<lang>/tags.scm query + a fixture. See CONTRIBUTING.md.

How it works

Your codebase  ──chokidar──▶  Parser (Tree-sitter)  ──▶  SQLite graph (.sliver/index.db)
                                                                    │
                              MCP server (stdio) ◀──────────────────┘
                                    │   session ledger (.sliver/sessions.db)
                                    ▼
                          Claude Code / Cursor / Cline
  • Parser: Tree-sitter extracts symbols + imports per file.
  • Graph engine: stores symbol→symbol edges; bidirectional BFS (blastRadius) for blast radius with cycle detection.
  • Session manager: per-session ledger computes deltas so already-sent context is skipped.
  • MCP server: exposes the five tools over stdio.

Token counting

Counts use gpt-tokenizer (cl100k_base) and are labeled ~approximate — close enough for budget guidance, not billing.

Development

npm install
npm test            # unit + integration tests
npm run test:bench  # indexing benchmarks
npm run build       # tsc → dist/
npm run lint        # eslint

Requires Node ≥ 20.

Roadmap

  • v0.1 ✅ TS/JS + Python, SQLite graph, session ledger, 5 tools, CLI, watcher
  • v0.2 — incremental indexing polish, Cursor integration, CI benchmarks
  • v0.3 — Go + Rust, monorepo workspace resolution, language-plugin docs
  • v0.4 — PreToolUse hook, Java, published token-reduction benchmarks
  • v0.5 — Streamable HTTP transport, DuckDB backend for 50k-file repos, PageRank ranking
  • v1.0 — frozen API, optional native (napi-rs) engine, SCIP/LSP precision backend

See contextsliver-spec.md for the full specification.

License

MIT © Muneeb Ur Rehman