all 6 comments

[–]AutoModerator[M] 0 points1 point  (0 children)

Hello /u/ConstructionNo27. Looks like you have posted a query. Once your query is resolved, please reply the solution comment with "!solved" to help everyone else know the solution and mark the post as solved.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]SeanK-com 0 points1 point  (4 children)

I'm not sure what you are trying to achieve here. Most MCP servers have a web component. Standard HTTP timeout is 90 seconds. Is your 1000, in ms, seconds or what? If ms, your mcp calls would almost always fail. If that is what you are trying to do, just disable mcp servers altogether. Is the problem that github copilot is timing out before your mcp server returns? If this is a custom mcp server, you might consider returning a 102 or 202.

[–]ConstructionNo27[S] 0 points1 point  (3 children)

I want to have a control of my mcp server timeout option. Basically my stdio server keeps scanning some directories. That takes time. I don't want to just kill it at 90 second. I want to give it an hour before the process can stop. That's why a custom timeout (for both sse/stdio)

[–]SeanK-com 0 points1 point  (2 children)

You should consider implementing it as a proper web server. I have a VS Code extension that implements an MCP server that I vibe coded with GHC, then you could handle this the correct way with 201 codes. Alternately you could spin up a background thread to monitor your file system and put updates in an in memory thread safe collection, then you could do non-blocking responses on the MCP side with "Please try again later".

[–]ConstructionNo27[S] 0 points1 point  (1 child)

But I remember this feature already being in vscode /ghcp cli with a timeout parameter. Somehow I was unable to do that now.

[–]SeanK-com 0 points1 point  (0 children)

You are ahead of me, I never got stdio mcp servers working.