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

mcp-bundler

v1.2.5

Published

MCPB (MCP Bundle) bundler for Smithery MCP servers

Downloads

35

Readme

MCP Bundler

A tool for bundling Smithery MCP servers into MCPB (MCP Bundle) format for easy distribution and deployment.

Features

  • Smithery Integration: Reads smithery.yaml configuration files
  • MCPB Compliance: Generates MCPB-compliant bundles with proper manifest
  • Smart Configuration: Converts Smithery config schemas to MCPB user config format
  • Type Safety: Proper JSON Schema to MCPB type mapping
  • Nested Config Support: Flattens nested configurations using dot notation
  • Automatic Detection: Smart entry point detection and TypeScript support
  • Optimized Builds: Minification, tree-shaking, and Node.js built-in externals

Installation

npm install @mcps/bundler

Or use directly:

npx @mcps/bundler <project-name>

Usage

CLI

# Bundle a project
mcp-bundler mcp-shrimp-task-manager

# With options
mcp-bundler my-server --minify=false --entry=src/main.ts

Programmatic API

import { bundleMCPServer } from '@mcps/bundler';

const result = await bundleMCPServer(
  '/path/to/project',
  '/path/to/output',
  {
    minify: true,
    entry: 'src/index.ts'
  }
);

console.log(`Bundle created: ${result.outputDir} (${result.bundleSize}KB)`);

Configuration

The bundler reads smithery.yaml files and converts them to MCPB format:

Input (smithery.yaml)

startCommand:
  configSchema:
    type: object
    properties:
      dataDir:
        type: string
        description: Directory for data storage
      auth:
        type: object
        properties:
          apiKey:
            type: string
            description: API key for authentication
    required: [dataDir]

Output (manifest.json)

{
  "manifest_version": "0.2",
  "name": "my-server",
  "version": "1.0.0",
  "user_config": {
    "dataDir": {
      "type": "directory",
      "title": "Data Dir",
      "description": "Directory for data storage",
      "required": true
    },
    "auth.apiKey": {
      "type": "string",
      "title": "Auth API Key",
      "description": "API key for authentication",
      "sensitive": true
    }
  },
  "server": {
    "type": "node",
    "entry_point": "server.cjs",
    "mcp_config": {
      "command": "node",
      "args": ["${__dirname}/server.cjs"],
      "env": {
        "DATADIR": "${user_config.dataDir}",
        "AUTH_API_KEY": "${user_config.auth.apiKey}"
      }
    }
  }
}

Features

Smart Type Conversion

  • Automatically detects directory/path fields
  • Maps JSON Schema types to MCPB types
  • Handles sensitive fields (passwords, keys, tokens)
  • Supports validation constraints (min/max for numbers)

Dot Notation Flattening

  • Converts nested objects to flat dot notation
  • auth.apiKey becomes AUTH_API_KEY environment variable
  • Generates user-friendly titles: auth.apiKey → "Auth API Key"

Build Optimization

  • Minification enabled by default
  • Tree-shaking for smaller bundles
  • Node.js built-ins marked as external
  • TypeScript support with automatic tsconfig detection

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | minify | boolean | true | Enable minification | | entry | string | auto-detect | Override entry point |

Output Structure

project-name.mcpb/
├── server.cjs      # Bundled executable server
└── manifest.json   # MCPB manifest with metadata

API Reference

bundleMCPServer(projectPath, outputDir, options)

Bundles an MCP server project.

Parameters:

  • projectPath (string): Path to the project directory
  • outputDir (string): Output directory for the bundle
  • options (object): Bundle options

Returns: Promise resolving to bundle result with outputDir, bundleSize, and warnings.

parseSmitheryYaml(yamlContent)

Parses Smithery YAML configuration.

smitheryConfigToUserConfig(configSchema)

Converts Smithery config schema to MCPB user config format.

smitheryToManifest(smitheryConfig, packageInfo)

Generates MCPB manifest from Smithery config and package info.

Requirements

  • Node.js >= 18.0.0
  • Valid smithery.yaml configuration file
  • Valid package.json in project root

License

MIT