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

@astral-mcp/projection

v0.6.0

Published

Turn any MCP server into a code-mode server with human-approved side effects, built on MCP MRTR and XState v5.

Readme

@astral-mcp/projection

Turn any MCP server into a code-mode server with human-approved side effects, built on MCP MRTR (Multi Round-Trip Requests, revision 2026-07-28) and XState v5.

Projection wraps an existing MCP server and exposes exactly two tools:

  • execute_machine — runs an LLM-authored XState v5 state machine in a QuickJS WebAssembly sandbox. Read-only tool calls execute immediately; any write suspends the machine into a sealed, encrypted blob and asks the human to approve that exact call via MRTR elicitation.
  • discover_apis — returns generated TypeScript definitions and the authoring contract for the wrapped server's tools.

All suspension state rides the MRTR requestState payload, so Projection is fully stateless: any server instance can resume any workflow.

Usage

import { createMcpHandler } from '@modelcontextprotocol/server';
import { wrapMcpServer } from '@astral-mcp/projection';

const facade = await wrapMcpServer(myMcpServer, {
  blob: { key: myThirtyTwoByteKey }, // shared across instances
  policy: { query: 'ask' }, // override annotations per tool
  redact: (tool, args) => ({ ...args, token: '[redacted]' }),
});

export default createMcpHandler(facade.serverFactory);

serverFactory carries the negotiated protocol era into each serving unit: modern (2026-07-28) clients get MRTR approval round trips; legacy clients still run read-only machines and get a structured error the moment a machine needs approval. You can also wrap a connected SDK Client to put Projection in front of a server you don't own.

Security model

| Invariant | How it holds | | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | The tools bridge is the only way out of the sandbox | No fetch, no filesystem, no host globals; only xstate and @astral-mcp/tools resolve as imports | | No gated call runs without a matching approval | The approved name and arguments are sealed in the blob and executed from there | | Clients are untrusted couriers | Blobs are AES-256-GCM encrypted under a per-blob HKDF-derived key and authenticated | | A snapshot cannot resume under different code | The blob binds a SHA-256 hash of the original code | | A wrapped server's annotations are hints, not authority | Unannotated tools default to asking; developer overrides always win | | Approval prompts cannot be forged | Prompt text comes from the catalog and redacted arguments, rendered inert |

Documentation

Requires Node ≥ 22. MIT licensed.