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

inspectflow-server

v0.2.0

Published

InspectFlow MCP server — sync Chrome DevTools CSS changes back to React/Next.js source code with AI-assisted, approval-gated edits.

Readme

InspectFlow MCP Server

Local server that captures CSS changes made in Chrome DevTools and (in later phases) translates them into approval-gated edits to your React/Next.js source.

It exposes two interfaces over one HTTP port:

  • A JSON API for the Chrome extension (/health, /style-change).
  • An MCP endpoint (/mcp) implementing the Model Context Protocol over a stateless StreamableHTTP transport, so MCP clients (e.g. Claude) can drive the analyze → preview → apply workflow.

Requirements

  • Node.js >= 20

Setup

cd server
npm install
cp .env.example .env   # then edit .env (set GEMINI_API_KEY for analysis features)

Scripts

| Command | Description | | ------------------ | -------------------------------------------- | | npm run dev | Run with hot reload (tsx watch). | | npm run build | Type-check and compile to dist/. | | npm start | Run the compiled server from dist/. | | npm run typecheck| Type-check only, no emit. |

Configuration

All configuration is via environment variables (see .env.example):

| Variable | Default | Purpose | | ---------------- | ------------------ | -------------------------------------------------- | | GEMINI_API_KEY | (unset) | Enables AI analysis. Server boots without it. | | GEMINI_MODEL | gemini-2.5-flash | Model used for analysis. | | PORT | 4399 | HTTP port. | | HOST | 127.0.0.1 | Bind address (local-only by default). | | PROJECT_ROOT | cwd | Sandbox root — all file writes are confined here. | | LOG_LEVEL | info | Pino log level. | | LOG_PRETTY | true | Pretty logs (dev) vs JSON (prod). | | CORS_ORIGINS | * | Allowed CORS origins (comma-separated, or *). |

Invalid configuration fails fast at startup with a descriptive message.

HTTP API

GET /health

Liveness probe + configuration summary.

POST /style-change

Records a CSS change captured by the extension.

// Request
{ "file": "src/components/Card.tsx", "selector": ".card", "property": "padding", "value": "32px" }
// 201 Response
{ "success": true, "change": { "id": "…", "receivedAt": "…", ... } }

Paths are validated: absolute paths, .. segments, and null bytes are rejected.

GET /style-change?limit=50

Lists recently captured changes (newest first).

MCP endpoint — POST /mcp

Speaks JSON-RPC 2.0 over StreamableHTTP. Quick manual check:

curl -s -X POST http://127.0.0.1:4399/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

Tools

| Tool | Phase | Description | | --------------------- | ----- | -------------------------------------------- | | list_recent_changes | 1 | Read-only view of captured DevTools changes. | | analyze_style_change| 5 | Ask Gemini how source should change. | | preview_change | 6 | Produce a unified diff for a proposed edit. | | apply_change | 7 | Apply an approved edit via Babel AST. |

Project structure

server/src/
├── index.ts            # Entry point: startup, graceful shutdown
├── config/env.ts       # Env loading + validation (zod)
├── logger/index.ts     # Pino logger
├── validation/         # Shared zod schemas + safe validation helper
├── store/              # In-memory captured-change store
├── routes/             # HTTP API (health, style-change)
├── server/             # Express app factory + MCP server factory
├── services/           # Gemini client (Phase 5)
├── analyzers/          # Diff generation (Phase 6)
├── writers/            # Babel AST file writer (Phase 7)
└── tools/              # MCP tool registrations (Phase 5+)