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

@xstate-devtools/mcp

v0.2.0

Published

Model Context Protocol server for XState: list machines, describe structure, Mermaid diagrams, test paths, validation, find references, setup() coverage, events, and state detail — over any workspace, no VS Code required.

Readme

@xstate-devtools/mcp

A Model Context Protocol server that exposes XState analysis over any workspace — no VS Code required. It statically parses your JS/TS source (XState v4 & v5) and answers structured queries, so an AI agent can reason about your state machines.

It reuses the same analysis engine as the XState Devtools VS Code extension (@xstate-devtools/diagram-core).

Tools

| Tool | Description | | --- | --- | | list_machines | Every machine in the workspace: id, file, line, state count. | | describe_machine | One machine as JSON — states (hierarchy, initial/final/parallel, entry/exit actions, invokes) + transitions. | | machine_diagram | Mermaid stateDiagram-v2 for a machine. | | test_paths | Shortest event sequence to reach each state, unreachable states flagged, plus test skeletons. | | validate | XState diagnostics (invalid properties, unknown transition targets, unreachable states, …). | | find_references | Everywhere a name is used as an action, guard, invoked actor, or event, with machine, state, file and line. | | setup_coverage | Which actions/guards/actors a machine references and which are missing from setup() (and which declared ones are unused). | | list_events | A machine's send() API — every event, the states that handle it, and any guard/target. | | state_detail | One state's entry/exit actions, invokes, and outgoing transitions. |

Usage

The server scans the directory given by XSTATE_MCP_ROOT (defaults to the process working directory).

Claude Code / Desktop (MCP client config)

{
  "mcpServers": {
    "xstate": {
      "command": "npx",
      "args": ["-y", "@xstate-devtools/mcp"],
      "env": { "XSTATE_MCP_ROOT": "/absolute/path/to/your/project" }
    }
  }
}

Or run the built binary directly: XSTATE_MCP_ROOT=/path/to/project node dist/index.js.

Develop

npm run build   # bundle to dist/index.js (vscode aliased to a headless shim)
npm run check   # type-check
npm test        # unit tests