Set keep-alive timeout for FastMCP servers to 720 seconds

Added the `timeout_keep_alive` parameter to FastMCP initialization in both GPT Researcher and SMD Researcher servers. This ensures connections remain active for longer, improving server reliability for long-lived client interactions.
This commit is contained in:
ThomasTaroni 2025-05-31 22:29:01 +02:00
parent 12503a4453
commit ba48f44321
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ logging.basicConfig(
logger = logging.getLogger(__name__)
# Initialize FastMCP server
mcp = FastMCP("GPT Researcher", host="0.0.0.0", port=8000)
mcp = FastMCP("GPT Researcher", host="0.0.0.0", port=8000, timeout_keep_alive=720)
research_type = os.getenv("RESEARCH_TYPE", "deep")
# Initialize researchers dictionary

View file

@ -26,7 +26,7 @@ logging.basicConfig(
logger = logging.getLogger(__name__)
# Initialize FastMCP server
mcp = FastMCP("SMD Researcher", host="0.0.0.0", port=8000)
mcp = FastMCP("SMD Researcher", host="0.0.0.0", port=8000, timeout_keep_alive=720)
@mcp.tool()
async def smd_detail_article(article_id: str) -> dict: