Repository navigation
feat(MCP Client Tool Node): Add Timeout config for the MCP Client tool - #15886
Conversation
There was a problem hiding this comment.
cubic found 2 issues across 3 files. Review them in cubic.dev
React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai to give specific feedback.
|
Hey @jreyesr, Thanks for the PR, We have created "GHC-2279" as the internal reference to get this reviewed. One of us will be in touch if there are any changes needed, in most cases this is normally within a couple of weeks but it depends on the current workload of the team. |
|
This would be very helpful, hopefully available in an upcoming release. As soon as you start doing something with an agent that needs multiple calls, maybe a search, scrape etc you can very easily exceed 60s timeout. |
|
@jreyesr Is any docker image available for this version of n8n? |
|
Hello @DreamsOfImran! There isn't a Docker image that I'm aware of; that would require a new release to be created that included this change. And I don't think it'd be easy to recompile only the necessary code, because this is inside |
|
Great efforts! Hope to see this released soon |
|
Hi @jezweb ! |
|
Is this planned for release soon? |
|
No aguardo dessa atualização extremamente necessária! |
|
I tried this patch for several versions without any problem. This greatly enhance the integration with other complex MCP tools. Hmm... Why does it take so long to be officially included in coming releases? |
|
Hello @Joffcom! Just wanted to ask if you've had time to review this PR, or if you need something else from my side. |
|
@jreyesr This is better than nothing, however it should be handled completely differently. It should timeout after 60 seconds if no progress update from MCP server. |
|
I need this options,please quickly audit, Thanks! |
|
We need this 🙏 |
|
I need this too 🙏🏻 If current hardcoded timeout does not detect progress, why don’t we first make it configurable, and then create another backlog to further enhancement, something like adding another configurable “timeout for no update”? |
|
we need this 🙏🏻, When will it be released? |
I have to agree with this, although I am impatient and I know that is a solution that will take longer to develop. |
|
please quickly audit, Thanks! |
|
This one is really improtant |
|
@jreyesr is there any way to use your fix? Currently as much as I can understand I will have to build a docker container as per your code and then use it correct? |
|
@CharlieKolb can you please look into this one, it has made it unusable a lot of MCP takes more than 60 second to respond and it just makes it unusble, I would be really greatfull if its gets fixed soon. |
|
Hey @jreyesr, It looks like the auto assigner we have didn't assign this to anyone 2 months ago when I moved it to review and it fell through the cracks. If you can resolve the merge conflicts we can look at getting this reviewed very soon. |
|
Hello @Joffcom! Sure, I'll take a look at this later today |
# Conflicts: # packages/@n8n/nodes-langchain/nodes/mcp/McpClientTool/McpClientTool.node.test.ts # packages/@n8n/nodes-langchain/nodes/mcp/McpClientTool/McpClientTool.node.ts # packages/@n8n/nodes-langchain/nodes/mcp/McpClientTool/utils.ts
|
I've synced this branch with the current master branch, so it should be ready for review when you can. Let me know if you'd like anything changed |
|
Please approve the PR, the most necessary change, without it MCP cannot be used |
|
@Joffcom Please look into it, this issue really makes N8N unusable for a lot of scenarios. |
I built the image from the jreyesr |
|
@ShireenMissi Please, please review it soon... Thank you sooooo much! |
|
@claude review |
|
Claude finished @ShireenMissi's task —— View job Code Review In Progress
|
ShireenMissi
left a comment
There was a problem hiding this comment.
Tested locally and it works as expected 👌
n8n
|
||||||||||||||||||||||||||||
| Project |
n8n
|
| Branch Review |
master
|
| Run status |
|
| Run duration | 04m 37s |
| Commit |
|
| Committer | jreyesr |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
1
|
|
|
48
|
|
|
0
|
|
|
471
|
| View all changes introduced in this branch ↗︎ | |
|
thanks @ShireenMissi ! Excited for this. |
|
Got released with |
|
Thank you! Finally~! |
|
finally! thank you |
n8n-io#15886) Co-authored-by: Shireen Missi <[email protected]>




Summary
Hello! This PR adds a setting for the MCP Client tool that allows users to set a timeout on tool calls (similar to the Timeout setting on the HTTP Request node)
Currently, this timeout is set to 60 seconds from the default value provided by the MCP SDK, and it can't be configured by the N8N user.
Allowing users to control this would be useful both to:
You can use the following workflow to test the changes. No credentials are required. The tool can be run in isolation, without running the entire agent. Choose the
get_supported_languagestool because it doesn't require any more parameters. The tool takes ~550 milliseconds to run, so the currently configured timeout of 100 millis should fail with "MCP error -32001: Request timed out". Bump it to 1000 millis to check that it now succeeds.Sample workflow
Related Linear tickets, Github issues, and Community forum posts
The post above actually asks for a more general solution, namely exposing all the tool call request options. There aren't that many that look interesting to me, but I'm open to changing this PR to expose more options, if you think it'd be better to expose all of them in one go, instead of just adding the single Timeout
Review / Merge checklist