Add reporting of the Proxy <-> Server sessionId. It's only possible to get the session id for this leg of the proxy if it is a StreamableHttp connection.
* In server/src/index.ts
- slight format tweak of the Client <-> Proxy message so that the two messages will line up when displayed
* In server/src/mcpProxy.ts
- add reportedServerSession boolean initialized to false
- in transportToServer.onmessage,
- if reportedServerSession isn't set yet, report the sessionId if present on the transport, and then set reportedServerSession to true
This commit is contained in:
parent
789c90cc0b
commit
c485e57a39
1 changed files with 12 additions and 1 deletions
|
|
@ -197,7 +197,7 @@ app.post("/mcp", async (req, res) => {
|
|||
onsessioninitialized: (sessionId) => {
|
||||
webAppTransports.set(sessionId, webAppTransport);
|
||||
serverTransports.set(sessionId, serverTransport!);
|
||||
console.log("New client <-> proxy server sessionId: " + sessionId);
|
||||
console.log("Client <-> Proxy sessionId: " + sessionId);
|
||||
},
|
||||
});
|
||||
console.log("Created StreamableHttp client transport");
|
||||
|
|
|
|||
Loading…
Reference in a new issue