Registry / devops / mcp-bundler

mcp-bundler

JSON →
library1.2.5jsnpmunverified

MCPB (MCP Bundle) bundler for Smithery MCP servers, version 1.2.5. Converts Smithery YAML configs into MCPB-compliant bundles with manifest, dot-notation flattening, and automatic type mapping. Supports Node.js >=18, programmatic API, and auto-detection of entry points. Differentiated from generic bundlers by its tight integration with the Smithery ecosystem and MCPB spec compliance.

npm install mcp-bundler
INSTALL
IMPORT
SIG · MCP-BUNDLER
M
mcp-bundler
devopsjavascriptv1.2.5
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

bundleMCPServer
import { bundleMCPServer } from '@mcps/bundler';
const bundleMCPServer = require('@mcps/bundler');
Package is ESM-only; CommonJS require() will fail.
parseSmitheryYaml
import { parseSmitheryYaml } from '@mcps/bundler';
Use to parse Smithery YAML content directly.
smitheryConfigToUserConfig
import { smitheryConfigToUserConfig } from '@mcps/bundler';
Converts Smithery config schema to MCPB user config format.
smitheryToManifest
import { smitheryToManifest } from '@mcps/bundler';
import smitheryToManifest from '@mcps/bundler';
Named export only; default export is not available.

Shows how to use the programmatic API to bundle a Smithery MCP server project.

import { bundleMCPServer } from '@mcps/bundler'; import { resolve } from 'path'; const projectPath = resolve('./my-server'); const outputDir = resolve('./dist'); const result = await bundleMCPServer(projectPath, outputDir, { minify: true, entry: 'src/index.ts' }); console.log(`Bundle size: ${result.bundleSize} KB`);
mcpb --version
Debug
Known issues
breakingRequires Node.js >=18.0.0 due to ESM and modern features.
fix
Upgrade Node.js to version 18 or higher.
affects: >=1.0.0
deprecatedThe `smitheryYaml` export was deprecated in v1.2.0; use `parseSmitheryYaml` instead.
fix
Replace import `{ smitheryYaml }` with `{ parseSmitheryYaml }`.
affects: >=1.2.0 <1.2.5
gotchaMinification is enabled by default, which may increase bundle time and cause issues with dynamic imports.
fix
Set `minify: false` in options if you encounter issues with dynamic imports or desire faster builds.
affects: >=1.0.0
gotchaEntry point auto-detection may pick the wrong file if multiple `main.ts` or `index.ts` exist; always specify `entry` explicitly for projects with multiple source roots.
fix
Pass the `entry` option explicitly when calling `bundleMCPServer`.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module '@mcps/bundler'
Package not installed or missing in node_modules.
fix
Run `npm install @mcps/bundler`
SyntaxError: Unexpected token '{'
Using CommonJS require() on an ESM-only package.
fix
Use `import { bundleMCPServer } from '@mcps/bundler';` instead
Error: Node.js version 16.x is not supported
Minimum Node.js requirement is 18.x.
fix
Upgrade Node.js to version 18 or higher
TypeError: (0 , bundler_1.bundleMCPServer) is not a function
Attempting to call the default export when it does not exist.
fix
Use named import: `import { bundleMCPServer } from '@mcps/bundler';`
Upgrade
Version history
1.2.5latest on npm
Audit
Dependencies
@smithery/sdkrequiredProvides types and utilities for Smithery MCP server configuration
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
mcp-bundler — npm install mcp-bundler · libregistry