Skip to content

Commit 010ac8f

Browse files
authored
Update useChatSession.ts (#2657)
Use the headers when reconnecting to the MCP streamable-http server <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Include MCP headers when reconnecting to streamable-http MCP servers. This preserves auth and custom headers and prevents reconnection failures. <sup>Written for commit c49cd6b. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
1 parent b2af84c commit 010ac8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libs/react-client/src/useChatSession.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ const useChatSession = () => {
146146
promise = client.connectStreamableHttpMCP(
147147
sessionId,
148148
mcp.name,
149-
mcp.url!
149+
mcp.url!,
150+
mcp.headers || {}
150151
);
151152
} else {
152153
promise = client.connectStdioMCP(

0 commit comments

Comments
 (0)