You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
embeddedServer(CIO, host = "127.0.0.1", port = port) {
install(SSE)
routing {
sse("/sse") {
val transport = SSEServerTransport("message", this)
val server = configureServer()
// For SSE, you can also add prompts/tools/resources if needed:
// server.addTool(...), server.addPrompt(...), server.addResource(...)
servers[transport.sessionId] = server
server.onCloseCallback = {
println("Server closed")
servers.remove(transport.sessionId)
}
server.connect(transport)
}
post("/message") {
println("Received Message")
val sessionId: String = call.request.queryParameters["sessionId"]!!
val transport = servers[sessionId]?.transport as? SSEServerTransport
if (transport == null) {
call.respond(HttpStatusCode.NotFound, "Session not found")
return@post
}
transport.handlePostMessage(call)
}
}
}.start(wait = true)
Expected behavior
A clear and concise description of what you expected to happen.
Logs
If applicable, add logs to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
mcp sse server does not remove last path when join endpoint url.
for example: baseUrl is http://localhost/sse, and server return sse data:
event:endpoint data:mesages?sessionId=a7f13c57-3ebe-4676-8079-bab962990583
sdk return endpoint http://localhost/sse/mesages?sessionId=a7f13c57-3ebe-4676-8079-bab962990583
the correct endpoint should be http://localhost/mesages?sessionId=a7f13c57-3ebe-4676-8079-bab962990583
python-sdk can correctly return the endpoint
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Logs
If applicable, add logs to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: