Skip to content

MCP Client Tool node#

MCP Client Tool 节点#

The MCP Client Tool node is a Model Context Protocol (MCP) client, allowing you to use the tools exposed by an external MCP server. You can connect the MCP Client Tool node to your models to call external tools with n8n agents.

MCP Client Tool 节点是一个 模型上下文协议 (MCP) 客户端,允许您使用外部 MCP 服务器公开的工具。您可以将 MCP Client Tool 节点连接到您的模型,以便使用 n8n 代理调用外部工具。

Credentials

凭据

The MCP Client Tool node supports both Bearer and generic header authentication methods.

MCP Client Tool 节点支持 Bearer 和通用 header 身份验证方法。

Node parameters#

节点参数#

Configure the node with the following parameters.

使用以下参数配置节点。

  • SSE Endpoint: The SSE endpoint for the MCP server you want to connect to.
  • SSE 端点:您要连接的 MCP 服务器的 SSE 端点。
  • Authentication: The authentication method for authentication to your MCP server. The MCP tool supports bearer and generic header authentication. Select None to attempt to connect without authentication.
  • 身份验证:对您的 MCP 服务器进行身份验证的方法。MCP 工具支持 bearer 和通用 header 身份验证。选择 None 尝试在不进行身份验证的情况下连接。
  • Tools to Include: Choose which tools you want to expose to the AI Agent:
  • 要包含的工具:选择您要向 AI 代理公开的工具:
    • All: Expose all the tools given by the MCP server.
    • All:公开 MCP 服务器提供的所有工具。
    • Selected: Activates a Tools to Include parameter where you can select the tools you want to expose to the AI Agent.
    • Selected:激活 Tools to Include 参数,您可以在其中选择要向 AI 代理公开的工具。
    • All Except: Activates a Tools to Exclude parameter where you can select the tools you want to avoid sharing with the AI Agent. The AI Agent will have access to all MCP server's tools that aren't selected.
    • All Except:激活 Tools to Exclude 参数,您可以在其中选择要避免与 AI 代理共享的工具。AI 代理将可以访问所有未选择的 MCP 服务器工具。

Templates and examples#

模板和示例#

Build an MCP Server with Google Calendar and Custom Functions

by Solomon

View template details
Build your own N8N Workflows MCP Server

by Jimleuk

View template details
💥🛠️Build a Web Search Chatbot with GPT-4o and MCP Brave Search

by Joseph LePage

View template details
Browse MCP 客户端工具 integration templates, or search all templates

相关资源#

n8n also has an MCP Server Trigger node that allows you to expose n8n tools to external AI Agents.

n8n 还有一个 MCP Server Trigger 节点,允许您向外部 AI 代理公开 n8n 工具。

Refer to the MCP documentation and MCP specification for more details about the protocol, servers, and clients.

请参阅 MCP 文档MCP 规范 了解有关协议、服务器和客户端的更多详细信息。

有关 LangChain 中工具的更多信息,请参阅 LangChain 关于工具的文档

查看 n8n 的高级 AI文档。

AI 术语表#

  • completion(完成/补全): 完成是由 GPT 等模型生成的响应。
  • hallucinations(幻觉): AI 中的幻觉是指大语言模型(LLM)错误地感知到不存在的模式或对象。
  • vector database(向量数据库): 向量数据库存储信息的数学表示。与嵌入和检索器一起使用,创建 AI 在回答问题时可以访问的数据库。
  • vector store(向量存储): 向量存储或向量数据库,存储信息的数学表示。与嵌入和检索器一起使用,创建 AI 在回答问题时可以访问的数据库。