size

Pack: bundlephobia · Endpoint: https://gateway.pipeworx.io/bundlephobia/mcp

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

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":{}}}'

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, or use one-click install buttons:

{
  "mcpServers": {
    "bundlephobia": {
      "url": "https://gateway.pipeworx.io/bundlephobia/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 21, 2026