fix: upgrade SDK to 0.6.0 and ensure tools capability is always enabled#1
fix: upgrade SDK to 0.6.0 and ensure tools capability is always enabled#1ardzz wants to merge 4 commits intoPortSwigger:mainfrom
Conversation
ardzz
commented
Dec 19, 2025
- Upgrade kotlin-sdk from 0.5.0 to 0.6.0 to fix SSE endpoint path handling (SDK 0.5.0 was appending /sse to URL causing 404 with Burp MCP Server)
- Add fallback to always include tools capability in ServerCapabilities even when serverCapabilities is null (fixes 'Server does not support tools' error)
- Upgrade kotlin-sdk from 0.5.0 to 0.6.0 to fix SSE endpoint path handling (SDK 0.5.0 was appending /sse to URL causing 404 with Burp MCP Server) - Add fallback to always include tools capability in ServerCapabilities even when serverCapabilities is null (fixes 'Server does not support tools' error)
There was a problem hiding this comment.
Pull request overview
This PR upgrades the Kotlin SDK from version 0.5.0 to 0.6.0 and implements two fixes: proper handling of SSE endpoint paths (preventing the SDK from appending /sse which was causing 404 errors) and ensuring the tools capability is always available even when the server is disconnected.
- SDK upgraded from 0.5.0 to 0.6.0
- Added HTTP headers (Origin, Referer, User-Agent) for SSE connections
- Implemented fallback logic to ensure tools capability is always present in ServerCapabilities
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| build.gradle.kts | Updates SDK dependency from version 0.5.0 to 0.6.0 |
| src/main/kotlin/net/portswigger/SseClient.kt | Adds baseUrl handling to strip /sse suffix and configures HTTP headers for SSE transport |
| src/main/kotlin/net/portswigger/Main.kt | Implements fallback to ensure tools capability is always enabled in ServerCapabilities, even when server is disconnected |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| defaultRequest { | ||
| header("Origin", baseUrl) | ||
| header("Referer", baseUrl) | ||
| header("User-Agent", "MCP-Proxy") | ||
| } |
There was a problem hiding this comment.
The headers set in the defaultRequest block are duplicated in the requestBuilder at lines 54-56. This duplication is unnecessary since defaultRequest already applies these headers to all HTTP requests made by this client. Consider removing the headers from either location to avoid redundancy.
|
There are no conflicts in this code. Solution here also documents necessary changes on mcp-server as well. |