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

Improve transport in SSE server example #197

Merged
merged 1 commit into from
Mar 25, 2025
Merged

Conversation

samuelcolvin
Copy link
Member

Motivation and Context

I found it relatively difficult to work out how to use transports correctly, hopefully this helps others.

If this is wrong, that's strong evidence that we should at least provide a proper example.

How Has This Been Tested?

Yes manually

Breaking Changes

NA

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

@samuelcolvin samuelcolvin changed the title add improve transport in SSE server example Improve transport in SSE server example Mar 15, 2025
@Rajesh-Narayanappa87
Copy link

This actually makes sense. I had to spend some time to correct myself when using/messages endpoint.

Copy link
Member

@jspahrsummers jspahrsummers left a comment

Choose a reason for hiding this comment

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

Great, thank you!

@jspahrsummers jspahrsummers merged commit 54aa316 into main Mar 25, 2025
4 checks passed
@jspahrsummers jspahrsummers deleted the sse-server-transport branch March 25, 2025 11:11
@cliffhall cliffhall mentioned this pull request Mar 25, 2025
9 tasks
@mehdi-sp
Copy link

mehdi-sp commented Apr 2, 2025

according to

* The Protocol object assumes ownership of the Transport, replacing any callbacks that have already been set, and expects that it is the only user of the Transport instance going forward.
*/
async connect(transport: Transport): Promise<void> {
the previous transports won't work

#204

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.

4 participants