{"id":18531,"library":"mcp-bundler","title":"MCP Bundler","description":"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.","status":"active","version":"1.2.5","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install mcp-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add mcp-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add mcp-bundler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides types and utilities for Smithery MCP server configuration","package":"@smithery/sdk","optional":false}],"imports":[{"note":"Package is ESM-only; CommonJS require() will fail.","wrong":"const bundleMCPServer = require('@mcps/bundler');","symbol":"bundleMCPServer","correct":"import { bundleMCPServer } from '@mcps/bundler';"},{"note":"Use to parse Smithery YAML content directly.","symbol":"parseSmitheryYaml","correct":"import { parseSmitheryYaml } from '@mcps/bundler';"},{"note":"Converts Smithery config schema to MCPB user config format.","symbol":"smitheryConfigToUserConfig","correct":"import { smitheryConfigToUserConfig } from '@mcps/bundler';"},{"note":"Named export only; default export is not available.","wrong":"import smitheryToManifest from '@mcps/bundler';","symbol":"smitheryToManifest","correct":"import { smitheryToManifest } from '@mcps/bundler';"}],"quickstart":{"code":"import { bundleMCPServer } from '@mcps/bundler';\nimport { resolve } from 'path';\n\nconst projectPath = resolve('./my-server');\nconst outputDir = resolve('./dist');\n\nconst result = await bundleMCPServer(projectPath, outputDir, {\n  minify: true,\n  entry: 'src/index.ts'\n});\n\nconsole.log(`Bundle size: ${result.bundleSize} KB`);","lang":"typescript","description":"Shows how to use the programmatic API to bundle a Smithery MCP server project."},"warnings":[{"fix":"Upgrade Node.js to version 18 or higher.","message":"Requires Node.js >=18.0.0 due to ESM and modern features.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Replace import `{ smitheryYaml }` with `{ parseSmitheryYaml }`.","message":"The `smitheryYaml` export was deprecated in v1.2.0; use `parseSmitheryYaml` instead.","severity":"deprecated","affected_versions":">=1.2.0 <1.2.5"},{"fix":"Set `minify: false` in options if you encounter issues with dynamic imports or desire faster builds.","message":"Minification is enabled by default, which may increase bundle time and cause issues with dynamic imports.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Pass the `entry` option explicitly when calling `bundleMCPServer`.","message":"Entry 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.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install @mcps/bundler`","cause":"Package not installed or missing in node_modules.","error":"Error: Cannot find module '@mcps/bundler'"},{"fix":"Use `import { bundleMCPServer } from '@mcps/bundler';` instead","cause":"Using CommonJS require() on an ESM-only package.","error":"SyntaxError: Unexpected token '{'"},{"fix":"Upgrade Node.js to version 18 or higher","cause":"Minimum Node.js requirement is 18.x.","error":"Error: Node.js version 16.x is not supported"},{"fix":"Use named import: `import { bundleMCPServer } from '@mcps/bundler';`","cause":"Attempting to call the default export when it does not exist.","error":"TypeError: (0 , bundler_1.bundleMCPServer) is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}