Skip to content

Conversation

@pamelafox
Copy link
Contributor

Purpose

This pull request refactors the itinerary planning MCP server to use streamable HTTP instead of SSE, plus some tool function improvements.

Besides streamable change, key changes include replacing dictionary-based data structures with @dataclass models, updating dependencies, and simplifying routing by consolidating routes into app.py.

Dependency Updates:

  • Updated mcp[cli] dependency from version 1.3.0 to 1.10.1 in pyproject.toml to incorporate the latest features and improvements.

Code Refactoring:

  • Replaced dictionary-based data structures with @dataclass models (Hotel, Flight, Airport, etc.) to improve type safety and readability in mcp_server.py. [1] [2] [3] [4] [5] [6] [7]
  • Updated return types for suggest_hotels and suggest_flights functions to use the newly introduced HotelSuggestions and FlightSuggestions data classes. [1] [2]

Routing Simplification:

  • Consolidated all routing logic into app.py by removing app_routes.py. Simplified the route structure and added a homepage route for non-MCP requests. [1] [2]

Logging Enhancements:

  • Introduced a logger in app.py to enable better debugging and monitoring of the application.

These changes collectively improve the codebase's structure and maintainability while ensuring compatibility with the latest MCP library features.

Does this introduce a breaking change?

[ ] Yes
[X] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[X] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • I tested with a local MCP client with a deployed Container App. I am still testing "azd up" with the full project.

@manekinekko manekinekko merged commit 18ac832 into main Jul 23, 2025
9 checks passed
@manekinekko manekinekko deleted the streamingpython branch October 22, 2025 14:30
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