serverless/serverless · error · ServerlessError
MCP_ENTRY_BUNDLE_MISSING
MCP_ENTRY_BUNDLE_MISSING
Error message
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. What it means
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.
Source
Thrown at packages/serverless/lib/plugins/aws/mcp/lib/packaging.js:197
* Copy the prebuilt entry into the service dir and make packaging pick it up.
*
* `functionObjects` are the MCP server functions this run packages, and they
* carry the pattern instead of the service under `package.individually`: a
* service-level pattern merges into EVERY per-function zip - `getIncludes`
* unions it into each classic per-function file list, and the esbuild plugin
* unions it into each per-function zip the same way - which would put the
* multi-megabyte entry in functions that have no use for it.
*
* `source` is injected so the tests do not depend on a built bundle.
*/
export const stageEntry = async ({
serviceDir,
servicePackage,
functionObjects = [],
source = mcpEntrySourcePath,
}) => {
if (!existsSync(source)) {
throw new ServerlessError(
`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.`,
'MCP_ENTRY_BUNDLE_MISSING',
{ stack: false },
)
}
const stagedDir = stagedDirOf(serviceDir)
await assertStageable(stagedDir, source)
await mkdir(stagedDir, { recursive: true })
await copyFile(source, path.join(stagedDir, stagedEntryName))
if (servicePackage.individually !== true) {
addStagedPattern(servicePackage)
return
}
for (const functionObject of functionObjects) {
addStagedPattern((functionObject.package = functionObject.package ?? {}))
}
}
View on GitHub (pinned to b9d7ea51c8)
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.
When it happens
Trigger: Thrown at packages/serverless/lib/plugins/aws/mcp/lib/packaging.js:197 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of serverless/serverless@b9d7ea51c8 (2026-08-13).
Data as JSON: /api/errors/a6f818bb96abe3d9.
Report an issue: GitHub.