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

moonpeak

v0.1.0

Published

Server-agnostic MCP testing framework and full-stack MCP App framework for ChatGPT Apps, Claude connectors and every MCP Apps host.

Readme

moonpeak

MCP App framework. MCP testing framework. A local inspector with ChatGPT and Claude style hosts.

Build interactive apps that render inside ChatGPT, Claude and every other MCP Apps host, then test them in CI without host accounts, tunnels or AI credits.

npx moonpeak new my-app       # asks which resources to include and whether to install
cd my-app
npm run dev            # inspector at http://localhost:3000, MCP server at /mcp

Open source, MIT licensed. Built on the official MCP Apps SDK and the MCP TypeScript SDK v2, so what works in the inspector works in real hosts.


What you get

| | | |---|---| | App framework | One file per tool, one folder per View. React hooks for tool data, theme, display mode, state, calling tools and posting messages. | | Inspector | ChatGPT-style and Claude-style hosts on localhost. Switch host, theme, device width and display mode (inline, PiP, fullscreen). Edit tool input and output live. Every setting lives in the URL. | | Testing | moonpeak test checks schemas, Views and simulations in-process. --e2e runs Playwright against the inspector. --eval checks real models pick the right tool. --server tests any MCP server in any language. | | Production | moonpeak build inlines each View into one HTML file and bundles your tools. Serve with moonpeak start, or mount createHandler on Workers, Hono, Express, Deno or Bun. |

Starter resources

npx moonpeak new asks which of these to include. Pass them directly with npx moonpeak new my-app calendar,review.

| Resource | Pattern | What it shows | |---|---|---| | moon | detail card | moon phase for a date, a 7-day strip, calling tools from the View | | calendar | carousel | swipeable cards of the upcoming phases, loading more through the host | | review | review / confirm | the model proposes a plan, the user confirms in the UI through an app-only tool |

Flags: --install / --no-install skip the install question, -y accepts every default.

Project layout

Everything is discovered from the folders. No config file needed.

src/
  tools/show-moon.ts            one MCP tool per file
  resources/moon/moon.tsx       one View per folder (+ optional moon.css)
tests/
  simulations/show-moon.json    fixtures for the inspector and `moonpeak test`
  e2e/moon.spec.ts              Playwright tests (optional)
  evals/moon.eval.json          model evals (optional)

A tool

// src/tools/show-moon.ts
import { z } from "zod";

export const tool = {
  title: "Show moon phase",
  description: "Show the moon phase for a date.",
  resource: "moon",              // render src/resources/moon as the UI
};

export const schema = { date: z.string().optional() };

export default async function ({ date }: { date?: string }) {
  return { date, phase: "Full Moon", illumination: 1 };   // becomes structuredContent
}

Return a plain object (structured content), a string (text), or a full CallToolResult. Throwing returns isError: true with your message. Leave out resource for a plain text tool.

A View

// src/resources/moon/moon.tsx
import { useToolData, useTheme, useCallTool, useRequestDisplayMode } from "moonpeak";

export const resource = { title: "Moon phase", prefersBorder: true };

export default function Moon() {
  const { output, isPending } = useToolData<{ date?: string }, { phase: string }>();
  const theme = useTheme();
  if (isPending) return <p>Loading…</p>;
  return <h1 className={theme}>{output?.phase}</h1>;
}

Hooks

Portable, from moonpeak (work in every host):

| Hook | Returns | |---|---| | useToolData() | { input, output, content, isPending, isError, isStreaming, isCancelled, tool, result } | | useToolInput() · useToolOutput() · useToolResult() | the parts on their own | | useTheme() | "light" \| "dark" | | useDisplayMode() · useRequestDisplayMode() | current mode, and a function to ask for inline, pip or fullscreen | | useAppState(initial, { share }) | one state object per View, persisted in ChatGPT, optionally shared with the model | | useResultState(initial) | local state that resets on every new tool result | | useCallTool() | call another tool on your server through the host | | useSendMessage() | post a message into the chat as the user | | useUpdateModelContext() | tell the model what happened without posting | | useOpenLink() · useDownloadFile() · useLog() | host actions | | useHost() · useHostContext() · useHostCapabilities() · useConnection() · useApp() | host info and the raw App | | useLocale() · useTimeZone() · usePlatform() · useDeviceCapabilities() · useSafeArea() · useContainerSize() · useMaxHeight() | environment |

Host extras, safe to call anywhere: moonpeak/chatgpt (useWidgetState, useUploadFile, useRequestModal, useOpenAiGlobal, useIsChatGPT) and moonpeak/claude (useIsClaude, useClaudeStyles).

Simulations

[
  { "name": "full moon", "prompt": "Moon on Nov 24?", "input": { "date": "2026-11-24" },
    "expect": { "output": { "phase": "Full Moon", "week": { "$length": 7 } } } },
  { "name": "mocked", "input": {}, "output": { "phase": "Waxing Crescent" }, "host": { "theme": "dark" } },
  { "name": "bad date", "input": { "date": "soon" }, "expect": { "isError": true, "text": "not a date" } }
]
  • output / result mock the tool result in the inspector, so you can design a View without a backend.
  • expect is checked by moonpeak test: partial match on output, "re:..." for regexes, "*" for "any value", $length / $minLength for arrays.
  • host sets inspector settings for that scenario: name (chatgpt or claude), theme, displayMode, device, locale.

Testing

moonpeak test                     # schema + View + simulation checks, in-process, ~1s
moonpeak test --e2e               # Playwright against the inspector (starts it for you)
moonpeak test --visual            # screenshot tests tagged @visual (first run records baselines)
moonpeak test --visual --update   # re-record baselines after an intended change
moonpeak test --eval              # model evals, needs ANTHROPIC_API_KEY / OPENAI_API_KEY
moonpeak test init --server URL   # write simulations for an existing server
moonpeak test --server URL        # test any MCP server, any language

Run npx playwright install chromium once before the first e2e run. E2E tests get two fixtures:

import { test, expect } from "moonpeak/test";

test("renders in Claude dark mode", async ({ inspector }) => {
  const view = await inspector.open({ tool: "show-moon", sim: "show-moon#full-moon", host: "claude", theme: "dark" });
  await expect(view.getByRole("heading", { name: "Full Moon" })).toBeVisible();
});

test("tool output", async ({ mcp }) => {
  expect(await mcp.call("show-moon", { date: "2026-11-24" })).toHaveStructuredContent({ phase: "Full Moon" });
});

Inspect any server

moonpeak inspect --server http://localhost:8000/mcp
moonpeak inspect --server https://api.example.com/mcp --header "authorization:Bearer $TOKEN"

Works with MCP servers written in Python, Go, Rust, Java or TypeScript. Views are loaded with resources/read and rendered in a sandboxed frame, the same way real hosts do it.

Deploy

moonpeak build && moonpeak start     # http://localhost:8000/mcp

Or mount it yourself:

// Cloudflare Workers, Hono, Deno, Bun, Next.js route handlers
import { createHandler } from "moonpeak/server";
import * as built from "./dist/server.mjs";
// Express / node:http
import { createNodeHandler } from "moonpeak/server";
app.all("/mcp", await createNodeHandler(opts));

Then add the URL as a connector in Claude, or as an app in ChatGPT developer mode.

CLI

| Command | | |---|---| | moonpeak new [name] [resources] | scaffold a project; resources: moon, calendar, review (default: ask, or all) | | moonpeak dev | MCP server + inspector with hot reload | | moonpeak build | dist/resources/*.html + dist/server.mjs | | moonpeak start | serve the build at /mcp | | moonpeak inspect --server <url> | inspector for any MCP server | | moonpeak test [init] [--e2e] [--visual] [--eval] [--server <url>] | tests | | moonpeak upgrade | update moonpeak |

License

MIT