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

@archon-research/webmcp

v0.7.0

Published

A stable React wrapper over [WebMCP](https://github.com/webmcp-org) (`@mcp-b/global`) for registering UI tools that a connected agent harness can call. It exposes a fixed interface so the fast-moving `@mcp-b/*` packages can churn behind a single seam.

Readme

@archon-research/webmcp

A stable React wrapper over WebMCP (@mcp-b/global) for registering UI tools that a connected agent harness can call. It exposes a fixed interface so the fast-moving @mcp-b/* packages can churn behind a single seam.

Tools are registered into document.modelContext. A tool registered here runs in the consumer's own authenticated browser session, so it reuses the app's existing auth and APIs rather than requiring separate server credentials.

Installation

npm install @archon-research/webmcp react

react is a peer dependency (>= 19).

Features

  • Schema-first tool definitions (defineTool)
  • StrictMode-safe registration that mounts/unmounts cleanly
  • A React provider that initializes the WebMCP polyfill and a tool registry
  • Hooks to register tools, observe the registry, and contribute view state
  • Wire-protocol types shared with the relay back-channel

Usage

Wrap your app

import { WebMCPProvider } from '@archon-research/webmcp';

export function App() {
  return (
    <WebMCPProvider>
      <YourApp />
    </WebMCPProvider>
  );
}

Define and register a tool

The handler lives on the spec. Build the spec inside the component (or with a ref) when it needs to close over component state — useRegisterTool reads the latest spec through a ref, so it re-registers only when the tool name changes, never on every render.

import { defineTool, useRegisterTool } from '@archon-research/webmcp';

function IdentityView({ onSelect }: { onSelect: (id: string) => void }) {
  const selectIdentityTool = defineTool<{ identityId: string }, { selected: string }>({
    name: 'explorer.selectIdentity',
    description: 'Select and focus an identity node in the Explorer.',
    schema: {
      type: 'object',
      properties: { identityId: { type: 'string' } },
      required: ['identityId'],
    },
    handler: async ({ identityId }) => {
      onSelect(identityId);
      return { selected: identityId };
    },
  });

  useRegisterTool(selectIdentityTool);
  return null;
}

Public surface

  • defineTool — schema-first tool factory
  • WebMCPProvider — provider that initializes the polyfill and registry
  • useRegisterTool — register a tool while a component is mounted
  • useTool — observe a single tool's spec by name
  • useToolRegistry / useToolRegistryRef — read the full registry
  • useContributeViewState — contribute a partial view-state slice
  • listTools / getViewState — imperative helpers for non-React callers
  • useRelayActivityconsole.info logger for tool_activity frames
  • Tool types (ToolSpec, ToolHandler, ViewState, ...) and the wire-protocol types shared with the relay (@archon-research/mcp-connect and the Python relay)

Related

  • @archon-research/mcp-connect — the connection UI (chat icon, status indicator, connect modal) that pairs the browser with a harness over the relay.