We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The FastMCP server tools consistently timeout after 10 seconds of execution, triggering error code -32001 and forcing client disconnections:
2025-02-17T03:13:34.973Z [web-reader] [info] Message from client: {"jsonrpc":"2.0","method":"notifications/cancelled","params":{"requestId":27,"reason":"Error: MCP error -32001: Request timed out"}}
Impact:
@mcp.tool(description="long running task") async def run(task: str) -> str: await asyncio.sleep(10) # Task running for exactly 10 seconds return f"Task {task} completed."
v1.2.1
""" Minimal reproduction case for FastMCP tool timeout issue. """ import asyncio from mcp.server.fastmcp import FastMCP mcp = FastMCP("timeout-demo") @mcp.tool(description="long running task") async def run(task: str) -> str: """ Simulates a long-running task with 10-second duration. Args: task: Task identifier """ await asyncio.sleep(10) return f"Task {task} completed."
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
The FastMCP server tools consistently timeout after 10 seconds of execution, triggering error code -32001 and forcing client disconnections:
Impact:
Current Implementation
Expected Behavior
Technical Questions
Environment
v1.2.1
Reproduction Code
The text was updated successfully, but these errors were encountered: