Skip to content
Get started
Get started
bunqueue v2.8.1
View Markdown
blog · release

bunqueue v2.8.1

Released as 2.8.1 because 2.8.0 was already taken on npm (an earlier accidental publish, since deprecated).

Released as 2.8.1 because 2.8.0 was already taken on npm (an earlier accidental publish, since deprecated). Same changes as intended for 2.8.0.

bun add bunqueue@2.8.1
npm install bunqueue@2.8.1
bun add bunqueue@latest

Slimmer install: −91% node_modules for queue users (MCP SDK is now an optional peer dependency)

Section titled “Slimmer install: −91% node_modules for queue users (MCP SDK is now an optional peer dependency)”

bunqueue shipped @modelcontextprotocol/sdk and zod as hard runtime dependencies, so every consumer, including the majority who only use the job queue, downloaded the MCP server’s entire toolchain (the SDK, zod, and an HTTP stack of express, hono, ajv, jose, cors, …). On top of that, bun was declared as a peerDependency, which made package managers pull the 61 MB bun runtime package into the consumer’s tree.

This release makes the MCP dependencies opt-in without removing any feature: the bunqueue-mcp binary and the bunqueue/mcp export still ship, but the SDK is now an optional peer dependency loaded lazily via dynamic import(). Queue users pay nothing for a feature they don’t use.

Benchmark: bun add bunqueue in a clean project (measured)

Section titled “Benchmark: bun add bunqueue in a clean project (measured)”
Metric2.7.x2.8.0Delta
node_modules size93 MB8.2 MB−85 MB (−91%)
Installed packages1177−110 (−94%)
Cold install time2.73 s0.72 s3.8× faster
@modelcontextprotocol/sdkbundledabsentopt-in
zod, express, honobundledabsentremoved
bun runtime package61 MBabsentremoved

Breakdown of the ~85 MB saved: ~61 MB from dropping the bun peer dependency, ~24 MB from making the SDK + zod + HTTP stack optional.

  • Queue users (bunqueue/client, Queue / Worker / Workflow, bunqueue/queue, bunqueue/workflow), no action required. The public bundles contain zero SDK/zod code; your install simply gets smaller.

  • MCP users (bunqueue-mcp or import 'bunqueue/mcp'), install the SDK once in the environment where the server runs:

    bun add @modelcontextprotocol/sdk

    bunx --package=bunqueue bunqueue-mcp does not auto-install optional peer dependencies. If the SDK is missing, the launcher fails fast with an actionable message and exit code 1:

    [bunqueue-mcp] The MCP server requires "@modelcontextprotocol/sdk" (an optional peer dependency).
    Install it with: bun add @modelcontextprotocol/sdk

Setups that relied on the SDK being installed transitively must now add @modelcontextprotocol/sdk explicitly. The queue / worker / workflow API is unchanged, this is the only reason the release is a minor and not a patch.

  • src/mcp/index.ts is now a thin launcher; the server implementation moved to src/mcp/server.ts (export async function run()), keeping the SDK out of the entrypoint’s static import graph so it can be optional.
  • @modelcontextprotocol/sdk → peerDependencies + peerDependenciesMeta.optional (also kept in devDependencies for build/test). zod removed from dependencies (it ships with the SDK; pinned in devDependencies for builds).
  • bun removed from peerDependencies; engines.bun aligned to >=1.3.9. Declaring a runtime as a peer triggers spurious resolution warnings under npm/pnpm/yarn, engines is the correct field.
  • webhookTools switched z.url() → z.string().url() for compatibility across the SDK’s accepted zod range (^3.25 || ^4.0).

build:lib clean · tsc --noEmit clean · 181 MCP tests pass · full unit suite (5,479) green · non-MCP bundles verified free of SDK/zod · peer-optional confirmed not installed by both bun and npm in a clean project.

Thanks to @tmvc03 (#90) for reporting the footprint and proposing both the MCP split and the peerDependencies → engines change.


← bunqueue v2.7.22 · Full changelog · All posts