Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sse server does not process endpoint correctly when sse path is not a directory #43

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

shendaxia-sm
Copy link

issue is : #41

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

e5l
e5l previously approved these changes Feb 12, 2025
Copy link
Collaborator

@e5l e5l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@e5l
Copy link
Collaborator

e5l commented Feb 12, 2025

Hey @shendaxia-sm, thank you for the PR!
Could you rebase the branch on the main so we can merge?

@e5l e5l enabled auto-merge February 12, 2025 13:34
auto-merge was automatically disabled February 13, 2025 13:30

Head branch was pushed to by a user without write access

@shendaxia-sm shendaxia-sm force-pushed the feature/fix_sse_client_endpoint branch from d622a41 to cbb64bb Compare February 13, 2025 13:30
Copy link
Collaborator

@e5l e5l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@e5l e5l enabled auto-merge February 13, 2025 13:31
@shendaxia-sm
Copy link
Author

Hey @shendaxia-sm, thank you for the PR! Could you rebase the branch on the main so we can merge?

i have rebase main, and commit ammend

@e5l e5l disabled auto-merge February 14, 2025 14:15
@e5l e5l enabled auto-merge February 14, 2025 14:15
@e5l
Copy link
Collaborator

e5l commented Feb 15, 2025

@shendaxia-sm could you please trigger Validate PR action on the fork?

auto-merge was automatically disabled February 17, 2025 04:32

Head branch was pushed to by a user without write access

@shendaxia-sm shendaxia-sm force-pushed the feature/fix_sse_client_endpoint branch from cbb64bb to 53421f5 Compare February 17, 2025 04:32
@shendaxia-sm
Copy link
Author

@shendaxia-sm could you please trigger Validate PR action on the fork?

sorry,does actions of this repo has some authentication,validate pr action was not automatically invoked when commit pull request,and i didn't found manual run button in actions tab

@e5l
Copy link
Collaborator

e5l commented Feb 17, 2025

@Mr3zee, could you check?

@Mr3zee Mr3zee enabled auto-merge February 18, 2025 12:34
@Mr3zee Mr3zee disabled auto-merge February 18, 2025 13:11
@Mr3zee Mr3zee enabled auto-merge (squash) February 18, 2025 13:22
@Mr3zee
Copy link
Collaborator

Mr3zee commented Feb 18, 2025

It seems that I can't trigger the action manually for some reason. I added the fix for it, we'll need to update this branch after it is merged.
#44

@e5l e5l disabled auto-merge February 18, 2025 16:54
@e5l e5l enabled auto-merge (squash) February 18, 2025 16:54
@e5l
Copy link
Collaborator

e5l commented Feb 19, 2025

Could you please check the build?

e: file:///home/runner/work/kotlin-sdk/kotlin-sdk/src/jvmTest/kotlin/client/SseTransportTest.kt:86:5 Conflicting overloads:

fun test sse path not root path(): Unit
> Task :compileTestKotlinJvm FAILED
e: file:///home/runner/work/kotlin-sdk/kotlin-sdk/src/jvmTest/kotlin/client/SseTransportTest.kt:123:5 Conflicting overloads:
fun test sse path not root path(): Unit
e: file:///home/runner/work/kotlin-sdk/kotlin-sdk/src/jvmTest/kotlin/client/SseTransportTest.kt:128:17 None of the following candidates is applicable:
fun HttpClient.mcpSseTransport(urlString: String? = ..., reconnectionTime: Duration? = ..., requestBuilder: HttpRequestBuilder.() -> Unit = ...): SseClientTransport
fun ServerSSESession.mcpSseTransport(postEndpoint: String, transports: ConcurrentMap<String, SseServerTransport>): SseServerTransport
e: file:///home/runner/work/kotlin-sdk/kotlin-sdk/src/jvmTest/kotlin/client/SseTransportTest.kt:129:21 Unresolved reference 'onMessage'.
e: file:///home/runner/work/kotlin-sdk/kotlin-sdk/src/jvmTest/kotlin/client/SseTransportTest.kt:130:25 Unresolved reference 'send'.
e: file:///home/runner/work/kotlin-sdk/kotlin-sdk/src/jvmTest/kotlin/client/SseTransportTest.kt:130:30 Unresolved reference 'it'.

@e5l e5l disabled auto-merge March 5, 2025 07:53
@e5l e5l enabled auto-merge (squash) March 5, 2025 07:53
@e5l e5l disabled auto-merge March 5, 2025 08: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.

3 participants