DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk3 min

MCP Express Request Limits: Two Caps, Two Enforcement Points

MCP request bytes and JSON-RPC batch counts are controlled separately. In Express, an upstream JSON parser may reject a body before the SDK applies its own limit.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A 413 response can occur before the MCP SDK checks its request-body limit. In an Express setup, JSON-parsing middleware may read and reject the body first; the SDK’s byte cap applies only when the SDK reads the request stream itself. A separate SDK limit caps the number of JSON-RPC messages in a batch. These controls act at different stages, so changing one does not necessarily change the other.

What the two limits control

Limit Controls When it applies
Request-body size Bytes in the HTTP request body. The MCP TypeScript SDK changelog lists a 4 MiB default for requests whose body the SDK reads itself. When the SDK owns reading the request stream. If a caller provides an already parsed body, the SDK’s bounded read is skipped. Official SDK changelog
JSON-RPC batch size Number of JSON-RPC messages in a batch. The SDK changelog lists a maximum of 100 messages. Batch validation still applies when the body is pre-parsed; it is independent of the byte limit. Official SDK changelog

These are different dimensions: a request can be under the byte limit but contain too many batch entries, or exceed the byte limit while containing only a few large messages. The limits are configuration and validation values, not performance measurements.

Why Express can return 413 before the SDK limit matters

In a middleware path where express.json() parses the request before it reaches the MCP transport, Express reads the bytes first. If its parser rejects the body, the transport never gets a parsed request to validate, and changing the SDK’s body-size setting cannot override that earlier refusal.

Imran Siddique’s September 25, 2026 article reports this behavior for its documented 1.x Express path and describes the SDK’s 1.30.1 implementation as using a 4 MiB body cap and a 100-message batch cap. The article also reports different response shapes and logging visibility depending on which layer rejects the request; those observations belong to its stated test setup, not an independently reproduced test. Siddique’s article

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Pearson Computer Networking, 8E
  • brand: Pearson
  • Computer Networking, 8e

The official SDK changelog corroborates the distinction between SDK-owned bounded reads and pre-parsed bodies, but it is on the current main branch and includes later changes. It does not, by itself, verify every detail of the published 1.30.1 package. Check the exact installed package and adapter before relying on version-specific behavior.

Check which component handles the body

  1. Identify the installed SDK generation and version. Distinguish the 1.x monolithic SDK from the v2 split packages, and note whether the application uses the official Express adapter or custom middleware.
  2. Trace middleware order. Determine whether express.json() runs before the MCP transport. If it does, find the parser limit configured for that middleware and the error handler that receives parser failures.
  3. Find the SDK body-limit setting. Set it for requests the SDK reads itself. It cannot raise an upstream parser’s limit when the parser has already consumed or rejected the body.
  4. Configure the Express parser using the installed adapter’s option. Current official Express adapter source exposes jsonLimit, passed to express.json({ limit }), and documents Express’s built-in default as 100kb. Adapter options have evolved, so do not assume that current option exists in every older setup. Current Express adapter source
  5. Align and test both controls. Choose limits that suit the expected request size, then exercise a body-size rejection and a batch-count rejection separately. Record the HTTP status, response content type and payload, and which middleware or transport logs the refusal.

Diagnose a rejection by its enforcement point

What to inspect Likely implication
Express parser limit and middleware order If parsing happens before transport handling and the body crosses that parser limit, Express can refuse it before the SDK’s body reader runs.
SDK body limit and whether the body is pre-parsed The SDK’s bounded body read applies when it reads the stream itself; a caller-provided parsed body bypasses that read limit.
Batch entry count A body within its byte allowance can still fail batch validation if it exceeds the SDK’s message-count cap.
Response and logs The rejecting layer determines which error handler and monitoring hooks see the failure. Compare status, content type, payload, and application logs rather than assuming every refusal is a JSON-RPC error.
Exact SDK and adapter version Options and implementation details can differ between releases; current branch documentation is not proof of behavior in every historical package.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Practical takeaway for a 413 below the SDK setting

When a request appears smaller than the configured SDK maximum but receives HTTP 413, inspect the Express JSON parser and middleware order first. The SDK setting is not the effective ceiling if an upstream parser rejects the body earlier. Separately check batch length: raising a byte limit will not change the maximum number of JSON-RPC messages accepted.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.