python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

Why synchronous @mcp.tool definition is not supported for parallelism?

Open MikeBai523 opened this issue 3 months ago • 0 comments

Question

In mcp.server.fastmcp.utilities.func_metadata.FuncMetadata.call_fn_with_arg_validation

if fn_is_async:
    return await fn(**arguments_parsed_dict)
else:
    return fn(**arguments_parsed_dict)

In FastMCP, if a tool is defined as a synchronous function, it will block the whole running loop instead of using to_thread().

May I know the consideration for it's different from FastAPI's concurrency model?

Additional Context

No response

MikeBai523 avatar Nov 20 '25 09:11 MikeBai523