Skip to content

Conversation

Falamarcao
Copy link
Collaborator

@Falamarcao Falamarcao commented Aug 9, 2025

Yes, this PR message was written by AI.
No, I’m not sorry.
Yes, the code is real.
And yes, all 116 tests pass — even the ones that hate me personally.

What’s actually changed?

  • ✅ Smart root redirect
    Hit /? We check your Accept header and redirect to /mcp or /sse — because nobody likes guessing the right endpoint like it’s a treasure hunt with no map.

  • 📦 Config from pyproject.toml
    Version and description now loaded directly from pyproject.toml. One source of truth. Zero magic strings. Maximum adulting.

  • 🎨 Logging with Rich
    Because plain print() is what happens when you give Python to someone with a deadline and low blood sugar.

  • ✨ Improved MCP proxy for root access
    FastApiMCP works best mounted under a subpath — which is great!
    But uvx-based MCP clients expect to connect at /.
    So we added a proxy at root that forwards requests (with full headers and methods) to the right backend — no client changes needed.

    Think of it as a multilingual tour guide for your HTTP requests.

  • ✅ All 116 tests passed
    Locally. On my machine. With Wi-Fi that doesn’t hate me (for once).

…rom TOML

- Added root route redirecting to MCP or SSE endpoints based on Accept header (fixed MCP Clients usage).
- Centralized pyproject.toml value loading for VERSION, and description.

✅ Local Tests: all 116 tests passed successfully.
@Falamarcao Falamarcao self-assigned this Aug 9, 2025
@Falamarcao Falamarcao changed the title Dev 🤖 feat: redirect / to /mcp or /sse by Accept header & load settings from TOML Aug 9, 2025
FastApiMCP doesn't allow mounting at root `/`. MCP clients need to connect at root when using uvx, so we proxy requests dynamically to SSE and HTTP endpoints, handling methods and headers properly.
@Falamarcao Falamarcao merged commit 19e88ab into main Aug 9, 2025
7 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.

1 participant