Skip to content

Commit 19e12e2

Browse files
authored
Merge pull request modelcontextprotocol#806 from cliffhall/fix-stateless-http-connections
Fix stateless StreamableHttp connections
2 parents 4352d32 + 51d28cd commit 19e12e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ const getHttpHeaders = (req: express.Request): Record<string, string> => {
5353
lowerKey === "authorization" ||
5454
lowerKey === "last-event-id"
5555
) {
56-
// Exclude the proxy's own authentication header
57-
if (lowerKey !== "x-mcp-proxy-auth") {
56+
// Exclude the proxy's own authentication header and the Client <-> Proxy session ID header
57+
if (lowerKey !== "x-mcp-proxy-auth" && lowerKey !== "mcp-session-id") {
5858
const value = req.headers[key];
5959

6060
if (typeof value === "string") {

0 commit comments

Comments
 (0)