How can n8n act as an MCP client?

Describe the problem/error/question

I have built a hosted MCP server and I want to hit it from n8n.

What is the error message (if any)?

I’m unable to find any options to use my own MCP server as alluded to here: MCP Client Tool node documentation | n8n Docs

Please share your workflow

I want to give an LLM access to my MCP tools from within n8n.

Information on your n8n setup

[email protected]

For purpose when you need to run local script or program (in case your MCP runs from local PC), is better to use local n8n client - I running such in docker container (of course it need some permissions and shared directories). Then you able to run ‘Execute Command’ node to execute scripts and programs from your pc

Hey @JoeTannorella hope all is well.

In order to connect your MCP Server to LLM, you can connect MCP Client tool to the AI Agent like so:

Thanks. It turns out that I wasn’t on a new enough version of n8n.

The MCP URL definitely works. I use it in other clients (Claude Desktop) and can access it directly in the browser without issue.

I’ve updated the server now but get an error:

NodeOperationError: Error in sub-node Pod Engine MCP at ExecuteContext.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/get-input-connection-data.ts:302:11) at processTicksAndRejections (node:internal/process/task_queues:105:5) at ExecuteContext.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/node-execution-context/execute-context.ts:203:10) at getConnectedTools (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_c7791fa0cf1054f8be91f739b153c14e/node_modules/@n8n/n8n-nodes-langchain/utils/helpers.ts:208:5) at getTools (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_c7791fa0cf1054f8be91f739b153c14e/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/common.ts:319:17) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_c7791fa0cf1054f8be91f739b153c14e/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts:222:18 at async Promise.allSettled (index 0) at ExecuteContext.toolsAgentExecute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_c7791fa0cf1054f8be91f739b153c14e/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts:290:24) at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_c7791fa0cf1054f8be91f739b153c14e/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/V2/AgentV2.node.ts:117:10) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1212:9) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1582:27 at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_46e522f8a77ed5eccc0991bfcca21502/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2158:11

It appears that the Pod Engine MCP node cannot connect to the MCP server… Why? I don’t know, neither logs nor the screenshot has this info. Is this a locally accessible server or something you can share for me to try?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.