Skip to content

Commit 9699ed3

Browse files
feat: add stateless mode support for HTTP transports
Adds stateless configuration option for both dedicated and integrated HTTP transports. Requires server package 3.3+ for stateless StreamableHttpServerTransport support.
1 parent 6cec2a7 commit 9699ed3

File tree

7 files changed

+171
-125
lines changed

7 files changed

+171
-125
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"require": {
2929
"php": "^8.1",
3030
"laravel/framework": "^9.46 || ^10.34 || ^11.29 || ^12.0",
31-
"php-mcp/server": "^3.2"
31+
"php-mcp/server": "^3.3"
3232
},
3333
"require-dev": {
3434
"laravel/pint": "^1.13",

config/mcp.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
'host' => env('MCP_HTTP_DEDICATED_HOST', '127.0.0.1'),
8888
'port' => (int) env('MCP_HTTP_DEDICATED_PORT', 8090),
8989
'path_prefix' => env('MCP_HTTP_DEDICATED_PATH_PREFIX', 'mcp'),
90+
'stateless' => (bool) env('MCP_HTTP_DEDICATED_STATELESS', false),
9091
'ssl_context_options' => [],
9192
'enable_json_response' => (bool) env('MCP_HTTP_DEDICATED_JSON_RESPONSE', true),
9293
'event_store' => null, // FQCN or null
@@ -96,6 +97,7 @@
9697
'enabled' => (bool) env('MCP_HTTP_INTEGRATED_ENABLED', true),
9798
'legacy' => (bool) env('MCP_HTTP_INTEGRATED_LEGACY', false),
9899
'route_prefix' => env('MCP_HTTP_INTEGRATED_ROUTE_PREFIX', 'mcp'),
100+
'stateless' => (bool) env('MCP_HTTP_INTEGRATED_STATELESS', false),
99101
'middleware' => ['api'],
100102
'domain' => env('MCP_HTTP_INTEGRATED_DOMAIN'),
101103
'sse_poll_interval' => (int) env('MCP_HTTP_INTEGRATED_SSE_POLL_SECONDS', 1),

0 commit comments

Comments
 (0)