Skip to content

Conversation

@Fuud
Copy link

@Fuud Fuud commented Jan 5, 2026

Motivation and Context

Currently absolute endpoints are handling incorrectly.
For example, IDE Index Plugin uses sse endpoint http://127.0.0.1:29170/index-mcp/sse and returns /index-mcp?sessionId=.... It should result in POST endpoint http://127.0.0.1:29170/index-mcp?sessionId=... but currently resolves in http://127.0.0.1:29170/index-mcp/index-mcp?sessionId=..

You can check TS implementation:
https://github.com/modelcontextprotocol/typescript-sdk/blob/main/packages/client/src/client/sse.ts#L181
Or java implementation:
https://github.com/modelcontextprotocol/java-sdk/blob/main/mcp-core/src/main/java/io/modelcontextprotocol/client/transport/HttpClientSseClientTransport.java#L337
https://github.com/modelcontextprotocol/java-sdk/blob/main/mcp-core/src/main/java/io/modelcontextprotocol/util/Utils.java#L71

How Has This Been Tested?

I built project and tested it against IDE Index Plugin.
I tried to run tests but:

  1. tests in kotlin-sdk-test/src/commonTest are ignored (and incorrent: it expectes that sse server is echo server that is incorrect. check)
  2. tests in kotlin-sdk-test/src/jvmTest are passed except npm-related.

Breaking Changes

No (except if users uses incorrect written server)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Feel free advice me what tests should be added.

@kpavlov kpavlov force-pushed the fix-sse-endpoint-resolving branch from ffa4ea4 to 8cba254 Compare January 9, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant