python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

Fix uncaught exception in MCP server

Open ddworken opened this issue 7 months ago • 4 comments

Motivation and Context

This fixes an uncaught exception in the MCP server

How Has This Been Tested?

Via unit tests and locally.

Breaking Changes

None.

Types of changes

  • [x] 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

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

Additional context

ddworken avatar May 27 '25 20:05 ddworken

@johnw188

ddworken avatar May 27 '25 20:05 ddworken

So to clarify, currently this is blocking from using the streamable-http transport inside clients such as Windsurf or Claude Desktop correct?

bruno-oliveira avatar May 29 '25 12:05 bruno-oliveira

Hmm, this shouldn't be blocking any clients, it is just adding error handling for a previously unhandled exception. Have you observed issues with this PR in certain clients?

ddworken avatar May 29 '25 16:05 ddworken

@bruno-oliveira This shouldn't be blocking anyone, but it does fix a huge security issue with remote servers. Currently anyone can lock up a server just by sending a bad payload https://github.com/modelcontextprotocol/python-sdk/issues/820

Sillocan avatar May 30 '25 16:05 Sillocan

I'm a bit baffled that a security issue like this is still open

Sillocan avatar Jun 08 '25 18:06 Sillocan