size

Pack: bundlephobia · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/size for the schema, then POST the same URL with its arguments for the data.

Bundle size analysis — minified + gzipped, tree-shakeability, dependencies, esm/cjs detection.

Parameters

NameTypeRequiredDescription
packagestringyesnpm package name (scoped allowed)
versionstringnoSpecific version (default latest)
recordbooleannoRecord the lookup publicly (default true)

Example call

Arguments

{
  "package": "react"
}

curl

curl -X POST https://gateway.pipeworx.io/bundlephobia/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"size","arguments":{"package":"react"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('size', {
  "package": "react"
});

More examples

{
  "package": "@lodash/es",
  "version": "4.17.21",
  "record": false
}

Response shape

FieldTypeDescription
namestringPackage name
versionstringPackage version
sizenumberMinified size in bytes
gzipnumberGzipped size in bytes
brotlinumberBrotli compressed size in bytes
dependencyCountintegerNumber of dependencies
dependenciesarrayList of dependencies
hasJSNextbooleanHas ES module support
hasJSModulebooleanHas CommonJS support
descriptionstringPackage description
Full JSON Schema
{
  "type": "object",
  "description": "Bundle size analysis result from Bundlephobia API",
  "properties": {
    "name": {
      "type": "string",
      "description": "Package name"
    },
    "version": {
      "type": "string",
      "description": "Package version"
    },
    "size": {
      "type": "number",
      "description": "Minified size in bytes"
    },
    "gzip": {
      "type": "number",
      "description": "Gzipped size in bytes"
    },
    "brotli": {
      "type": "number",
      "description": "Brotli compressed size in bytes"
    },
    "dependencyCount": {
      "type": "integer",
      "description": "Number of dependencies"
    },
    "dependencies": {
      "type": "array",
      "description": "List of dependencies",
      "items": {
        "type": "object"
      }
    },
    "hasJSNext": {
      "type": "boolean",
      "description": "Has ES module support"
    },
    "hasJSModule": {
      "type": "boolean",
      "description": "Has CommonJS support"
    },
    "description": {
      "type": "string",
      "description": "Package description"
    }
  }
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the bundlephobia pack
{
  "mcpServers": {
    "bundlephobia": {
      "url": "https://gateway.pipeworx.io/bundlephobia/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build October 5, 2026