From c995e75f15d72b7af3dce7af81d26259dca5459b Mon Sep 17 00:00:00 2001 From: Simon Vestergaard Laursen Date: Wed, 15 Jul 2026 09:44:46 +0200 Subject: [PATCH] fix: add body-parser configuration in bootstrap --- src/mcp.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mcp.ts b/src/mcp.ts index 0886978..ed660e5 100644 --- a/src/mcp.ts +++ b/src/mcp.ts @@ -68,6 +68,15 @@ export default class McpPlugin { }), ); + // Apply body limit + const limit = + cds.env.mcp?.body_parser?.limit ?? + cds.env.server?.body_parser?.limit ?? + "100kb"; // preserve current default if no config + + this.expressApp.use("/mcp", express.json({ limit })); + + // Handle auth configuration if (this.config.auth === "inherit") { registerAuthMiddleware(this.expressApp); }