Commit 9325779
committed
Add mount_path support to FastMCP for proper SSE endpoint handling
This commit adds a mount_path attribute to FastMCP settings to support
properly constructing SSE endpoints when servers are mounted under
sub-paths. The _normalize_path helper method combines mount paths with
endpoints to ensure correct session_uri generation.
This fixes issues when running multiple FastMCP servers under different
path prefixes in a single Starlette application.1 parent babb477 commit 9325779
1 file changed
+30
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
477 | 478 | | |
478 | 479 | | |
479 | 480 | | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
480 | 507 | | |
481 | 508 | | |
482 | | - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
483 | 512 | | |
484 | 513 | | |
485 | 514 | | |
| |||
0 commit comments