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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mcp-b/npm-packages

v1.0.0

Published

[![npm version](https://img.shields.io/npm/v/@mcp-b/transports?style=flat-square)](https://www.npmjs.com/org/mcp-b) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT) [![TypeScript

Downloads

9

Readme

MCP-B NPM Packages 📦

npm version License: MIT TypeScript

This monorepo contains the official NPM packages for MCP-B (Model Context Protocol for Browsers). These packages provide the core functionality for implementing MCP in browser environments.

📥 Installation

Install the packages you need via npm, yarn, or pnpm:

# Core transport layer (required)
npm install @mcp-b/transports

# React integration
npm install @mcp-b/mcp-react-hooks

# Chrome Extension API tools
npm install @mcp-b/extension-tools

📦 Available Packages

| Package | NPM | Description | Documentation | |---------|-----|-------------|---------------| | @mcp-b/transports | npm | Browser-specific MCP transport implementations | Docs | | @mcp-b/mcp-react-hooks | npm | React hooks for MCP integration | Docs | | @mcp-b/extension-tools | npm | MCP tools for Chrome Extension APIs | Docs | | @mcp-b/mcp-react-hook-form | npm | React Hook Form integration for MCP | Docs | | @mcp-b/global | Internal | Global type definitions | Internal use |

🚀 Quick Start

Basic Usage with Vanilla JavaScript

import { TabServerTransport } from "@mcp-b/transports";
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";

// Create MCP server
const server = new McpServer({
  name: "my-website",
  version: "1.0.0",
});

// Add tools
server.tool("getTodos", "Get all todos", {}, async () => {
  // Your tool implementation
  return { content: [{ type: "text", text: "Todo items..." }] };
});

// Connect transport
await server.connect(new TabServerTransport({ allowedOrigins: ["*"] }));

React Integration

import { useMcpClient } from "@mcp-b/mcp-react-hooks";

function MyComponent() {
  const { client, connected, tools } = useMcpClient();
  
  // Use MCP tools in your React app
  const handleClick = async () => {
    const result = await client.callTool("getTodos", {});
    console.log(result);
  };
  
  return <button onClick={handleClick}>Get Todos</button>;
}

🏗️ Architecture

These packages implement the Model Context Protocol for browser environments:

  • Transports: Handle communication between MCP servers and clients using browser-specific mechanisms (postMessage, Chrome runtime messaging)
  • React Hooks: Provide React-friendly APIs for MCP integration
  • Extension Tools: Auto-generated tools for Chrome Extension APIs
  • React Hook Form: Integration with React Hook Form for form handling

🔧 Development

This is a pnpm workspace monorepo using Turbo for build orchestration.

Prerequisites

  • Node.js >= 22.12 (see .nvmrc)
  • pnpm >= 10.0.0

Getting Started

# Clone the repository
git clone https://github.com/WebMCP-org/npm-packages.git
cd npm-packages

# Install dependencies
pnpm install

# Build all packages
pnpm build

# Development mode with watch
pnpm dev

Available Scripts

| Script | Description | |--------|-------------| | pnpm build | Build all packages | | pnpm dev | Start development mode with watch | | pnpm typecheck | Run TypeScript type checking | | pnpm check | Run Biome linting and formatting (with fixes) | | pnpm check:ci | Run Biome checks (CI mode) | | pnpm changeset | Create a new changeset | | pnpm changeset:version | Update versions based on changesets | | pnpm changeset:publish | Build and publish packages to npm |

Code Quality

  • Linting & Formatting: We use Biome for fast, unified linting and formatting
  • Pre-commit Hooks: Automatic formatting via Husky and lint-staged
  • Type Safety: Full TypeScript with strict mode enabled
  • CI/CD: GitHub Actions for automated testing and publishing

Testing Locally

  • GitHub Actions: Test workflows locally with act
  • Unit Tests: Run tests with pnpm test (when implemented)

Publishing

We use changesets for version management:

# 1. Create a changeset for your changes
pnpm changeset

# 2. Commit the changeset file
git add .changeset/*.md
git commit -m "Add changeset"

# 3. Push to main branch
git push origin main

# GitHub Actions will automatically:
# - Create a Version PR
# - Update versions when merged
# - Publish to npm

📚 Documentation

🤝 Contributing

Contributions are welcome! Please see our Contributing Guide for details.

📄 License

MIT - see LICENSE for details.

🔗 Links