Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@paoloricciuti
Copy link
Contributor

This PR fixes some mistake in the expected output of SERVER_REQUIREMENTS while also updating the code blocks to be json rather than typescript.

Motivation and Context

  1. Implementing an everything-server while following the guide was resulting in a few errors because, for example, the tests for elicitation don't actually response with a { "respose": "" } object but with a { username: "", email: "" } object. Also the test for test_error_handling correctly checks for isError and content in the response but the guide was still expecting an error to be thrown.
  2. While typescript looks a bit nicer (without a bunch of quotes) the downside is that since the typescript in the blocks it's just an object the formatter automatically adds a ; at the end of the content array meaning copying them to paste them in the server will always require removing that semicolon to have proper syntax. Having them as JSON will allow to just copy paste them (and the formatter will remove the unnecessary quotes).

How Has This Been Tested?

I have built an everything-server and verified the changes are correct.

Breaking Changes

Nope.

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

Copy link
Member

@pcarleton pcarleton left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for these adjustments.

I think it's likely in the future we'll want to find a way to generate this from the test code so we're not stuck manually updating it for every test change.

@pcarleton pcarleton enabled auto-merge (squash) November 7, 2025 14:51
@paoloricciuti
Copy link
Contributor Author

I think it's likely in the future we'll want to find a way to generate this from the test code so we're not stuck manually updating it for every test change.

That's an interesting idea, not straightforward but definitely interesting, I'll see if I can come up with something

@paoloricciuti
Copy link
Contributor Author

@pcarleton I think you need to approve the workflow for the automerge to take place

@pcarleton pcarleton merged commit 78d6bec into modelcontextprotocol:main Nov 9, 2025
1 check passed
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.

2 participants