fastapi_mcp icon indicating copy to clipboard operation
fastapi_mcp copied to clipboard

add stateless http transport support

Open Edison-A-N opened this issue 5 months ago • 11 comments

Describe your changes

add stateless http transport support

Issue ticket number and link (if applicable)

https://github.com/tadata-org/fastapi_mcp/issues/209

Screenshots of the feature / bugfix

Checklist before requesting a review

  • [x] Added relevant tests
  • [x] Run ruff & mypy
  • [x] All tests pass

Edison-A-N avatar Aug 05 '25 07:08 Edison-A-N

I hope this feature can be officially released as soon as possible

buhaiqing avatar Aug 23 '25 11:08 buhaiqing

Hi, Is this pr complete? I am trying to use langchain mcp-adapter client, and it seems it only supports stateless streamable_http.

frouzbeh avatar Aug 25 '25 19:08 frouzbeh

Hi @frouzbeh

You can test the changes in either branch—both are already rebased on the latest main:

Both branches contain the feature proposed in this PR.

Edison-A-N avatar Aug 27 '25 01:08 Edison-A-N

this really would be great to have merged as atm you simply cannot use this with gunicorn at all.

jakegt1 avatar Aug 27 '25 11:08 jakegt1

You're right — as I mentioned in this comment, the current implementation breaks under Gunicorn with multi workers.

Edison-A-N avatar Aug 27 '25 13:08 Edison-A-N

You're right — as I mentioned in this comment, the current implementation breaks under Gunicorn with multi workers.

it would be great to get this merged. i'm hitting the same wall with a multi-worker gunicorn application and switching it to single-worker is not an option

brendanshanahan avatar Aug 28 '25 17:08 brendanshanahan

@itay-tadata sorry for the ping here, but this just seems a really useful feature for the project. Do you mind taking a look if you have the time?

jakegt1 avatar Sep 02 '25 10:09 jakegt1

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests.

:loudspeaker: Thoughts on this report? Let us know!

codecov[bot] avatar Sep 02 '25 11:09 codecov[bot]

I noticed that this PR contains a feature that would be very helpful for my work. May I kindly ask if there is an estimated timeline for when it might be merged into the main release?

Derican avatar Oct 11 '25 06:10 Derican

I noticed that this PR contains a feature that would be very helpful for my work. May I kindly ask if there is an estimated timeline for when it might be merged into the main release?

i would recommend just forking it yourself honestly. Currently this system is unworkable if you use gunicorn until stateless is enabled.

jakegt1 avatar Oct 22 '25 18:10 jakegt1

Can we please merge this pull request, i am facing a similar issue :)

Ashes47 avatar Oct 27 '25 07:10 Ashes47