You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've set up a basic FastMCP instance with streamable_http_app() and mounted it inside a FastAPI app as shown below:
fromfastapiimportFastAPIfrommcp.server.fastmcpimportFastMCPecho_mcp=FastMCP(name="EchoServer", stateless_http=True)
@echo_mcp.tool(description="A simple echo tool")defecho(message: str) ->str:
returnf"Echo: {message}"echo_app=echo_mcp.streamable_http_app()
app=FastAPI(
title="Echo MCP Service",
description="A service that provides an echo",
version="1.0.0",
lifespan=echo_app.router.lifespan_context,
)
app.mount("/echo-server", echo_app, name="echo")
When I run this locally using:
uvicorn app.server:app --reload --port 8888
and make a GET request to http://localhost:8888/echo-server/mcp, the request hangs indefinitely and outputs nothing.
This becomes problematic when integrating this Remote MCP with Claude, which after Oauth steps, begin the integration with a GET request to /mcp. That request seems to time out on their end due to this behavior.
The issue is reproducible locally
Post request to fetch list of tools works as expected
Is this expected behavior for streamable_http_app()? If not, what would be the appropriate way to handle simple GET requests to /mcp so they don't hang? Also if not, why would Claude make a GET request to kick off the integration with Remote MCP?
Thanks!
Example Code
fromfastapiimportFastAPIfrommcp.server.fastmcpimportFastMCPecho_mcp=FastMCP(name="EchoServer", stateless_http=True)
@echo_mcp.tool(description="A simple echo tool")defecho(message: str) ->str:
returnf"Echo: {message}"echo_app=echo_mcp.streamable_http_app()
app=FastAPI(
title="Echo MCP Service",
description="A service that provides an echo",
version="1.0.0",
lifespan=echo_app.router.lifespan_context,
)
app.mount("/echo-server", echo_app, name="echo")
INFO: Uvicorn running on http://127.0.0.1:8888 (Press CTRL+C to quit)
INFO: Started reloader process [111844] using WatchFiles
INFO: Started server process [111865]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: 127.0.0.1:50444 - "GET /mcp-server/mcp/ HTTP/1.1" 200 OK
INFO: 127.0.0.1:56346 - "POST /mcp-server/mcp/ HTTP/1.1" 200 OK
Something is wrong maybe when building the response for the GET request?
Added a middleware to check the response body
response_body = b""
async for chunk in response.body_iterator:
response_body += chunk
Every chunk is a string like : ping - 2025-05-22T14:16:16.855206+00:00 and it takes 15s for each chunk
Description
Hi team,
I've set up a basic
FastMCP
instance withstreamable_http_app()
and mounted it inside a FastAPI app as shown below:When I run this locally using:
and make a GET request to
http://localhost:8888/echo-server/mcp
, the request hangs indefinitely and outputs nothing.This becomes problematic when integrating this Remote MCP with Claude, which after Oauth steps, begin the integration with a GET request to
/mcp
. That request seems to time out on their end due to this behavior.The issue is reproducible locally
Post request to fetch list of tools works as expected

Is this expected behavior for
streamable_http_app()
? If not, what would be the appropriate way to handle simple GET requests to/mcp
so they don't hang? Also if not, why would Claude make a GET request to kick off the integration with Remote MCP?Thanks!
Example Code
Version Information
Additional Context
No response
The text was updated successfully, but these errors were encountered: