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

mcp-stateless-migrator

v0.1.2

Published

CLI tool that scans MCP-server codebases for incompatibilities with MCP-Spec 2026-07-28 RC (Stateless Core, mandatory headers, deprecations, error-code shift, OAuth hardening) and applies safe AST-rewrites where mechanically possible.

Downloads

211

Readme

Part of the StudioMeyer MCP Stack — Built in Mallorca 🌴 · ⭐ if you use it

mcp-stateless-migrator

npm version CI OpenSSF Scorecard License: MIT

CLI tool that scans MCP-server codebases for incompatibilities with MCP-Spec 2026-07-28 RC (Stateless Core, mandatory headers, deprecated features, error-code shift, OAuth hardening, endpoint-shape changes) and applies safe AST-rewrites where mechanically possible.

Target users: maintainers of TypeScript/JavaScript MCP servers (the largest SDK userbase, @modelcontextprotocol/sdk).

Status: v0.1.2 — pre-final-RC. Detection rules are tagged with specRevision: 2026-07-28-rc-2026-05-21 and cite the canonical SEP files. v0.2.0 will re-validate against the Tier-1 SDK final release.

Install

npm install -g mcp-stateless-migrator
# or one-shot:
npx mcp-stateless-migrator scan ./src

Requires Node >= 20.

CLI

| # | Command | Args | Output | Read-only | Destructive | |---|---------|------|--------|-----------|-------------| | 1 | scan | <path> [--format json\|text\|md\|html] | violations + severity | yes | no | | 2 | diff | <path> [--output <file>] | unified diff of planned patches | yes | no | | 3 | patch | <path> [--dry-run] [--no-backup] [--only <id...>] | rewrites files + writes backup folder | no | yes | | 4 | verify | <path> [--spec <rev>] | exit 0 = clean | yes | no | | 5 | report | <path> [--format json\|md\|html] | coverage report | yes | no | | 6 | rules | [--verbose] | list all detection rules | yes | no |

Detection rules

| Rule | Severity | Auto-patch | Source | |------|----------|------------|--------| | r01-stateless-core | warn | no | SEP-2567 | | r02-mandatory-headers | info | no | SEP-2243 | | r03-tasks-extension | warn | no | SEP-2663 | | r04-apps-extension | info | no | SEP-1865 | | r05-deprecations | warn | no | SEP-2577 | | r06-error-code-shift | error | yes | SEP-2164 | | r07-oauth-hardening | warn | no | SEP-2468 | | r08-endpoint-shape | warn | no | SEP-2596 |

Only r06 rewrites code automatically — it swaps -32002 -> -32602 inside any property named code (identifier key, "code"/'code' string key, or class field), and leaves computed keys and same-value-but-different-name properties untouched. SEP-2164 is Draft status as of the RC, so re-validate before the final spec; every patch is backed up by default. Every other rule requires a human reviewing the planned change — server architecture varies too much for blind auto-patching.

Usage

# 1. See what the migrator finds
mcp-stateless-migrator scan ./src --format text

# 2. Preview the auto-patch as a unified diff
mcp-stateless-migrator diff ./src

# 3. Apply only the safe error-code shift, with backup
mcp-stateless-migrator patch ./src --only r06-error-code-shift

# 4. Confirm the codebase is clean
mcp-stateless-migrator verify ./src

# 5. Generate a Markdown report for the team
mcp-stateless-migrator report ./src --format md > migration-report.md

Exit codes:

  • 0 — clean (no violations OR patch applied successfully)
  • 1 — violations remaining / diff non-empty
  • 2 — invalid CLI arguments

Backup folder

patch creates <path>/.bak.<ISO-timestamp>/ containing the original file tree for every file it touched. Pass --no-backup to disable (not recommended). Restore via cp -r .bak.<timestamp>/. ..

Programmatic API

import { scanPath, patchPath, formatScan } from "mcp-stateless-migrator";

const report = await scanPath("./src");
console.log(formatScan(report, "json"));

await patchPath("./src", { dryRun: false, backup: true, only: ["r06-error-code-shift"] });

Ecosystem

This tool complements:

See ECOSYSTEM.md for the full positioning matrix.

License

MIT — Copyright © 2026 Matthias Meyer (StudioMeyer).