The documented default for http-stream responseMode says batch, but the runtime code in the published package defaults to stream.
For current documentation stating batch is the default mode see :
This creates a behavior mismatch for applications that rely on the documented default and omit responseMode from their transport config.
Version
Observed with mcp-framework@0.2.22.
Expected behavior
If responseMode is omitted from an http-stream transport config, the framework should default to batch, as documented.
Actual behavior
If responseMode is omitted, the runtime defaults to stream.
Evidence
In the published package:
dist/transports/http/types.js defines DEFAULT_HTTP_STREAM_CONFIG.responseMode = 'stream'
dist/transports/http/server.js enables JSON batch responses only when config.responseMode === 'batch'
So when responseMode is not explicitly set, the effective behavior is stream.
However, the README says the opposite:
- the HTTP Stream example says
responseMode: "batch" is the default
- the “Response Modes” section says
Batch Mode (Default)
Minimal reproduction
import { MCPServer } from "mcp-framework";
const server = new MCPServer({
transport: {
type: "http-stream",
options: {
port: 8080,
endpoint: "/mcp",
// responseMode intentionally omitted
},
},
});
With this configuration, the runtime behaves as if responseMode were stream, not batch.
Why this matters
This is easy to miss because the configuration looks valid and matches the docs.
In our case, we omitted responseMode because the docs say the default is batch, but the server actually runs in stream mode. That can affect:
- client compatibility
- response handling expectations
- debugging of HTTP transport behavior
- rollout safety when upgrading or switching transport
Suggested fix
One of these should be done so docs and runtime match:
- Change the runtime default to
batch
- Update the documentation everywhere to state that the default is
stream
If stream is the intended default, it would also help to mention that explicitly in examples because the current docs strongly suggest that omitting responseMode is equivalent to batch.
The documented default for
http-streamresponseModesaysbatch, but the runtime code in the published package defaults tostream.For current documentation stating
batchis the default mode see :This creates a behavior mismatch for applications that rely on the documented default and omit
responseModefrom their transport config.Version
Observed with
mcp-framework@0.2.22.Expected behavior
If
responseModeis omitted from anhttp-streamtransport config, the framework should default tobatch, as documented.Actual behavior
If
responseModeis omitted, the runtime defaults tostream.Evidence
In the published package:
dist/transports/http/types.jsdefinesDEFAULT_HTTP_STREAM_CONFIG.responseMode = 'stream'dist/transports/http/server.jsenables JSON batch responses only whenconfig.responseMode === 'batch'So when
responseModeis not explicitly set, the effective behavior isstream.However, the README says the opposite:
responseMode: "batch"is the defaultBatch Mode (Default)Minimal reproduction
With this configuration, the runtime behaves as if
responseModewerestream, notbatch.Why this matters
This is easy to miss because the configuration looks valid and matches the docs.
In our case, we omitted
responseModebecause the docs say the default isbatch, but the server actually runs instreammode. That can affect:Suggested fix
One of these should be done so docs and runtime match:
batchstreamIf
streamis the intended default, it would also help to mention that explicitly in examples because the current docs strongly suggest that omittingresponseModeis equivalent tobatch.