{"record":{"id":"a6f818bb96abe3d9","repo":"serverless/serverless","slug":"mcp-entry-bundle-missing","errorCode":"MCP_ENTRY_BUNDLE_MISSING","errorMessage":"The prebuilt MCP Lambda entry is missing at \"${source}\". In a source checkout it is a build product: run \"npm run build:mcp:entry\" in packages/serverless and retry. A released Serverless Framework ships it, so seeing this from an installed version is a bug - please report it at https://github.com/serverless/serverless/issues.","messagePattern":"The prebuilt MCP Lambda entry is missing at \"(.+?)\"\\. In a source checkout it is a build product: run \"npm run build:mcp:entry\" in packages/serverless and retry\\. A released Serverless Framework ships it, so seeing this from an installed version is a bug - please report it at https://github\\.com/serverless/serverless/issues\\.","errorType":"exception","errorClass":"ServerlessError","httpStatus":null,"severity":"error","filePath":"packages/serverless/lib/plugins/aws/mcp/lib/packaging.js","lineNumber":197,"sourceCode":" * Copy the prebuilt entry into the service dir and make packaging pick it up.\n *\n * `functionObjects` are the MCP server functions this run packages, and they\n * carry the pattern instead of the service under `package.individually`: a\n * service-level pattern merges into EVERY per-function zip - `getIncludes`\n * unions it into each classic per-function file list, and the esbuild plugin\n * unions it into each per-function zip the same way - which would put the\n * multi-megabyte entry in functions that have no use for it.\n *\n * `source` is injected so the tests do not depend on a built bundle.\n */\nexport const stageEntry = async ({\n  serviceDir,\n  servicePackage,\n  functionObjects = [],\n  source = mcpEntrySourcePath,\n}) => {\n  if (!existsSync(source)) {\n    throw new ServerlessError(\n      `The prebuilt MCP Lambda entry is missing at \"${source}\". In a source checkout it is a build product: run \"npm run build:mcp:entry\" in packages/serverless and retry. A released Serverless Framework ships it, so seeing this from an installed version is a bug - please report it at https://github.com/serverless/serverless/issues.`,\n      'MCP_ENTRY_BUNDLE_MISSING',\n      { stack: false },\n    )\n  }\n  const stagedDir = stagedDirOf(serviceDir)\n  await assertStageable(stagedDir, source)\n  await mkdir(stagedDir, { recursive: true })\n  await copyFile(source, path.join(stagedDir, stagedEntryName))\n  if (servicePackage.individually !== true) {\n    addStagedPattern(servicePackage)\n    return\n  }\n  for (const functionObject of functionObjects) {\n    addStagedPattern((functionObject.package = functionObject.package ?? {}))\n  }\n}\n","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/serverless/serverless/blob/b9d7ea51c8cce57cff1207964b9b71123673081f/packages/serverless/lib/plugins/aws/mcp/lib/packaging.js#L179-L215","documentation":"Error \"The prebuilt MCP Lambda entry is missing at \"${source}\". In a source checkout it is a build product: run \"npm run build:mcp:entry\" in packages/serverless and retry. A released Serverless Framework ships it, so seeing this from an installed version is a bug - please report it at https://github.com/serverless/serverless/issues.\" thrown in serverless/serverless.","triggerScenarios":"Thrown at packages/serverless/lib/plugins/aws/mcp/lib/packaging.js:197 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["In a source checkout, run 'npm run build:mcp:entry' in packages/serverless and retry.","If using an installed release, report it at https://github.com/serverless/serverless/issues."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b9d7ea51c8cce57cff1207964b9b71123673081f","analyzedAt":"2026-08-13T04:14:40.386Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}