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

@belgie/mcp

v0.41.1

Published

TypeScript support for Belgie MCP widgets and generated tool clients.

Readme

@belgie/mcp

@belgie/mcp provides the browser-side pieces of a Belgie MCP App: a connected React widget, typed MCP tool callers, host-context hooks, host actions, and modal support.

For the full guide, see the package documentation. The MCP Apps guide covers Python registration and Belgie project setup. Use @belgie/vite for the belgie() Vite plugin that discovers and builds widgets.

Installation

npm install @belgie/mcp @modelcontextprotocol/ext-apps
npm install --save-dev vite @belgie/vite

The package is ESM-only and requires Node.js 22 or newer for its development and CLI workflows.

Package exports

  • @belgie/mcp exports Widget, mountWidget, tool-result and host-context hooks, host actions, modal helpers, and MCP tool errors.
  • @belgie/mcp/codegen exports generateToolTypes() for programmatic MCP caller generation.
  • @belgie/mcp/internal contains the runtime factories used by generated callers.
  • @belgie/mcp/package.json exposes package metadata.

Build a widget

Widgets are discovered at <srcDir>/<name>/widget.tsx and must have a default export:

import { Widget } from "@belgie/mcp";

export default function Weather() {
  return (
    <Widget metadata={{ name: "Weather", version: "1.0.0" }}>
      <main>Ready</main>
    </Widget>
  );
}

Configure @belgie/vite in a normal Vite configuration:

import { belgie } from "@belgie/vite";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [belgie({ srcDir: "src/widgets" })],
});

Development serves /widgets/<name>/index.html. Inline production builds emit self-contained dist/widgets/<name>/index.html files. See the @belgie/vite docs for shared bundle mode and CLI one-shot builds.

Generate typed tool clients

npx belgie-mcp generate <mcp-url> --output ./src/generated/tools.ts