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

@mukundakatta/embspec-mcp

v0.1.0

Published

MCP server: embedding pipeline ops + drift detection for production RAG. Assert query encoder matches index manifest; compute retriever stability between two index versions on a frozen probe set.

Readme

embspec-mcp

npm mcp

MCP server: embedding pipeline ops + drift detection for production RAG. Wraps the Python library embspec by re-implementing its query-shaped surface natively in TypeScript so the MCP server has zero runtime deps beyond the MCP SDK.

npm install -g @mukundakatta/embspec-mcp

Or run via npx without installing:

npx -y @mukundakatta/embspec-mcp

Tools

assert_compatible

Fail-fast check that a query encoder matches an index manifest's recorded embedding model + version. Same primitive as Python embspec's assert_compatible() / @embed_assert decorator.

Why: prevents the silent-accuracy-collapse failure described in the decompressed.io RAG observability post-mortem (2026-03-09) — query encoder ships before the index is re-encoded; every health check stays green while retrieval accuracy tanks.

// input
{
  "manifest": {
    "embspec_format_version": 1,
    "index_name": "prod-v3",
    "embedding": {
      "model_id": "amazon.titan-embed-text-v2:0",
      "dimension": 1024,
      "model_version": null,
      "normalization": "l2"
    }
  },
  "query_spec": {
    "model_id": "amazon.titan-embed-text-v2:0",
    "dimension": 1024
  }
}

// returns
{ "ok": true, "index_name": "prod-v3" }

On mismatch, returns the offending field and both values along with a human-readable error message ready to surface to the user.

neighbor_stability

Compare two retrievers on a frozen probe set; returns mean overlap@k, mean Jaccard@k, list of regressed probes, and a deploy-safety verdict. Same metric Python embspec produces in neighbor_stability().

Why: gates embedding-model upgrades, chunker swaps, or rerank changes before deploy. Computed entirely from caller-supplied retrieval results — the MCP server has no knowledge of your vector DB.

// input
{
  "old_results": {
    "q1": ["doc-a", "doc-b", "doc-c", "doc-d", "doc-e"],
    "q2": ["doc-x", "doc-y", "doc-z"]
  },
  "new_results": {
    "q1": ["doc-a", "doc-b", "doc-z", "doc-y", "doc-x"],
    "q2": ["doc-x", "doc-y", "doc-z"]
  },
  "k": 5,
  "regression_threshold": 0.5
}

// returns
{
  "n_probes": 2,
  "k": 5,
  "mean_overlap_at_k": 0.7,
  "mean_jaccard_at_k": 0.65,
  "regression_probe_ids": [],
  "regression_count": 0,
  "is_safe_to_deploy": false
}

The is_safe_to_deploy heuristic requires mean_overlap >= 0.85 AND regression fraction <= 0.05 (matching Python embspec's defaults).

Configure your MCP client

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "embspec": {
      "command": "npx",
      "args": ["-y", "@mukundakatta/embspec-mcp"]
    }
  }
}

Cursor / Cline / Windsurf / Zed

Same shape — drop the embspec entry into the corresponding MCP server section.

Why use this from an MCP client

A practitioner debugging RAG quality regressions naturally lives in their assistant. Running stability checks against retrieval-result dumps without leaving the conversation is the right ergonomic. Sample workflows:

"I ran the same 50 probe queries against our v3 and v4 indexes — here are the top-5 results from each. Is it safe to deploy v4?" (assistant calls neighbor_stability, returns the report and the offending probe ids)

"Here's the manifest from our prod index and the embedding spec our planner is about to use. Compatible?" (assistant calls assert_compatible, fails fast with the field that drifted)

Sibling

The Python source lives at github.com/MukundaKatta/embspec. It also ships DriftAdapter (linear least-squares migration helper that recovers 95-99% retrieval after embedding-model swap without re-encoding the corpus), which is too math-heavy to surface as an MCP tool and stays Python-only.

Source

github.com/MukundaKatta/embspec-mcp

License

MIT.