Repository navigation
Description
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 :
- https://www.mcp-framework.com/docs/transports/http-stream#configuration
- https://www.mcp-framework.com/docs/transports/http-stream#response-mode
This creates a behavior mismatch for applications that rely on the documented default and omit responseMode from their transport config.
Version
Observed with [email protected].
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.jsdefinesDEFAULT_HTTP_STREAM_CONFIG.responseMode = 'stream'dist/transports/http/server.jsenables JSON batch responses only whenconfig.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.
Activity