Commit 62c839b
McpApprovalServer: run MCP transport in stateless mode
Configures HttpServerTransportOptions.Stateless = true so each tools/call
POST is self-contained and does not require the client to keep the
initialize SSE stream open. ModelContextProtocol.AspNetCore 1.2.0
destroys the server-side session as soon as the initialize SSE
disconnects, which caused tools/call from Docker to return HTTP 500.
Safe here because application state lives in CommandHistoryService /
ApprovalRequestQueue, ExecuteCommandTool uses a hardcoded "default"
session id, calls are request/response, and no server-initiated
messages need a persistent SSE channel.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 1c968a9 commit 62c839b
1 file changed
Lines changed: 15 additions & 11 deletions
Lines changed: 15 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
69 | 67 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | | - | |
77 | | - | |
| 81 | + | |
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
| |||
0 commit comments