Skip to content

Conversation

ierickson
Copy link
Contributor

MCP Integration Update for SSE Transport

Summary

This update implements compatibility with MCP 1.8.1, primarily addressing changes to the Server-Sent Events (SSE) transport system. The version has been incremented from 0.3.3 to 0.3.4.

Key Changes

Dependency Updates

  • Updated mcp dependency from 1.6.0 to 1.8.1
  • Added python-multipart as a transitive dependency from the MCP update

SSE Transport Adaptation

  • Updated the FastApiSseTransport class to work with the new SessionMessage wrapper
  • All messages are now properly wrapped in SessionMessage objects before sending
  • Changed type hints and method signatures to accommodate the new message structure

Test Updates

  • Updated tests to work with the new SessionMessage wrapper
  • Fixed assertions to properly check message contents in the updated structure

Documentation Updates

  • Added version 0.3.4 entry to the CHANGELOG

Technical Implementation

  • Messages are now wrapped with SessionMessage in the accept_message method
  • Error handling was updated to construct SessionMessage objects for error responses
  • Type hints updated across the codebase to reflect the new message structure
  • All tests were updated to maintain full test coverage

Build Updates

  • Updated pyproject.toml with new version and dependency requirements
  • Updated uv.lock file with latest dependency hashes and versions

Checklist before requesting a review

  • Added relevant tests
  • Run ruff & mypy
  • All tests pass

@codecov
Copy link

codecov bot commented May 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@tori-tadata tori-tadata left a comment

Choose a reason for hiding this comment

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

Thanks so much for the fix, @ierickson . I just tested it on a sample MCP and can confirm it resolves the issue as expected. @shahar4499 — feel free to do a quick code review pass, but functionality-wise it looks good to me.

@shahar4499 shahar4499 merged commit 60909a3 into tadata-org:main May 18, 2025
6 checks 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.

3 participants